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

Commit 4ea63690 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add info section to the private space mini resolver" into main

parents a4cdb803 123619c6
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -272,6 +272,7 @@ public class IntentForwarderActivity extends Activity {
                getOpenInWorkMessage(launchIntent, target.loadLabel(packageManagerForTargetUser)),
                packageManagerForTargetUser);

        ((Button) findViewById(R.id.button_open)).setText(getOpenInWorkButtonString(launchIntent));

        View telephonyInfo = findViewById(R.id.miniresolver_info_section);

@@ -310,7 +311,15 @@ public class IntentForwarderActivity extends Activity {
                packageManagerForTargetUser);

        View telephonyInfo = findViewById(R.id.miniresolver_info_section);
        telephonyInfo.setVisibility(View.GONE);
        telephonyInfo.setVisibility(View.VISIBLE);

        if (isTextMessageIntent(launchIntent)) {
            ((TextView) findViewById(R.id.miniresolver_info_section_text)).setText(
                    R.string.miniresolver_private_space_messages_information);
        } else {
            ((TextView) findViewById(R.id.miniresolver_info_section_text)).setText(
                    R.string.miniresolver_private_space_phone_information);
        }
    }

    private void buildMiniResolver(ResolveInfo target, Intent launchIntent, int targetUserId,
@@ -334,7 +343,6 @@ public class IntentForwarderActivity extends Activity {
        ((Button) findViewById(R.id.use_same_profile_browser)).setText(R.string.cancel);
        findViewById(R.id.use_same_profile_browser).setOnClickListener(v -> finish());

        ((Button) findViewById(R.id.button_open)).setText(getOpenInWorkButtonString(launchIntent));
        findViewById(R.id.button_open).setOnClickListener(v -> {
            startActivityAsCaller(
                    launchIntent,
+4 −0
Original line number Diff line number Diff line
@@ -6050,6 +6050,10 @@
    <!-- Dialog text.  Shown when the user is unable to send a text message from a personal app due to restrictions set
         by their organization, and so must switch to a work app or cancel. [CHAR LIMIT=NONE] -->
    <string name="miniresolver_sms_information">Your organization only allows you to send messages from work apps</string>
    <!-- Dialog text. Shown as when redirecting Calls from Private Space to the main user. [CHAR LIMIT=NONE] -->
    <string name="miniresolver_private_space_phone_information">"You can only make phone calls from your personal Phone app. Calls made with personal Phone will be added to your personal call history."</string>
    <!-- Dialog text. Shown as when redirecting SMS and MMS messages from Private Space to the main user. [CHAR LIMIT=NONE] -->
    <string name="miniresolver_private_space_messages_information">"You can only send SMS messages from your personal Messages app."</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] -->
+2 −0
Original line number Diff line number Diff line
@@ -1628,6 +1628,8 @@
  <java-symbol type="string" name="miniresolver_switch" />
  <java-symbol type="string" name="miniresolver_call_information" />
  <java-symbol type="string" name="miniresolver_sms_information" />
  <java-symbol type="string" name="miniresolver_private_space_phone_information" />
  <java-symbol type="string" name="miniresolver_private_space_messages_information" />
  <java-symbol type="id" name="miniresolver_info_section" />
  <java-symbol type="id" name="miniresolver_info_section_text" />
  <java-symbol type="id" name="button_open" />