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

Commit 123619c6 authored by Olivier Nshimiye's avatar Olivier Nshimiye
Browse files

Add info section to the private space mini resolver

Phone http://shortn/_uvrNNgAc4Y
Messages http://shortn/_tOR0LaAm1a

Bug: 333849606
Test: Manual - Verifier on the device
Change-Id: I84069aa2d776e15e85f58d5c19dd1b7d13eaf708
parent b5489f4b
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
@@ -6041,6 +6041,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
@@ -1625,6 +1625,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" />