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

Commit 37bce7bb authored by Fabián Kozynski's avatar Fabián Kozynski
Browse files

Add Config for hearing devices tile

That way, the new Edit mode will show the correct icon and label.

Bug: 363023752
Flag: com.android.systemui.qs_ui_refactor_compose_fragment
Flag: com.android.systemui.qs_new_tiles
Test: manual
Change-Id: I52d5a2e5cf328c8d4eca0f2169ee0fd6b5e9942a
parent 0e0eb496
Loading
Loading
Loading
Loading
+21 −6
Original line number Diff line number Diff line
@@ -165,6 +165,7 @@ interface QSAccessibilityModule {
        const val REDUCE_BRIGHTNESS_TILE_SPEC = "reduce_brightness"
        const val ONE_HANDED_TILE_SPEC = "onehanded"
        const val NIGHT_DISPLAY_TILE_SPEC = "night"
        const val HEARING_DEVICES_TILE_SPEC = "hearing_devices"

        @Provides
        @IntoMap
@@ -273,6 +274,20 @@ interface QSAccessibilityModule {
                instanceId = uiEventLogger.getNewInstanceId(),
            )

        @Provides
        @IntoMap
        @StringKey(HEARING_DEVICES_TILE_SPEC)
        fun provideHearingDevicesTileConfig(uiEventLogger: QsEventLogger): QSTileConfig =
            QSTileConfig(
                tileSpec = TileSpec.create(HEARING_DEVICES_TILE_SPEC),
                uiConfig =
                    QSTileUIConfig.Resource(
                        iconRes = R.drawable.qs_hearing_devices_icon,
                        labelRes = R.string.quick_settings_hearing_devices_label,
                    ),
                instanceId = uiEventLogger.getNewInstanceId(),
            )

        /**
         * Inject Reduce Bright Colors Tile into tileViewModelMap in QSModule. The tile is hidden
         * behind a flag.