Merge "Update strings and UX for fgs manager" into tm-dev am: b207bfefaa

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17764651

Change-Id: Iadae83f8eac437922884a9e7876aee0f640ab030
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Evan Severson
2022-04-14 23:28:24 +00:00
committed by Automerger Merge Worker
4 changed files with 10 additions and 4 deletions

View File

@@ -1364,7 +1364,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>

View File

@@ -2453,14 +2453,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]-->

View File

@@ -1101,6 +1101,7 @@
<style name="FgsManagerAppLabel" parent="TextAppearance.Dialog.Body">
<item name="android:textDirection">locale</item>
<item name="android:textStyle">bold</item>
</style>
<style name="FgsManagerAppDuration">

View File

@@ -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