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

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

Merge "Add Config for hearing devices tile" into main

parents bdf83f04 37bce7bb
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.