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

Commit 28faa499 authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Fix issue where launch transition would never end

We had the same state twice: StatusBar and KeyguardUpdateMonitor,
this led to issues because we were not finishing the transition
in KeyguardUpdateMonitor.
Now the variable doesn't exist anymore in StatusBar and we only
have one source of truth.

Fixes: 118658627
Test: press power, then double press power
Change-Id: Ia97fc7660b1cb6814c5c3fccfc8acfb0b47c3c9b
parent 93d196b3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -191,7 +191,7 @@ public class CollapsedStatusBarFragment extends Fragment implements CommandQueue
    }

    protected int adjustDisableFlags(int state) {
        if (!mStatusBarComponent.isLaunchTransitionFadingAway()
        if (!mKeyguardMonitor.isLaunchTransitionFadingAway()
                && !mKeyguardMonitor.isKeyguardFadingAway()
                && shouldHideNotificationIcons()) {
            state |= DISABLE_NOTIFICATION_ICONS;
+5 −17
Original line number Diff line number Diff line
@@ -117,7 +117,6 @@ import android.view.WindowManagerGlobal;
import android.view.accessibility.AccessibilityManager;
import android.view.animation.AccelerateInterpolator;
import android.widget.DateTimeView;
import android.widget.ImageView;

import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.colorextraction.ColorExtractor;
@@ -460,9 +459,6 @@ public class StatusBar extends SystemUI implements DemoMode,
    protected boolean mDozing;
    private boolean mDozingRequested;

    protected BackDropView mBackdrop;
    protected ImageView mBackdropFront, mBackdropBack;

    private NotificationMediaManager mMediaManager;
    protected NotificationLockscreenUserManager mLockscreenUserManager;
    protected NotificationRemoteInputManager mRemoteInputManager;
@@ -492,7 +488,6 @@ public class StatusBar extends SystemUI implements DemoMode,
    };

    private Runnable mLaunchTransitionEndRunnable;
    protected boolean mLaunchTransitionFadingAway;
    private NotificationEntry mDraggedDownEntry;
    private boolean mLaunchCameraOnScreenTurningOn;
    private boolean mLaunchCameraOnFinishedGoingToSleep;
@@ -932,11 +927,9 @@ public class StatusBar extends SystemUI implements DemoMode,
                mHeadsUpManager, mNotificationIconAreaController, mScrimController);
        mDozeScrimController = new DozeScrimController(DozeParameters.getInstance(context));

        mBackdrop = mStatusBarWindow.findViewById(R.id.backdrop);
        mBackdropFront = mBackdrop.findViewById(R.id.backdrop_front);
        mBackdropBack = mBackdrop.findViewById(R.id.backdrop_back);
        mMediaManager.setup(mBackdrop, mBackdropFront, mBackdropBack,
                mScrimController, mLockscreenWallpaper);
        BackDropView backdrop = mStatusBarWindow.findViewById(R.id.backdrop);
        mMediaManager.setup(backdrop, backdrop.findViewById(R.id.backdrop_front),
                backdrop.findViewById(R.id.backdrop_back), mScrimController, mLockscreenWallpaper);

        // Other icons
        mVolumeComponent = getComponent(VolumeComponent.class);
@@ -1592,10 +1585,6 @@ public class StatusBar extends SystemUI implements DemoMode,
        return mPulsing;
    }

    public boolean isLaunchTransitionFadingAway() {
        return mLaunchTransitionFadingAway;
    }

    public boolean hideStatusBarIconsWhenExpanded() {
        return mNotificationPanel.hideStatusBarIconsWhenExpanded();
    }
@@ -2966,7 +2955,7 @@ public class StatusBar extends SystemUI implements DemoMode,

    public void showKeyguardImpl() {
        mIsKeyguard = true;
        if (mLaunchTransitionFadingAway) {
        if (mKeyguardMonitor.isLaunchTransitionFadingAway()) {
            mNotificationPanel.animate().cancel();
            onLaunchTransitionFadingEnded();
        }
@@ -2998,7 +2987,7 @@ public class StatusBar extends SystemUI implements DemoMode,
        mNotificationPanel.onAffordanceLaunchEnded();
        releaseGestureWakeLock();
        runLaunchTransitionEndRunnable();
        mLaunchTransitionFadingAway = false;
        mKeyguardMonitor.setLaunchTransitionFadingAway(false);
        mPresenter.updateMediaMetaData(true /* metaDataChanged */, true);
    }

@@ -3024,7 +3013,6 @@ public class StatusBar extends SystemUI implements DemoMode,
        mLaunchTransitionEndRunnable = endRunnable;
        Runnable hideRunnable = () -> {
            mKeyguardMonitor.setLaunchTransitionFadingAway(true);
            mLaunchTransitionFadingAway = true;
            if (beforeFading != null) {
                beforeFading.run();
            }