#635 - Make sure the AuthenticateActivity isn't destroyed on screen off
This commit is contained in:
parent
f5c6dfc942
commit
75bc10e1aa
1 changed files with 15 additions and 10 deletions
|
@ -212,13 +212,6 @@ public class AuthenticateActivity extends BaseActivity
|
|||
unlockProgress.setVisibility(isTaskRunning ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
ProcessLifecycleOwner.get().getLifecycle()
|
||||
.removeObserver(observer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Editable text = passwordInput.getText();
|
||||
|
@ -271,6 +264,12 @@ public class AuthenticateActivity extends BaseActivity
|
|||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
finishWithResult(false, null);
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
|
@ -282,9 +281,15 @@ public class AuthenticateActivity extends BaseActivity
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
finishWithResult(false, null);
|
||||
super.onBackPressed();
|
||||
protected void onDestroy() {
|
||||
ProcessLifecycleOwner.get().getLifecycle()
|
||||
.removeObserver(observer);
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean shouldDestroyOnScreenOff() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Retained instance fragment to hold a running {@link AuthenticationTask} between configuration changes.*/
|
||||
|
|
Loading…
Reference in a new issue