Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4be5acc2 authored by Shan Huang's avatar Shan Huang Committed by Automerger Merge Worker
Browse files

Merge "Clear back callback in SystemUiProxy." into tm-dev am: b6ff87bb

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17169107

Change-Id: Ie4c9579e315c5add2531d85c1f971ba56f05f622
parents 9142cd1a b6ff87bb
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ public class SystemUiProxy implements ISystemUiProxy, DisplayController.DisplayI
    private ILauncherUnlockAnimationController mPendingLauncherUnlockAnimationController;
    private IRecentTasksListener mRecentTasksListener;
    private final ArrayList<RemoteTransitionCompat> mRemoteTransitions = new ArrayList<>();
    private IOnBackInvokedCallback mBackToLaunchCallback;
    private IOnBackInvokedCallback mBackToLauncherCallback;

    // Used to dedupe calls to SystemUI
    private int mLastShelfHeight;
@@ -200,8 +200,8 @@ public class SystemUiProxy implements ISystemUiProxy, DisplayController.DisplayI
        if (mRecentTasksListener != null && mRecentTasks != null) {
            registerRecentTasksListener(mRecentTasksListener);
        }
        if (mBackAnimation != null && mBackToLaunchCallback != null) {
            setBackToLauncherCallback(mBackToLaunchCallback);
        if (mBackAnimation != null && mBackToLauncherCallback != null) {
            setBackToLauncherCallback(mBackToLauncherCallback);
        }

        if (mPendingSetNavButtonAlpha != null) {
@@ -836,7 +836,7 @@ public class SystemUiProxy implements ISystemUiProxy, DisplayController.DisplayI

    /** Sets the launcher {@link android.window.IOnBackInvokedCallback} to shell */
    public void setBackToLauncherCallback(IOnBackInvokedCallback callback) {
        mBackToLaunchCallback = callback;
        mBackToLauncherCallback = callback;
        if (mBackAnimation == null) {
            return;
        }
@@ -849,6 +849,7 @@ public class SystemUiProxy implements ISystemUiProxy, DisplayController.DisplayI

    /** Clears the previously registered {@link IOnBackInvokedCallback}. */
    public void clearBackToLauncherCallback() {
        mBackToLauncherCallback = null;
        if (mBackAnimation == null) {
            return;
        }