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

Commit 329dafe3 authored by Anton Potapov's avatar Anton Potapov Committed by Android (Google) Code Review
Browse files

Merge "Migrate CustomTile to the new infra" into main

parents 5c58bc4f 7b553cfb
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -25,6 +25,7 @@ package {
        "//frameworks/base/packages/SystemUI:__subpackages__",
        "//frameworks/base/packages/SystemUI:__subpackages__",
        "//frameworks/libs/systemui/tracinglib:__subpackages__",
        "//frameworks/libs/systemui/tracinglib:__subpackages__",
        "//platform_testing:__subpackages__",
        "//platform_testing:__subpackages__",
        "//cts:__subpackages__",
    ],
    ],
}
}


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


    override fun dumpProto(systemUIProtoDump: SystemUIProtoDump, args: Array<String>) {
    override fun dumpProto(systemUIProtoDump: SystemUIProtoDump, args: Array<String>) {
        val data =
        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
        systemUIProtoDump.tiles = data
    }
    }


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