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

Commit bd6518cb authored by Fabián Kozynski's avatar Fabián Kozynski Committed by Fabian Kozynski
Browse files

Delete unused flag

Test: build
Flag: EXEMPT flag removal
Bug: 325099249
Change-Id: I1fb6ba4f36326968fefaa08b3100cea95e95e21c
parent a1f819a3
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -948,14 +948,6 @@ flag {
  }
}

flag {
    name: "qs_ui_refactor"
    namespace: "systemui"
    description: "Enables the new QS UI pipeline that follows recommended architecture and uses"
      " Compose for the UI."
    bug: "325099249"
}

flag {
    name: "qs_ui_refactor_compose_fragment"
    namespace: "systemui"
+0 −53
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.systemui.qs.flags

import com.android.systemui.Flags
import com.android.systemui.flags.FlagToken
import com.android.systemui.flags.RefactorFlagUtils

/** Helper for reading or using the new QS UI flag state. */
@Suppress("NOTHING_TO_INLINE")
object NewQsUI {
    /** The aconfig flag name */
    const val FLAG_NAME = Flags.FLAG_QS_UI_REFACTOR

    /** A token used for dependency declaration */
    val token: FlagToken
        get() = FlagToken(FLAG_NAME, isEnabled)

    /** Is the refactor enabled */
    @JvmStatic
    inline val isEnabled
        get() = Flags.qsUiRefactor()

    /**
     * Called to ensure code is only run when the flag is enabled. This protects users from the
     * unintended behaviors caused by accidentally running new logic, while also crashing on an eng
     * build to ensure that the refactor author catches issues in testing.
     */
    @JvmStatic
    inline fun isUnexpectedlyInLegacyMode() =
        RefactorFlagUtils.isUnexpectedlyInLegacyMode(isEnabled, FLAG_NAME)

    /**
     * Called to ensure code is only run when the flag is disabled. This will throw an exception if
     * the flag is enabled to ensure that the refactor author catches issues in testing.
     */
    @JvmStatic
    inline fun assertInLegacyMode() = RefactorFlagUtils.assertInLegacyMode(isEnabled, FLAG_NAME)
}
+4 −6
Original line number Diff line number Diff line
@@ -76,7 +76,6 @@ import com.android.systemui.flags.FakeFeatureFlags;
import com.android.systemui.flags.FeatureFlags;
import com.android.systemui.flags.Flags;
import com.android.systemui.kosmos.KosmosJavaAdapter;
import com.android.systemui.qs.flags.NewQsUI;
import com.android.systemui.qs.flags.QSComposeFragment;
import com.android.systemui.res.R;
import com.android.systemui.shade.QSHeaderBoundsProvider;
@@ -88,7 +87,6 @@ import com.android.systemui.statusbar.SysuiStatusBarStateController;
import com.android.systemui.statusbar.notification.collection.EntryAdapter;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.collection.render.GroupExpansionManager;
import com.android.systemui.statusbar.notification.collection.render.GroupExpansionManagerImpl;
import com.android.systemui.statusbar.notification.collection.render.GroupMembershipManager;
import com.android.systemui.statusbar.notification.data.repository.HeadsUpRepository;
import com.android.systemui.statusbar.notification.emptyshade.ui.view.EmptyShadeView;
@@ -748,7 +746,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
    }

    @Test
    @DisableFlags({QSComposeFragment.FLAG_NAME, NewQsUI.FLAG_NAME})
    @DisableFlags(QSComposeFragment.FLAG_NAME)
    @DisableSceneContainer
    public void testInsideQSHeader_noOffset() {
        ViewGroup qsHeader = mock(ViewGroup.class);
@@ -766,7 +764,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
    }

    @Test
    @DisableFlags({QSComposeFragment.FLAG_NAME, NewQsUI.FLAG_NAME})
    @DisableFlags(QSComposeFragment.FLAG_NAME)
    @DisableSceneContainer
    public void testInsideQSHeader_Offset() {
        ViewGroup qsHeader = mock(ViewGroup.class);
@@ -787,7 +785,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
    }

    @Test
    @EnableFlags({QSComposeFragment.FLAG_NAME, NewQsUI.FLAG_NAME})
    @EnableFlags(QSComposeFragment.FLAG_NAME)
    @DisableSceneContainer
    public void testInsideQSHeader_noOffset_qsCompose() {
        ViewGroup qsHeader = mock(ViewGroup.class);
@@ -814,7 +812,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
    }

    @Test
    @EnableFlags({QSComposeFragment.FLAG_NAME, NewQsUI.FLAG_NAME})
    @EnableFlags(QSComposeFragment.FLAG_NAME)
    @DisableSceneContainer
    public void testInsideQSHeader_Offset_qsCompose() {
        ViewGroup qsHeader = mock(ViewGroup.class);