diff options
| author | 2022-04-22 18:59:58 +0000 | |
|---|---|---|
| committer | 2022-04-22 18:59:58 +0000 | |
| commit | 1254f9161f18123f3ed7bbdceb11d81eb44db0cc (patch) | |
| tree | 67704a3b9d620a8cff21b1c4a6bf9abc0ebdb84a | |
| parent | 840168a510ca22a28e5e06096baade9d38c6a33e (diff) | |
| parent | 7b2b1a60203cb4cf9a476f3bc56780fbea140b57 (diff) | |
Merge "Add keyguardGoingAway to the state controller." into tm-dev
3 files changed, 13 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index d6843bf5f58b..2e1373259975 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -2604,6 +2604,9 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, finishSurfaceBehindRemoteAnimation(cancelled); mSurfaceBehindRemoteAnimationRequested = false; + + // The remote animation is over, so we're not going away anymore. + mKeyguardStateController.notifyKeyguardGoingAway(false); }); mKeyguardUnlockAnimationControllerLazy.get().notifyFinishedKeyguardExitAnimation( @@ -2622,6 +2625,7 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, ActivityTaskManager.getService().keyguardGoingAway( WindowManagerPolicyConstants.KEYGUARD_GOING_AWAY_FLAG_NO_WINDOW_ANIMATIONS | WindowManagerPolicyConstants.KEYGUARD_GOING_AWAY_FLAG_WITH_WALLPAPER); + mKeyguardStateController.notifyKeyguardGoingAway(true); } catch (RemoteException e) { mSurfaceBehindRemoteAnimationRequested = false; e.printStackTrace(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardStateController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardStateController.java index 050b67016d09..233778dbfeb6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardStateController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardStateController.java @@ -16,6 +16,8 @@ package com.android.systemui.statusbar.policy; +import android.app.IActivityTaskManager; + import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.policy.KeyguardStateController.Callback; @@ -234,6 +236,12 @@ public interface KeyguardStateController extends CallbackController<Callback> { default void onKeyguardFadingAwayChanged() {} /** + * We've called {@link IActivityTaskManager#keyguardGoingAway}, which initiates the unlock + * sequence. + */ + default void onKeyguardGoingAwayChanged() {} + + /** * Triggered when the keyguard dismiss amount has changed, via either a swipe gesture or an * animation. */ diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardStateControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardStateControllerImpl.java index 2f565765158c..be5da377e496 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardStateControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardStateControllerImpl.java @@ -323,6 +323,7 @@ public class KeyguardStateControllerImpl implements KeyguardStateController, Dum Trace.traceCounter(Trace.TRACE_TAG_APP, "keyguardGoingAway", keyguardGoingAway ? 1 : 0); mKeyguardGoingAway = keyguardGoingAway; + new ArrayList<>(mCallbacks).forEach(Callback::onKeyguardGoingAwayChanged); } } |