summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Fabian Kozynski <kozynski@google.com> 2020-05-05 13:37:51 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-05-05 13:37:51 +0000
commite34b13244202e7b43325956a30f53d6235d3391a (patch)
treeb6444bb903f4e422f1fb9d73d15d8eaa996c9ded
parent976c089ff704fd61fc4c6c6bda7b6d56bf5009c9 (diff)
parent4429ee6d93b955ec492b618ebf1fffe96f12bf4a (diff)
Merge "Fix redlines and strings in Controls dialog" into rvc-dev
-rw-r--r--packages/SystemUI/AndroidManifest.xml2
-rw-r--r--packages/SystemUI/res/layout/controls_dialog.xml2
-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.xml6
-rw-r--r--packages/SystemUI/src/com/android/systemui/controls/management/ControlsRequestReceiver.kt1
6 files changed, 11 insertions, 8 deletions
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index c483d0ec31e1..61b1e30845b3 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -719,7 +719,7 @@
android:finishOnCloseSystemDialogs="true"
android:showForAllUsers="true"
android:clearTaskOnLaunch="true"
- android:launchMode="singleTask"
+ android:launchMode="singleInstance"
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation|keyboard|keyboardHidden"
android:excludeFromRecents="true"
android:visibleToInstantApps="true"/>
diff --git a/packages/SystemUI/res/layout/controls_dialog.xml b/packages/SystemUI/res/layout/controls_dialog.xml
index 3effaf5fac5b..5ce9916b0489 100644
--- a/packages/SystemUI/res/layout/controls_dialog.xml
+++ b/packages/SystemUI/res/layout/controls_dialog.xml
@@ -18,8 +18,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:padding="@dimen/controls_dialog_padding"
- android:layout_margin="@dimen/controls_dialog_padding"
>
<include
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index c68c814532fe..2cbb49801aa8 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -1310,7 +1310,7 @@
<dimen name="controls_card_margin">2dp</dimen>
<item name="control_card_elevation" type="dimen" format="float">15</item>
- <dimen name="controls_dialog_padding">8dp</dimen>
+ <dimen name="controls_dialog_padding">32dp</dimen>
<dimen name="controls_dialog_control_width">200dp</dimen>
<!-- Screen Record -->
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 2b3e661c4f7e..96843f187f72 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -2710,9 +2710,9 @@
<!-- Controls dialog title [CHAR LIMIT=40] -->
<string name="controls_dialog_title">Add to device controls</string>
<!-- Controls dialog add to favorites [CHAR LIMIT=40] -->
- <string name="controls_dialog_ok">Add to favorites</string>
- <!-- Controls dialog message [CHAR LIMIT=NONE] -->
- <string name="controls_dialog_message"><xliff:g id="app" example="System UI">%s</xliff:g> suggested this control to add to your favorites.</string>
+ <string name="controls_dialog_ok">Add</string>
+ <!-- Controls dialog message. Indicates app that suggested this control [CHAR LIMIT=NONE] -->
+ <string name="controls_dialog_message">Suggested by <xliff:g id="app" example="System UI">%s</xliff:g></string>
<!-- Controls dialog confirmation [CHAR LIMIT=30] -->
<string name="controls_dialog_confirmation">Controls updated</string>
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index 6e25625d3b88..b5e7f4bc061e 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -768,6 +768,10 @@
<item name="android:textSize">16sp</item>
</style>
- <style name="Theme.ControlsRequestDialog" parent="@style/Theme.SystemUI.MediaProjectionAlertDialog"/>
+ <!-- The attributes used for title (textAppearanceLarge) and message (textAppearanceMedium)
+ are already as necessary:
+ * Title: headline, medium 20sp
+ * Message: body, 16 sp -->
+ <style name="Theme.ControlsRequestDialog" parent="@*android:style/Theme.DeviceDefault.Dialog.Alert"/>
</resources>
diff --git a/packages/SystemUI/src/com/android/systemui/controls/management/ControlsRequestReceiver.kt b/packages/SystemUI/src/com/android/systemui/controls/management/ControlsRequestReceiver.kt
index 5c30b5a5bf45..0d23557ffa9e 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/management/ControlsRequestReceiver.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/management/ControlsRequestReceiver.kt
@@ -70,6 +70,7 @@ class ControlsRequestReceiver : BroadcastReceiver() {
ControlsProviderService.EXTRA_CONTROL.let {
putExtra(it, intent.getParcelableExtra<Control>(it))
}
+ addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_REORDER_TO_FRONT)
}
activityIntent.putExtra(Intent.EXTRA_USER_ID, context.userId)