Supress IKeygaurdSerivce#setOccluded binder call from WM.

When remote animation is enabled for keygaurd (un)occluded status update,
KeyguardServices recieves binder call via IRemoteAnimationRunner interface
when occlusion status chagnes.

The only place we need to keep IKeygaurdSerivce#setOccluded call is
in ServiceConnection#onServiceConnected. This is used to synchronize
keyguard occluded status in WM and SysUI process when SysUI process
restarts, which is handled without any animation.

Bug: 166736690
Test: atest AppTransitionTests
Change-Id: Idf3a1dedb81be10eb2014f5da190750caf6b6869
This commit is contained in:
Issei Suzuki
2021-03-10 11:07:28 +01:00
parent 6bf846920c
commit 9934a78d47
2 changed files with 12 additions and 3 deletions

View File

@@ -149,9 +149,14 @@ public class KeyguardService extends Service {
RemoteAnimationTarget[] wallpapers,
RemoteAnimationTarget[] nonApps,
IRemoteAnimationFinishedCallback finishedCallback) {
// TODO(bc-unlock): Calls KeyguardViewMediator#setOccluded to update the state and
// run animation.
try {
if (transit == TRANSIT_OLD_KEYGUARD_OCCLUDE) {
mBinder.setOccluded(true /* isOccluded */, true /* animate */);
} else if (transit == TRANSIT_OLD_KEYGUARD_UNOCCLUDE) {
mBinder.setOccluded(false /* isOccluded */, true /* animate */);
}
// TODO(bc-unlock): Implement occlude/unocclude animation applied on apps,
// wallpapers and nonApps.
finishedCallback.onAnimationFinished();
} catch (RemoteException e) {
Slog.e(TAG, "RemoteException");

View File

@@ -258,8 +258,12 @@ public class KeyguardServiceDelegate {
}
}
/**
* @deprecated Notify occlude status change via remote animation.
*/
@Deprecated
public void setOccluded(boolean isOccluded, boolean animate) {
if (mKeyguardService != null) {
if (!WindowManagerService.sEnableRemoteKeyguardAnimation && mKeyguardService != null) {
if (DEBUG) Log.v(TAG, "setOccluded(" + isOccluded + ") animate=" + animate);
mKeyguardService.setOccluded(isOccluded, animate);
}