Merge "Guarantee transitions always update occlude status" into tm-qpr-dev am: cb924c504d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21798206

Change-Id: Ieb69f89b84f9fbe2b30c6b2634b967b5d4819544
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2023-03-07 15:01:32 +00:00
committed by Automerger Merge Worker

View File

@@ -964,13 +964,24 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
public void onAnimationStart(int transit, RemoteAnimationTarget[] apps, public void onAnimationStart(int transit, RemoteAnimationTarget[] apps,
RemoteAnimationTarget[] wallpapers, RemoteAnimationTarget[] nonApps, RemoteAnimationTarget[] wallpapers, RemoteAnimationTarget[] nonApps,
IRemoteAnimationFinishedCallback finishedCallback) throws RemoteException { 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 (apps == null || apps.length == 0 || apps[0] == null) {
if (DEBUG) { if (DEBUG) {
Log.d(TAG, "No apps provided to the OccludeByDream runner; " Log.d(TAG, "No apps provided to the OccludeByDream runner; "
+ "skipping occluding animation."); + "skipping occluding animation.");
} }
finishedCallback.onAnimationFinished(); finishedCallback.onAnimationFinished();
return; return false;
} }
final RemoteAnimationTarget primary = apps[0]; final RemoteAnimationTarget primary = apps[0];
@@ -980,7 +991,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
Log.w(TAG, "The occluding app isn't Dream; " Log.w(TAG, "The occluding app isn't Dream; "
+ "finishing up. Please check that the config is correct."); + "finishing up. Please check that the config is correct.");
finishedCallback.onAnimationFinished(); finishedCallback.onAnimationFinished();
return; return false;
} }
final SyncRtSurfaceTransactionApplier applier = final SyncRtSurfaceTransactionApplier applier =
@@ -1029,6 +1040,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
mOccludeByDreamAnimator.start(); mOccludeByDreamAnimator.start();
}); });
return true;
} }
}; };