summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Anthony Alridge <anthonyalridge@google.com> 2023-05-09 18:50:47 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2023-05-09 18:50:47 +0000
commit0c2225bf76516864d19f4370d4a13647dfc8aa7d (patch)
tree3fb74c12ecdea275c4923ce188c2151d518bbab9
parent3c8941cb62a3c5b3b66720172769c8338109170d (diff)
parent6f00b41003e6643dc924e10ee2a378b134832fed (diff)
Merge "Update strings for mini-resolver views" into udc-dev am: 829775a61b am: 9c4684c458 am: 6f00b41003
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23028637 Change-Id: I8b4cc68b2bff70b353a687bdcd65a58c9be49326 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--core/java/android/app/admin/DevicePolicyResources.java7
-rw-r--r--core/java/com/android/internal/app/IntentForwarderActivity.java6
-rw-r--r--core/res/res/values/strings.xml7
-rw-r--r--core/res/res/values/symbols.xml1
4 files changed, 15 insertions, 6 deletions
diff --git a/core/java/android/app/admin/DevicePolicyResources.java b/core/java/android/app/admin/DevicePolicyResources.java
index 77ba560f29a1..f4dc6ba5e2de 100644
--- a/core/java/android/app/admin/DevicePolicyResources.java
+++ b/core/java/android/app/admin/DevicePolicyResources.java
@@ -1857,6 +1857,13 @@ public final class DevicePolicyResources {
public static final String MINIRESOLVER_OPEN_IN_PERSONAL =
PREFIX + "MINIRESOLVER_OPEN_IN_PERSONAL";
+ /**
+ * Title for a dialog shown when the user has no apps capable of handling an intent
+ * in the personal profile, and must choose whether to open the intent in a
+ * cross-profile app in the work profile, or cancel. Accepts the app name as a param.
+ */
+ public static final String MINIRESOLVER_OPEN_WORK = PREFIX + "MINIRESOLVER_OPEN_WORK";
+
public static final String MINIRESOLVER_USE_WORK_BROWSER =
PREFIX + "MINIRESOLVER_OPEN_IN_PERSONAL";
diff --git a/core/java/com/android/internal/app/IntentForwarderActivity.java b/core/java/com/android/internal/app/IntentForwarderActivity.java
index 44d517ad0c32..904fb665335b 100644
--- a/core/java/com/android/internal/app/IntentForwarderActivity.java
+++ b/core/java/com/android/internal/app/IntentForwarderActivity.java
@@ -19,7 +19,7 @@ package com.android.internal.app;
import static android.Manifest.permission.INTERACT_ACROSS_USERS;
import static android.app.admin.DevicePolicyResources.Strings.Core.FORWARD_INTENT_TO_PERSONAL;
import static android.app.admin.DevicePolicyResources.Strings.Core.FORWARD_INTENT_TO_WORK;
-import static android.app.admin.DevicePolicyResources.Strings.Core.MINIRESOLVER_OPEN_IN_WORK;
+import static android.app.admin.DevicePolicyResources.Strings.Core.MINIRESOLVER_OPEN_WORK;
import static android.content.pm.PackageManager.MATCH_DEFAULT_ONLY;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
@@ -227,8 +227,8 @@ public class IntentForwarderActivity extends Activity {
private String getOpenInWorkMessage(CharSequence targetLabel) {
return getSystemService(DevicePolicyManager.class).getResources().getString(
- MINIRESOLVER_OPEN_IN_WORK,
- () -> getString(R.string.miniresolver_open_in_work, targetLabel),
+ MINIRESOLVER_OPEN_WORK,
+ () -> getString(R.string.miniresolver_open_work, targetLabel),
targetLabel);
}
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 4ed4653d2f23..73f973a340fe 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -5918,11 +5918,12 @@
<!-- Error message. This text lets the user know that their current personal apps don't support the specific content. [CHAR LIMIT=NONE] -->
<string name="resolver_no_personal_apps_available">No personal apps</string>
-
+ <!-- Dialog title. User must choose to open content in a cross-profile app or cancel. [CHAR LIMIT=NONE] -->
+ <string name="miniresolver_open_work">Open work <xliff:g id="app" example="YouTube">%s</xliff:g>?</string>
<!-- Dialog title. User must choose between opening content in a cross-profile app or same-profile browser. [CHAR LIMIT=NONE] -->
- <string name="miniresolver_open_in_personal">Open personal <xliff:g id="app" example="YouTube">%s</xliff:g></string>
+ <string name="miniresolver_open_in_personal">Open in personal <xliff:g id="app" example="YouTube">%s</xliff:g>?</string>
<!-- Dialog title. User must choose between opening content in a cross-profile app or same-profile browser. [CHAR LIMIT=NONE] -->
- <string name="miniresolver_open_in_work">Open work <xliff:g id="app" example="YouTube">%s</xliff:g></string>
+ <string name="miniresolver_open_in_work">Open in work <xliff:g id="app" example="YouTube">%s</xliff:g>?</string>
<!-- Button option. Open the link in the personal browser. [CHAR LIMIT=NONE] -->
<string name="miniresolver_use_personal_browser">Use personal browser</string>
<!-- Button option. Open the link in the work browser. [CHAR LIMIT=NONE] -->
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 43a10e0b34e8..0a5e0cab26ef 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -1576,6 +1576,7 @@
<java-symbol type="id" name="open_cross_profile" />
<java-symbol type="string" name="miniresolver_open_in_personal" />
<java-symbol type="string" name="miniresolver_open_in_work" />
+ <java-symbol type="string" name="miniresolver_open_work" />
<java-symbol type="string" name="miniresolver_use_personal_browser" />
<java-symbol type="string" name="miniresolver_use_work_browser" />
<java-symbol type="id" name="button_open" />