Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 829775a6 authored by Anthony Alridge's avatar Anthony Alridge Committed by Android (Google) Code Review
Browse files

Merge "Update strings for mini-resolver views" into udc-dev

parents cadaf0c5 909ade51
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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";

+3 −3
Original line number Diff line number Diff line
@@ -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);
    }

+4 −3
Original line number Diff line number Diff line
@@ -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] -->
+1 −0
Original line number Diff line number Diff line
@@ -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" />