Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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 -->
......
......@@ -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
......
......@@ -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
......
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment