Merge "Guarantee transitions always update occlude status" into udc-dev am: c39455c2b3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21703312 Change-Id: Ia1c0b2117b676c62356d5dd0371df860f6dbd6ed Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -966,13 +966,24 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
|
||||
public void onAnimationStart(int transit, RemoteAnimationTarget[] apps,
|
||||
RemoteAnimationTarget[] wallpapers, RemoteAnimationTarget[] nonApps,
|
||||
IRemoteAnimationFinishedCallback finishedCallback) throws RemoteException {
|
||||
if (!handleOnAnimationStart(
|
||||
transit, apps, wallpapers, nonApps, finishedCallback)) {
|
||||
// Usually we rely on animation completion to synchronize occluded status,
|
||||
// but there was no animation to play, so just update it now.
|
||||
setOccluded(true /* isOccluded */, false /* animate */);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean handleOnAnimationStart(int transit, RemoteAnimationTarget[] apps,
|
||||
RemoteAnimationTarget[] wallpapers, RemoteAnimationTarget[] nonApps,
|
||||
IRemoteAnimationFinishedCallback finishedCallback) throws RemoteException {
|
||||
if (apps == null || apps.length == 0 || apps[0] == null) {
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "No apps provided to the OccludeByDream runner; "
|
||||
+ "skipping occluding animation.");
|
||||
}
|
||||
finishedCallback.onAnimationFinished();
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
final RemoteAnimationTarget primary = apps[0];
|
||||
@@ -982,7 +993,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
|
||||
Log.w(TAG, "The occluding app isn't Dream; "
|
||||
+ "finishing up. Please check that the config is correct.");
|
||||
finishedCallback.onAnimationFinished();
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
final SyncRtSurfaceTransactionApplier applier =
|
||||
@@ -1031,6 +1042,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
|
||||
|
||||
mOccludeByDreamAnimator.start();
|
||||
});
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user