Fix blank confirm device credential activity
Make sure to play the enter animation only once, so it is guaranteed that we get onEnterAnimationComplete. Bug: 22677671 Change-Id: Ia01bb33d6a90abb7dc26c9c12168e2c5ffab1b1d
This commit is contained in:
@@ -27,6 +27,7 @@ public abstract class ConfirmDeviceCredentialBaseActivity extends SettingsActivi
|
||||
private boolean mRestoring;
|
||||
private boolean mDark;
|
||||
private boolean mEnterAnimationPending;
|
||||
private boolean mFirstTimeVisible = true;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedState) {
|
||||
@@ -62,7 +63,8 @@ public abstract class ConfirmDeviceCredentialBaseActivity extends SettingsActivi
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
if (!isChangingConfigurations() && !mRestoring && mDark) {
|
||||
if (!isChangingConfigurations() && !mRestoring && mDark && mFirstTimeVisible) {
|
||||
mFirstTimeVisible = false;
|
||||
prepareEnterAnimation();
|
||||
mEnterAnimationPending = true;
|
||||
}
|
||||
@@ -81,6 +83,7 @@ public abstract class ConfirmDeviceCredentialBaseActivity extends SettingsActivi
|
||||
super.onEnterAnimationComplete();
|
||||
if (mEnterAnimationPending) {
|
||||
startEnterAnimation();
|
||||
mEnterAnimationPending = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user