Merge "Update strings for mini-resolver views" into udc-dev
diff --git a/core/java/android/app/admin/DevicePolicyResources.java b/core/java/android/app/admin/DevicePolicyResources.java
index 77ba560..f4dc6ba 100644
--- a/core/java/android/app/admin/DevicePolicyResources.java
+++ b/core/java/android/app/admin/DevicePolicyResources.java
@@ -1857,6 +1857,13 @@
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 44d517a..904fb66 100644
--- a/core/java/com/android/internal/app/IntentForwarderActivity.java
+++ b/core/java/com/android/internal/app/IntentForwarderActivity.java
@@ -19,7 +19,7 @@
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 @@
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 a49ea0b..027d4f8 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -5912,11 +5912,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 312e291..73e3b41 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" />