summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nate Myren <ntmyren@google.com> 2025-02-26 09:19:16 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2025-02-26 09:19:16 -0800
commit754c07eaf8d929ecabb0b2a2059bf8899ec593c1 (patch)
treebf5affe3132a03027c7d878b6ba6dfb86835b702
parentef4d8f0837c7b00b083cc0dbe66382846a97eb5e (diff)
parent3ca5aef3f3705b046bd88980b3a17e8b6ca38e48 (diff)
Merge "Minor ECM in call dialog UX updates" into main
-rw-r--r--PermissionController/res/values/strings.xml12
-rw-r--r--PermissionController/src/com/android/permissioncontroller/ecm/EnhancedConfirmationDialogActivity.kt15
2 files changed, 12 insertions, 15 deletions
diff --git a/PermissionController/res/values/strings.xml b/PermissionController/res/values/strings.xml
index 5dc571f45..f5a997674 100644
--- a/PermissionController/res/values/strings.xml
+++ b/PermissionController/res/values/strings.xml
@@ -2029,17 +2029,15 @@
<!--Title for dialog displayed to tell user that settings are blocked due to the phone state (such as being in a call with an unknown number) [CHAR LIMIT=50] -->
<string name="enhanced_confirmation_phone_state_dialog_title">Can\u2019t complete action during call</string>
<!--Content for dialog displayed to tell user that settings are blocked due to the phone state (such as being in a call with an unknown number) [CHAR LIMIT=NONE] -->
- <string name="enhanced_confirmation_phone_state_dialog_desc"><xliff:g id="setting_description" example="allowing apps to install other apps">%1$s</xliff:g>\n\n
- This setting is blocked to protect your device and data</string>
+ <string name="enhanced_confirmation_phone_state_dialog_desc">This setting is blocked to protect your device and data.<xliff:g id="scam_use_setting_description" example="scammers may ask you to allow apps to install other apps">%1$s</xliff:g></string>
<!--Content explaining that the "install other apps" setting is blocked due to the phone state in a dialog displayed to the user [CHAR LIMIT=NONE] -->
- <string name="enhanced_confirmation_phone_state_dialog_install_desc_prefix">Scammers may try to install harmful apps by asking you to install unknown apps from a new source.</string>
+ <string name="enhanced_confirmation_phone_state_dialog_install_desc"><xliff:g id="empty_line">\n\n</xliff:g>Scammers may try to install harmful apps by asking you to install unknown apps from a new source.</string>
<!--Content explaining that the "enable accessibility service" setting is blocked due to the phone state in a dialog displayed to the user [CHAR LIMIT=NONE] -->
- <string name="enhanced_confirmation_phone_state_dialog_a11y_desc_prefix">Scammers may try to take control of your device by asking you to allow accessibility access for an app.</string>
-
- <!--Content explaining that a generic setting is blocked due to the phone state in a dialog displayed to the user [CHAR LIMIT=NONE] -->
- <string name="enhanced_confirmation_phone_state_dialog_generic_desc_prefix">Scammers may attempt to harm your device with this setting.</string>
+ <string name="enhanced_confirmation_phone_state_dialog_a11y_desc"><xliff:g id="empty_line">\n\n</xliff:g>Scammers may try to take control of your device by asking you to allow accessibility access for an app.</string>
+ <!--Content explaining that a generic setting is blocked due to the phone state in a dialog displayed to the user. currently empty [CHAR LIMIT=NONE] -->
+ <string name="enhanced_confirmation_phone_state_dialog_generic_desc" />
<!--Title for dialog displayed to tell user that permissions are blocked by setting restrictions [CHAR LIMIT=50] -->
<string name="enhanced_confirmation_dialog_title_permission">App was denied access to <xliff:g id="permission_name" example="contacts">%1$s</xliff:g></string>
diff --git a/PermissionController/src/com/android/permissioncontroller/ecm/EnhancedConfirmationDialogActivity.kt b/PermissionController/src/com/android/permissioncontroller/ecm/EnhancedConfirmationDialogActivity.kt
index d3c7e3a0b..c5191938e 100644
--- a/PermissionController/src/com/android/permissioncontroller/ecm/EnhancedConfirmationDialogActivity.kt
+++ b/PermissionController/src/com/android/permissioncontroller/ecm/EnhancedConfirmationDialogActivity.kt
@@ -153,8 +153,8 @@ class EnhancedConfirmationDialogActivity : FragmentActivity() {
var message: CharSequence?
if (settingType == SettingType.BLOCKED_DUE_TO_PHONE_STATE) {
title = settingType.titleRes?.let { context.getString(it) }
- val messagePrefix = getPhoneStateMessagePrefix(context, settingIdentifier)
- message = settingType.messageRes?.let { context.getString(it, messagePrefix) }
+ val settingMessage = getPhoneStateSettingMessage(context, settingIdentifier)
+ message = settingType.messageRes?.let { context.getString(it, settingMessage) }
} else {
val url =
context.getString(R.string.help_url_action_disabled_by_restricted_settings)
@@ -165,18 +165,17 @@ class EnhancedConfirmationDialogActivity : FragmentActivity() {
return Setting(title, message)
}
- private fun getPhoneStateMessagePrefix(
+ private fun getPhoneStateSettingMessage(
context: Context,
settingsIdentifier: String,
): String {
return context.getString(
when (settingsIdentifier) {
AppOpsManager.OPSTR_BIND_ACCESSIBILITY_SERVICE ->
- R.string.enhanced_confirmation_phone_state_dialog_a11y_desc_prefix
+ R.string.enhanced_confirmation_phone_state_dialog_a11y_desc
AppOpsManager.OPSTR_REQUEST_INSTALL_PACKAGES ->
- R.string.enhanced_confirmation_phone_state_dialog_install_desc_prefix
- else ->
- R.string.enhanced_confirmation_phone_state_dialog_generic_desc_prefix
+ R.string.enhanced_confirmation_phone_state_dialog_install_desc
+ else -> R.string.enhanced_confirmation_phone_state_dialog_generic_desc
}
)
}
@@ -278,7 +277,7 @@ class EnhancedConfirmationDialogActivity : FragmentActivity() {
return AlertDialog.Builder(dialogActivity)
.setView(createDialogView(dialogActivity, title, message))
- .setPositiveButton(R.string.enhanced_confirmation_dialog_ok) { _, _ ->
+ .setPositiveButton(R.string.dialog_close) { _, _ ->
dialogActivity.onDialogResult(DialogResult.Okay)
}
.create()