Commit 9ea7140a authored by akwizgran's avatar akwizgran

Add logging to track down account bugs.

parent 4e5b6ed3
Pipeline #4210 passed with stage
in 9 minutes and 59 seconds
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment