Merge "Prevent double keyguardGoingAway, and finish cancelled animations." into sc-v2-dev
This commit is contained in:
@@ -2090,6 +2090,15 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable,
|
|||||||
private final Runnable mKeyguardGoingAwayRunnable = new Runnable() {
|
private final Runnable mKeyguardGoingAwayRunnable = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
// If the keyguard is already going away, or it's about to because we are going to
|
||||||
|
// trigger the going-away remote animation to show the surface behind, don't do it
|
||||||
|
// again. That will cause the current animation to be cancelled unnecessarily.
|
||||||
|
if (mKeyguardStateController.isKeyguardGoingAway()
|
||||||
|
|| mSurfaceBehindRemoteAnimationRequested
|
||||||
|
|| mSurfaceBehindRemoteAnimationRunning) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Trace.beginSection("KeyguardViewMediator.mKeyGuardGoingAwayRunnable");
|
Trace.beginSection("KeyguardViewMediator.mKeyGuardGoingAwayRunnable");
|
||||||
if (DEBUG) Log.d(TAG, "keyguardGoingAway");
|
if (DEBUG) Log.d(TAG, "keyguardGoingAway");
|
||||||
mKeyguardViewControllerLazy.get().keyguardGoingAway();
|
mKeyguardViewControllerLazy.get().keyguardGoingAway();
|
||||||
@@ -2451,9 +2460,7 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable,
|
|||||||
|
|
||||||
if (mSurfaceBehindRemoteAnimationFinishedCallback != null) {
|
if (mSurfaceBehindRemoteAnimationFinishedCallback != null) {
|
||||||
try {
|
try {
|
||||||
if (!cancelled) {
|
mSurfaceBehindRemoteAnimationFinishedCallback.onAnimationFinished();
|
||||||
mSurfaceBehindRemoteAnimationFinishedCallback.onAnimationFinished();
|
|
||||||
}
|
|
||||||
mSurfaceBehindRemoteAnimationFinishedCallback = null;
|
mSurfaceBehindRemoteAnimationFinishedCallback = null;
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
Reference in New Issue
Block a user