Skip to content
Snippets Groups Projects
Verified Commit 9ea7140a authored by akwizgran's avatar akwizgran
Browse files

Add logging to track down account bugs.

parent 4e5b6ed3
No related branches found
No related tags found
1 merge request!1239Add logging to track down account bugs
Pipeline #4210 passed
...@@ -92,6 +92,9 @@ public abstract class BaseActivity extends AppCompatActivity ...@@ -92,6 +92,9 @@ public abstract class BaseActivity extends AppCompatActivity
.build(); .build();
injectActivity(activityComponent); injectActivity(activityComponent);
super.onCreate(state); super.onCreate(state);
if (LOG.isLoggable(INFO)) {
LOG.info("Creating " + getClass().getSimpleName());
}
// WARNING: When removing this or making it possible to turn it off, // WARNING: When removing this or making it possible to turn it off,
// we need a solution for the app lock feature. // we need a solution for the app lock feature.
...@@ -127,8 +130,9 @@ public abstract class BaseActivity extends AppCompatActivity ...@@ -127,8 +130,9 @@ public abstract class BaseActivity extends AppCompatActivity
@Override @Override
protected void onStart() { protected void onStart() {
super.onStart(); super.onStart();
if (LOG.isLoggable(INFO)) if (LOG.isLoggable(INFO)) {
LOG.info("Starting " + this.getClass().getSimpleName()); LOG.info("Starting " + getClass().getSimpleName());
}
for (ActivityLifecycleController alc : lifecycleControllers) { for (ActivityLifecycleController alc : lifecycleControllers) {
alc.onActivityStart(); alc.onActivityStart();
} }
...@@ -144,11 +148,28 @@ public abstract class BaseActivity extends AppCompatActivity ...@@ -144,11 +148,28 @@ public abstract class BaseActivity extends AppCompatActivity
return (ScreenFilterDialogFragment) f; 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 @Override
protected void onStop() { protected void onStop() {
super.onStop(); super.onStop();
if (LOG.isLoggable(INFO)) if (LOG.isLoggable(INFO)) {
LOG.info("Stopping " + this.getClass().getSimpleName()); LOG.info("Stopping " + getClass().getSimpleName());
}
for (ActivityLifecycleController alc : lifecycleControllers) { for (ActivityLifecycleController alc : lifecycleControllers) {
alc.onActivityStop(); alc.onActivityStop();
} }
...@@ -203,6 +224,9 @@ public abstract class BaseActivity extends AppCompatActivity ...@@ -203,6 +224,9 @@ public abstract class BaseActivity extends AppCompatActivity
@Override @Override
protected void onDestroy() { protected void onDestroy() {
super.onDestroy(); super.onDestroy();
if (LOG.isLoggable(INFO)) {
LOG.info("Destroying " + getClass().getSimpleName());
}
destroyed = true; destroyed = true;
for (ActivityLifecycleController alc : lifecycleControllers) { for (ActivityLifecycleController alc : lifecycleControllers) {
alc.onActivityDestroy(); alc.onActivityDestroy();
......
...@@ -95,12 +95,14 @@ public abstract class BriarActivity extends BaseActivity { ...@@ -95,12 +95,14 @@ public abstract class BriarActivity extends BaseActivity {
// Also check that the activity isn't finishing already. // Also check that the activity isn't finishing already.
// This is possible if we finished in onActivityResult(). // This is possible if we finished in onActivityResult().
// Launching another StartupActivity would cause a loop. // Launching another StartupActivity would cause a loop.
LOG.info("Not signed in, launching StartupActivity");
Intent i = new Intent(this, StartupActivity.class); Intent i = new Intent(this, StartupActivity.class);
startActivityForResult(i, REQUEST_PASSWORD); startActivityForResult(i, REQUEST_PASSWORD);
} else if (lockManager.isLocked() && !isFinishing()) { } else if (lockManager.isLocked() && !isFinishing()) {
// Also check that the activity isn't finishing already. // Also check that the activity isn't finishing already.
// This is possible if we finished in onActivityResult(). // This is possible if we finished in onActivityResult().
// Launching another UnlockActivity would cause a loop. // Launching another UnlockActivity would cause a loop.
LOG.info("Locked, launching UnlockActivity");
Intent i = new Intent(this, UnlockActivity.class); Intent i = new Intent(this, UnlockActivity.class);
startActivityForResult(i, REQUEST_UNLOCK); startActivityForResult(i, REQUEST_UNLOCK);
} else if (SDK_INT >= 23) { } else if (SDK_INT >= 23) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment