Merge "Fix crash in ConfirmDeviceCredentials" into nyc-dev
This commit is contained in:
@@ -31,7 +31,6 @@ public abstract class ConfirmDeviceCredentialBaseActivity extends SettingsActivi
|
||||
private boolean mDark;
|
||||
private boolean mEnterAnimationPending;
|
||||
private boolean mFirstTimeVisible = true;
|
||||
private final Handler mHandler = new Handler();
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedState) {
|
||||
@@ -76,7 +75,6 @@ public abstract class ConfirmDeviceCredentialBaseActivity extends SettingsActivi
|
||||
mFirstTimeVisible = false;
|
||||
prepareEnterAnimation();
|
||||
mEnterAnimationPending = true;
|
||||
mHandler.postDelayed(mEnterAnimationCompleteTimeoutRunnable, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +90,6 @@ public abstract class ConfirmDeviceCredentialBaseActivity extends SettingsActivi
|
||||
public void onEnterAnimationComplete() {
|
||||
super.onEnterAnimationComplete();
|
||||
if (mEnterAnimationPending) {
|
||||
mHandler.removeCallbacks(mEnterAnimationCompleteTimeoutRunnable);
|
||||
startEnterAnimation();
|
||||
mEnterAnimationPending = false;
|
||||
}
|
||||
@@ -105,15 +102,4 @@ public abstract class ConfirmDeviceCredentialBaseActivity extends SettingsActivi
|
||||
public void startEnterAnimation() {
|
||||
getFragment().startEnterAnimation();
|
||||
}
|
||||
|
||||
/**
|
||||
* Workaround for a bug in window manager which results that onEnterAnimationComplete doesn't
|
||||
* get called in all cases.
|
||||
*/
|
||||
private final Runnable mEnterAnimationCompleteTimeoutRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
onEnterAnimationComplete();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user