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

Commit bee990da authored by Ming-Shin Lu's avatar Ming-Shin Lu
Browse files

Clean up check_lockscreen_gone_transition flag

Fix: 409610374
Test: atest VisualStabilityCoordinatorTest
Flag: EXEMPT cleanup
Change-Id: I05d44b1c033f9f9b2971859cfbfc040cbc7198e3
parent 9903e150
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -1613,16 +1613,6 @@ flag {
   }
}

flag {
   name: "check_lockscreen_gone_transition"
   namespace: "systemui"
   description: "Run notification pipeline when the lockscreen is not in gone transition for avoiding janky frames during unlocking animation"
   bug: "358301118"
   metadata {
       purpose: PURPOSE_BUGFIX
   }
}

flag {
  name: "notes_role_qs_tile"
  namespace: "systemui"
+0 −3
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@
 */
package com.android.systemui.statusbar.notification.collection.coordinator

import android.platform.test.annotations.EnableFlags
import android.platform.test.flag.junit.FlagsParameterization
import android.testing.TestableLooper.RunWithLooper
import androidx.test.filters.SmallTest
@@ -543,7 +542,6 @@ class VisualStabilityCoordinatorTest(flags: FlagsParameterization) : SysuiTestCa
    }

    @Test
    @EnableFlags(Flags.FLAG_CHECK_LOCKSCREEN_GONE_TRANSITION)
    @DisableSceneContainer
    fun testNotLockscreenInGoneTransitionLegacy_invalidationCalled() {
        // GIVEN visual stability is being maintained b/c animation is playing
@@ -561,7 +559,6 @@ class VisualStabilityCoordinatorTest(flags: FlagsParameterization) : SysuiTestCa
    }

    @Test
    @EnableFlags(Flags.FLAG_CHECK_LOCKSCREEN_GONE_TRANSITION)
    @EnableSceneContainer
    @BrokenWithSceneContainer(bugId = 377868472) // mReorderingAllowed is broken with SceneContainer
    fun testNotLockscreenInGoneTransition_invalidationCalled() =
+1 −6
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@ import android.view.View
import android.view.WindowInsets
import android.widget.FrameLayout
import androidx.core.view.updateMargins
import com.android.systemui.Flags
import com.android.systemui.compose.ComposeInitializer
import com.android.systemui.res.R

@@ -108,7 +107,6 @@ open class WindowRootView(context: Context, attrs: AttributeSet?) : FrameLayout(

    private fun applyMargins() {
        val count = childCount
        val hasFlagsEnabled = Flags.checkLockscreenGoneTransition()
        var hasChildMarginUpdated = false
        for (i in 0 until count) {
            val child = getChildAt(i)
@@ -121,13 +119,10 @@ open class WindowRootView(context: Context, attrs: AttributeSet?) : FrameLayout(
                ) {
                    layoutParams.updateMargins(left = leftInset, right = rightInset)
                    hasChildMarginUpdated = true
                    if (!hasFlagsEnabled) {
                        child.requestLayout()
                }
            }
        }
        }
        if (hasFlagsEnabled && hasChildMarginUpdated) {
        if (hasChildMarginUpdated) {
            // Request layout at once after all children's margins has updated
            requestLayout()
        }
+2 −11
Original line number Diff line number Diff line
@@ -60,7 +60,6 @@ import androidx.annotation.WorkerThread;
import com.android.internal.statusbar.NotificationVisibility;
import com.android.internal.widget.LockPatternUtils;
import com.android.systemui.Dumpable;
import com.android.systemui.Flags;
import com.android.systemui.LauncherProxyService;
import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dagger.SysUISingleton;
@@ -1019,17 +1018,9 @@ public class NotificationLockscreenUserManagerImpl implements

    private void notifyNotificationStateChanged() {
        if (!Looper.getMainLooper().isCurrentThread()) {
            if (Flags.checkLockscreenGoneTransition()) {
            for (NotificationStateChangedListener listener : mNotifStateChangedListeners) {
                mMainExecutor.execute(listener::onNotificationStateChanged);
            }
            } else {
                mMainExecutor.execute(() -> {
                    for (NotificationStateChangedListener listener : mNotifStateChangedListeners) {
                        listener.onNotificationStateChanged();
                    }
                });
            }
        } else {
            for (NotificationStateChangedListener listener : mNotifStateChangedListeners) {
                listener.onNotificationStateChanged();
+8 −18
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;

import com.android.systemui.Dumpable;
import com.android.systemui.Flags;
import com.android.systemui.communal.domain.interactor.CommunalSceneInteractor;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dagger.qualifiers.Background;
@@ -113,8 +112,6 @@ public class VisualStabilityCoordinator implements Coordinator, Dumpable {
    @VisibleForTesting
    protected static final long ALLOW_SECTION_CHANGE_TIMEOUT = 500;

    private final boolean mCheckLockScreenTransitionEnabled = Flags.checkLockscreenGoneTransition();

    @Inject
    public VisualStabilityCoordinator(
            @Background DelayableExecutor delayableExecutor,
@@ -184,7 +181,6 @@ public class VisualStabilityCoordinator implements Coordinator, Dumpable {
                    this::onTrackingHeadsUpModeChanged);
        }

        if (mCheckLockScreenTransitionEnabled) {
        if (SceneContainerFlag.isEnabled()) {
            mJavaAdapter.alwaysCollectFlow(mKeyguardTransitionInteractor.isInTransition(
                            Edge.create(KeyguardState.LOCKSCREEN, Scenes.Gone), null),
@@ -192,7 +188,6 @@ public class VisualStabilityCoordinator implements Coordinator, Dumpable {
        } else {
            mKeyguardStateController.addCallback(mKeyguardFadeAwayAnimationCallback);
        }
        }
        pipeline.setVisualStabilityManager(mNotifStabilityManager);
    }

@@ -439,7 +434,7 @@ public class VisualStabilityCoordinator implements Coordinator, Dumpable {
        boolean wasReorderingAllowed = mReorderingAllowed;
        // No need to run notification pipeline when the lockscreen is in fading animation.
        mPipelineRunAllowed = !(isPanelCollapsingOrLaunchingActivity()
                || (mCheckLockScreenTransitionEnabled && mLockscreenInGoneTransition));
                || mLockscreenInGoneTransition);
        mReorderingAllowed = isReorderingAllowed();
        if (wasPipelineRunAllowed != mPipelineRunAllowed
                || wasReorderingAllowed != mReorderingAllowed) {
@@ -568,9 +563,7 @@ public class VisualStabilityCoordinator implements Coordinator, Dumpable {
        pw.println("pipelineRunAllowed: " + mPipelineRunAllowed);
        pw.println("  notifPanelCollapsing: " + mNotifPanelCollapsing);
        pw.println("  launchingNotifActivity: " + mNotifPanelLaunchingActivity);
        if (mCheckLockScreenTransitionEnabled) {
        pw.println("  lockscreenInGoneTransition: " + mLockscreenInGoneTransition);
        }
        pw.println("reorderingAllowed: " + mReorderingAllowed);
        pw.println("  sleepy: " + mSleepy);
        pw.println("  fullyDozed: " + mFullyDozed);
@@ -629,9 +622,6 @@ public class VisualStabilityCoordinator implements Coordinator, Dumpable {
    }

    private void onLockscreenInGoneTransitionChanged(boolean inGoneTransition) {
        if (!mCheckLockScreenTransitionEnabled) {
            return;
        }
        if (inGoneTransition == mLockscreenInGoneTransition) {
            return;
        }
Loading