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

Commit 71449d9e authored by Fabian Kozynski's avatar Fabian Kozynski Committed by Android (Google) Code Review
Browse files

Merge "Migrate to aconfig flags" into main

parents 7a4bca8a 9385f735
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -105,3 +105,10 @@ flag {
        "keyguard_root_view."
    bug: "278054201"
}

flag {
   name: "qs_new_pipeline"
   namespace: "systemui"
   description: "Use the new pipeline for Quick Settings. Should have no behavior changes."
   bug: "241772429"
}
+0 −7
Original line number Diff line number Diff line
@@ -345,13 +345,6 @@ object Flags {
            "qs_user_detail_shortcut"
        )

    @JvmField
    val QS_PIPELINE_NEW_HOST = unreleasedFlag("qs_pipeline_new_host", teamfood = true)

    // TODO(b/278068252): Tracking Bug
    @JvmField
    val QS_PIPELINE_AUTO_ADD = unreleasedFlag("qs_pipeline_auto_add", teamfood = true)

    // TODO(b/296357483): Tracking Bug
    @JvmField
    val QS_PIPELINE_NEW_TILES = unreleasedFlag("qs_pipeline_new_tiles")
+4 −4
Original line number Diff line number Diff line
@@ -35,10 +35,10 @@ import kotlinx.coroutines.launch

/**
 * Adapter to determine what real class to use for classes that depend on [QSHost].
 * * When [QSPipelineFlagsRepository.pipelineHostEnabled] is false, all calls will be routed to
 * * When [QSPipelineFlagsRepository.pipelineEnabled] is false, all calls will be routed to
 *   [QSTileHost].
 * * When [QSPipelineFlagsRepository.pipelineHostEnabled] is true, calls regarding the current set
 *   of tiles will be routed to [CurrentTilesInteractor]. Other calls (like [createTileView]) will
 * * When [QSPipelineFlagsRepository.pipelineEnabled] is true, calls regarding the current set of
 *   tiles will be routed to [CurrentTilesInteractor]. Other calls (like [createTileView]) will
 *   still be routed to [QSTileHost].
 *
 * This routing also includes dumps.
@@ -60,7 +60,7 @@ constructor(
        private const val TAG = "QSTileHost"
    }

    private val useNewHost = flags.pipelineHostEnabled
    private val useNewHost = flags.pipelineEnabled

    @GuardedBy("callbacksMap") private val callbacksMap = mutableMapOf<QSHost.Callback, Job>()

+6 −5
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import androidx.annotation.Nullable;
import com.android.internal.annotations.VisibleForTesting;
import com.android.systemui.Dumpable;
import com.android.systemui.ProtoDumpable;
import com.android.systemui.res.R;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.dump.nano.SystemUIProtoDump;
@@ -49,6 +48,7 @@ import com.android.systemui.qs.pipeline.data.repository.CustomTileAddedRepositor
import com.android.systemui.qs.pipeline.domain.interactor.PanelInteractor;
import com.android.systemui.qs.pipeline.shared.QSPipelineFlagsRepository;
import com.android.systemui.qs.tiles.di.NewQSTileFactory;
import com.android.systemui.res.R;
import com.android.systemui.settings.UserFileManager;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.shade.ShadeController;
@@ -57,8 +57,6 @@ import com.android.systemui.tuner.TunerService;
import com.android.systemui.tuner.TunerService.Tunable;
import com.android.systemui.util.settings.SecureSettings;

import dagger.Lazy;

import org.jetbrains.annotations.NotNull;

import java.io.PrintWriter;
@@ -75,6 +73,8 @@ import java.util.stream.Collectors;
import javax.inject.Inject;
import javax.inject.Provider;

import dagger.Lazy;

/** Platform implementation of the quick settings tile host
 *
 * This class keeps track of the set of current tiles and is the in memory source of truth
@@ -167,7 +167,7 @@ public class QSTileHost implements QSHost, Tunable, PluginListener<QSFactory>, P
            // finishes before creating any tiles.
            tunerService.addTunable(this, TILES_SETTING);
            // AutoTileManager can modify mTiles so make sure mTiles has already been initialized.
            if (!mFeatureFlags.getPipelineAutoAddEnabled()) {
            if (!mFeatureFlags.getPipelineEnabled()) {
                mAutoTiles = autoTiles.get();
            }
        });
@@ -288,9 +288,10 @@ public class QSTileHost implements QSHost, Tunable, PluginListener<QSFactory>, P
            }
        }
        // Do not process tiles if the flag is enabled.
        if (mFeatureFlags.getPipelineHostEnabled()) {
        if (mFeatureFlags.getPipelineEnabled()) {
            return;
        }
        QSPipelineFlagsRepository.Utils.assertInLegacyMode();
        if (newValue == null && UserManager.isDeviceInDemoMode(mContext)) {
            newValue = mContext.getResources().getString(R.string.quick_settings_tiles_retail_mode);
        }
+2 −2
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ interface QSHostModule {
            qsHost: QSTileHost,
            panelInteractorImpl: PanelInteractorImpl
        ): PanelInteractor {
            return if (featureFlags.pipelineHostEnabled) {
            return if (featureFlags.pipelineEnabled) {
                panelInteractorImpl
            } else {
                qsHost
@@ -62,7 +62,7 @@ interface QSHostModule {
            qsHost: QSTileHost,
            customTileAddedRepository: CustomTileAddedSharedPrefsRepository
        ): CustomTileAddedRepository {
            return if (featureFlags.pipelineHostEnabled) {
            return if (featureFlags.pipelineEnabled) {
                customTileAddedRepository
            } else {
                qsHost
Loading