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

Commit aa278973 authored by Stefan Andonian's avatar Stefan Andonian Committed by Android (Google) Code Review
Browse files

Merge "Add the Record Issue QS Tile to the list of stock tiles so it can be...

Merge "Add the Record Issue QS Tile to the list of stock tiles so it can be manually added to user's tile configurations if desired, and the correct flag is enabled." into main
parents 43ff4a40 5327b118
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@

    <!-- Tiles native to System UI. Order should match "quick_settings_tiles_default" -->
    <string name="quick_settings_tiles_stock" translatable="false">
        internet,bt,flashlight,dnd,alarm,airplane,controls,wallet,rotation,battery,cast,screenrecord,mictoggle,cameratoggle,location,hotspot,inversion,saver,dark,work,night,reverse,reduce_brightness,qr_code_scanner,onehanded,color_correction,dream,font_scaling
        internet,bt,flashlight,dnd,alarm,airplane,controls,wallet,rotation,battery,cast,screenrecord,mictoggle,cameratoggle,location,hotspot,inversion,saver,dark,work,night,reverse,reduce_brightness,qr_code_scanner,onehanded,color_correction,dream,font_scaling,record_issue
    </string>

    <!-- The tiles to display in QuickSettings -->
+10 −0
Original line number Diff line number Diff line
@@ -222,6 +222,16 @@
        <item>On</item>
    </string-array>

    <!-- State names for record_issue tile: unavailable, off, on.
         This subtitle is shown when the tile is in that particular state but does not set its own
         subtitle, so some of these may never appear on screen. They should still be translated as
         if they could appear. [CHAR LIMIT=32] -->
    <string-array name="tile_states_record_issue">
        <item>Unavailable</item>
        <item>Off</item>
        <item>On</item>
    </string-array>

    <!-- State names for reverse (charging) tile: unavailable, off, on.
         This subtitle is shown when the tile is in that particular state but does not set its own
         subtitle, so some of these may never appear on screen. They should still be translated as
+1 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ object SubtitleArrayMapping {
        subtitleIdsMap["cast"] = R.array.tile_states_cast
        subtitleIdsMap["night"] = R.array.tile_states_night
        subtitleIdsMap["screenrecord"] = R.array.tile_states_screenrecord
        subtitleIdsMap["record_issue"] = R.array.tile_states_record_issue
        subtitleIdsMap["reverse"] = R.array.tile_states_reverse
        subtitleIdsMap["reduce_brightness"] = R.array.tile_states_reduce_brightness
        subtitleIdsMap["cameratoggle"] = R.array.tile_states_cameratoggle
+7 −1
Original line number Diff line number Diff line
@@ -85,7 +85,13 @@ constructor(

    override fun getTileLabel(): CharSequence = mContext.getString(R.string.qs_record_issue_label)

    override fun isAvailable(): Boolean = recordIssueQsTile()
    /**
     * There are SELinux constraints that are stopping this tile from reaching production builds.
     * Once those are resolved, this condition will be removed, but the solution (of properly
     * creating a distince SELinux context for com.android.systemui) is complex and will take time
     * to implement.
     */
    override fun isAvailable(): Boolean = android.os.Build.IS_DEBUGGABLE && recordIssueQsTile()

    override fun newTileState(): QSTile.BooleanState =
        QSTile.BooleanState().apply {