summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Evan Severson <evanseverson@google.com> 2022-04-14 12:13:36 -0700
committer Evan Severson <evanseverson@google.com> 2022-04-14 13:10:37 -0700
commita649454ebebb16d6a733dd70bb492932bcce6c7a (patch)
tree1097df54b40b00ae295092b9c485d5cce31b9b77
parent093e53922624bba1e76a164247b3b063e07e4adc (diff)
Update strings and UX for fgs manager
Test: Manual Bug: 226940828 Change-Id: Ifaf4d3848cba6661f03f31bf23f2efdf4e76fbba
-rw-r--r--packages/SystemUI/res/values/dimens.xml2
-rw-r--r--packages/SystemUI/res/values/strings.xml6
-rw-r--r--packages/SystemUI/res/values/styles.xml1
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/FgsManagerController.kt5
4 files changed, 10 insertions, 4 deletions
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index d14840317197..322dc5f40170 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -1368,7 +1368,7 @@
<dimen name="keyguard_unfold_translation_x">16dp</dimen>
- <dimen name="fgs_manager_min_width_minor">100%</dimen>
+ <dimen name="fgs_manager_list_top_spacing">12dp</dimen>
<!-- Dream overlay related dimensions -->
<dimen name="dream_overlay_status_bar_height">60dp</dimen>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 0f5115b5c0f5..f7acda7ec379 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -2440,14 +2440,16 @@
<!-- Label for the entry point to open the dialog which shows currently running applications [CHAR LIMIT=NONE]-->
<plurals name="fgs_manager_footer_label">
- <item quantity="one"><xliff:g id="count" example="1">%s</xliff:g> active app</item>
- <item quantity="other"><xliff:g id="count" example="2">%s</xliff:g> active apps</item>
+ <item quantity="one"><xliff:g id="count" example="1">%s</xliff:g> app is active</item>
+ <item quantity="other"><xliff:g id="count" example="2">%s</xliff:g> apps are active</item>
</plurals>
<!-- Content description for a dot indicator in the running application indicating that there
is new information [CHAR LIMIT=NONE] -->
<string name="fgs_dot_content_description">New information</string>
<!-- Title for dialog listing applications currently running [CHAR LIMIT=NONE]-->
<string name="fgs_manager_dialog_title">Active apps</string>
+ <!-- Detailed message for dialog listing applications currently running [CHAR LIMIT=NONE]-->
+ <string name="fgs_manager_dialog_message">Even if you\u2019re not using these apps, they\u2019re still active and might affect battery life</string>
<!-- Label of the button to stop an app from running [CHAR LIMIT=12]-->
<string name="fgs_manager_app_item_stop_button_label">Stop</string>
<!-- Label of the button to stop an app from running but the app is already stopped and the button is disabled [CHAR LIMIT=12]-->
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index d7799a7addd1..e4705622c7f4 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -1085,6 +1085,7 @@
<style name="FgsManagerAppLabel" parent="TextAppearance.Dialog.Body">
<item name="android:textDirection">locale</item>
+ <item name="android:textStyle">bold</item>
</style>
<style name="FgsManagerAppDuration">
diff --git a/packages/SystemUI/src/com/android/systemui/qs/FgsManagerController.kt b/packages/SystemUI/src/com/android/systemui/qs/FgsManagerController.kt
index cc37ef40321c..13340b7245fa 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/FgsManagerController.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/FgsManagerController.kt
@@ -234,6 +234,7 @@ class FgsManagerController @Inject constructor(
val dialog = SystemUIDialog(context)
dialog.setTitle(R.string.fgs_manager_dialog_title)
+ dialog.setMessage(R.string.fgs_manager_dialog_message)
val dialogContext = dialog.context
@@ -241,7 +242,9 @@ class FgsManagerController @Inject constructor(
recyclerView.layoutManager = LinearLayoutManager(dialogContext)
recyclerView.adapter = appListAdapter
- dialog.setView(recyclerView)
+ val topSpacing = dialogContext.resources
+ .getDimensionPixelSize(R.dimen.fgs_manager_list_top_spacing)
+ dialog.setView(recyclerView, 0, topSpacing, 0, 0)
this.dialog = dialog