mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 02:39:05 +01:00
Add logging to track down account bugs.
This commit is contained in:
@@ -92,6 +92,9 @@ public abstract class BaseActivity extends AppCompatActivity
|
||||
.build();
|
||||
injectActivity(activityComponent);
|
||||
super.onCreate(state);
|
||||
if (LOG.isLoggable(INFO)) {
|
||||
LOG.info("Creating " + getClass().getSimpleName());
|
||||
}
|
||||
|
||||
// WARNING: When removing this or making it possible to turn it off,
|
||||
// we need a solution for the app lock feature.
|
||||
@@ -127,8 +130,9 @@ public abstract class BaseActivity extends AppCompatActivity
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
if (LOG.isLoggable(INFO))
|
||||
LOG.info("Starting " + this.getClass().getSimpleName());
|
||||
if (LOG.isLoggable(INFO)) {
|
||||
LOG.info("Starting " + getClass().getSimpleName());
|
||||
}
|
||||
for (ActivityLifecycleController alc : lifecycleControllers) {
|
||||
alc.onActivityStart();
|
||||
}
|
||||
@@ -144,11 +148,28 @@ public abstract class BaseActivity extends AppCompatActivity
|
||||
return (ScreenFilterDialogFragment) f;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
if (LOG.isLoggable(INFO)) {
|
||||
LOG.info("Resuming " + getClass().getSimpleName());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
if (LOG.isLoggable(INFO)) {
|
||||
LOG.info("Pausing " + getClass().getSimpleName());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
if (LOG.isLoggable(INFO))
|
||||
LOG.info("Stopping " + this.getClass().getSimpleName());
|
||||
if (LOG.isLoggable(INFO)) {
|
||||
LOG.info("Stopping " + getClass().getSimpleName());
|
||||
}
|
||||
for (ActivityLifecycleController alc : lifecycleControllers) {
|
||||
alc.onActivityStop();
|
||||
}
|
||||
@@ -203,6 +224,9 @@ public abstract class BaseActivity extends AppCompatActivity
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
if (LOG.isLoggable(INFO)) {
|
||||
LOG.info("Destroying " + getClass().getSimpleName());
|
||||
}
|
||||
destroyed = true;
|
||||
for (ActivityLifecycleController alc : lifecycleControllers) {
|
||||
alc.onActivityDestroy();
|
||||
|
||||
@@ -95,12 +95,14 @@ public abstract class BriarActivity extends BaseActivity {
|
||||
// Also check that the activity isn't finishing already.
|
||||
// This is possible if we finished in onActivityResult().
|
||||
// Launching another StartupActivity would cause a loop.
|
||||
LOG.info("Not signed in, launching StartupActivity");
|
||||
Intent i = new Intent(this, StartupActivity.class);
|
||||
startActivityForResult(i, REQUEST_PASSWORD);
|
||||
} else if (lockManager.isLocked() && !isFinishing()) {
|
||||
// Also check that the activity isn't finishing already.
|
||||
// This is possible if we finished in onActivityResult().
|
||||
// Launching another UnlockActivity would cause a loop.
|
||||
LOG.info("Locked, launching UnlockActivity");
|
||||
Intent i = new Intent(this, UnlockActivity.class);
|
||||
startActivityForResult(i, REQUEST_UNLOCK);
|
||||
} else if (SDK_INT >= 23) {
|
||||
|
||||
Reference in New Issue
Block a user