mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-09 20:58:34 +00:00
Improve activity lifecycle logging.
This commit is contained in:
parent
1e7c93007d
commit
5b74d0cbeb
@ -41,6 +41,7 @@ public abstract class PassphraseRequiredActionBarActivity extends BaseActionBarA
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected final void onCreate(Bundle savedInstanceState) {
|
protected final void onCreate(Bundle savedInstanceState) {
|
||||||
|
Log.d(TAG, "[" + Log.tag(getClass()) + "] onCreate()");
|
||||||
this.networkAccess = new SignalServiceNetworkAccess(this);
|
this.networkAccess = new SignalServiceNetworkAccess(this);
|
||||||
onPreCreate();
|
onPreCreate();
|
||||||
|
|
||||||
@ -60,7 +61,7 @@ public abstract class PassphraseRequiredActionBarActivity extends BaseActionBarA
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
Log.i(TAG, "onResume()");
|
Log.d(TAG, "[" + Log.tag(getClass()) + "] onResume()");
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
||||||
if (networkAccess.isCensored(this)) {
|
if (networkAccess.isCensored(this)) {
|
||||||
@ -68,22 +69,34 @@ public abstract class PassphraseRequiredActionBarActivity extends BaseActionBarA
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onStart() {
|
||||||
|
Log.d(TAG, "[" + Log.tag(getClass()) + "] onStart()");
|
||||||
|
super.onStart();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
Log.i(TAG, "onPause()");
|
Log.d(TAG, "[" + Log.tag(getClass()) + "] onPause()");
|
||||||
super.onPause();
|
super.onPause();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onStop() {
|
||||||
|
Log.d(TAG, "[" + Log.tag(getClass()) + "] onStop()");
|
||||||
|
super.onStop();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
Log.i(TAG, "onDestroy()");
|
Log.d(TAG, "[" + Log.tag(getClass()) + "] onDestroy()");
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
removeClearKeyReceiver(this);
|
removeClearKeyReceiver(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMasterSecretCleared() {
|
public void onMasterSecretCleared() {
|
||||||
Log.i(TAG, "onMasterSecretCleared()");
|
Log.d(TAG, "onMasterSecretCleared()");
|
||||||
if (ApplicationContext.getInstance(this).isAppVisible()) routeApplicationState(true);
|
if (ApplicationContext.getInstance(this).isAppVisible()) routeApplicationState(true);
|
||||||
else finish();
|
else finish();
|
||||||
}
|
}
|
||||||
@ -129,7 +142,7 @@ public abstract class PassphraseRequiredActionBarActivity extends BaseActionBarA
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Intent getIntentForState(int state) {
|
private Intent getIntentForState(int state) {
|
||||||
Log.i(TAG, "routeApplicationState(), state: " + state);
|
Log.d(TAG, "routeApplicationState(), state: " + state);
|
||||||
|
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case STATE_CREATE_PASSPHRASE: return getCreatePassphraseIntent();
|
case STATE_CREATE_PASSPHRASE: return getCreatePassphraseIntent();
|
||||||
@ -192,7 +205,6 @@ public abstract class PassphraseRequiredActionBarActivity extends BaseActionBarA
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initializeClearKeyReceiver() {
|
private void initializeClearKeyReceiver() {
|
||||||
Log.i(TAG, "initializeClearKeyReceiver()");
|
|
||||||
this.clearKeyReceiver = new BroadcastReceiver() {
|
this.clearKeyReceiver = new BroadcastReceiver() {
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user