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

Commit 7b553cfb authored by Anton Potapov's avatar Anton Potapov
Browse files

Migrate CustomTile to the new infra

The change pull together couple of interactors to migrate a CustomTile.

Flag: LEGACY QS_PIPELINE_NEW_TILES DISABLED
Test: atest QSTileViewModelImplTest
Test: atest cts/tests/quicksettings
Test: atest cts/hostsidetests/systemui
Bug: 301055700
Change-Id: Ie33f8a63011d33811a549cdd7f146ca1332bcda8
parent b8917ff0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ package {
        "//frameworks/base/packages/SystemUI:__subpackages__",
        "//frameworks/libs/systemui/tracinglib:__subpackages__",
        "//platform_testing:__subpackages__",
        "//cts:__subpackages__",
    ],
}

+1 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ class CustomTileInteractorTest : SysuiTestCase() {
    private val underTest: CustomTileInteractor =
        with(kosmos) {
            CustomTileInteractor(
                tileSpec,
                customTileDefaultsRepository,
                customTileRepository,
                testScope.backgroundScope,
+5 −1
Original line number Diff line number Diff line
@@ -259,7 +259,11 @@ public class TileQueryHelper {
    private State getState(Collection<QSTile> tiles, String spec) {
        for (QSTile tile : tiles) {
            if (spec.equals(tile.getTileSpec())) {
                if (tile.isTileReady()) {
                    return tile.getState().copy();
                } else {
                    return null;
                }
            }
        }
        return null;
+1 −1
Original line number Diff line number Diff line
@@ -319,7 +319,7 @@ constructor(

    override fun dumpProto(systemUIProtoDump: SystemUIProtoDump, args: Array<String>) {
        val data =
            currentTiles.value.map { it.tile.state }.mapNotNull { it.toProto() }.toTypedArray()
            currentTiles.value.map { it.tile.state }.mapNotNull { it?.toProto() }.toTypedArray()
        systemUIProtoDump.tiles = data
    }

+5 −1
Original line number Diff line number Diff line
@@ -63,6 +63,10 @@ constructor(private val activityStarter: ActivityStarter) : QSTileIntentUserInpu
                    InteractionJankMonitor.CUJ_SHADE_APP_LAUNCH_FROM_QS_TILE,
                )
            }
        activityStarter.postStartActivityDismissingKeyguard(pendingIntent, animationController)
        activityStarter.startPendingIntentMaybeDismissingKeyguard(
            pendingIntent,
            null,
            animationController
        )
    }
}
Loading