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 mRestoring;
|
||||||
private boolean mDark;
|
private boolean mDark;
|
||||||
private boolean mEnterAnimationPending;
|
private boolean mEnterAnimationPending;
|
||||||
|
private boolean mFirstTimeVisible = true;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedState) {
|
protected void onCreate(Bundle savedState) {
|
||||||
@@ -62,7 +63,8 @@ public abstract class ConfirmDeviceCredentialBaseActivity extends SettingsActivi
|
|||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
if (!isChangingConfigurations() && !mRestoring && mDark) {
|
if (!isChangingConfigurations() && !mRestoring && mDark && mFirstTimeVisible) {
|
||||||
|
mFirstTimeVisible = false;
|
||||||
prepareEnterAnimation();
|
prepareEnterAnimation();
|
||||||
mEnterAnimationPending = true;
|
mEnterAnimationPending = true;
|
||||||
}
|
}
|
||||||
@@ -81,6 +83,7 @@ public abstract class ConfirmDeviceCredentialBaseActivity extends SettingsActivi
|
|||||||
super.onEnterAnimationComplete();
|
super.onEnterAnimationComplete();
|
||||||
if (mEnterAnimationPending) {
|
if (mEnterAnimationPending) {
|
||||||
startEnterAnimation();
|
startEnterAnimation();
|
||||||
|
mEnterAnimationPending = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user