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

Commit d1f854d2 authored by Cliff Wu's avatar Cliff Wu
Browse files

Fix generic wrong strings to comply with the UX guideline

- The generic error need to remove "Unavailable" in the header and
only show body text.
- The "Play Store" app needs to be added to the error for a specific
app and it says "Play Store not available".
- Dialer app uses generic alert dialog.

Bug: 230048652
Test: Manual, atest FrameworksServicesTests:VirtualDeviceManagerServiceTest
Change-Id: I8b56e2804c3204901a3551d3300ab8c0391e7260
parent 43a2a757
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ public class BlockedAppStreamingActivity extends AlertActivity {
    private static final String EXTRA_BLOCKED_ACTIVITY_INFO =
            PACKAGE_NAME + ".extra.BLOCKED_ACTIVITY_INFO";
    private static final String EXTRA_STREAMED_DEVICE = PACKAGE_NAME + ".extra.STREAMED_DEVICE";
    private static final String BLOCKED_COMPONENT_PLAYSTORE = "com.android.vending";
    private static final String BLOCKED_COMPONENT_SETTINGS = "com.android.settings";

    @Override
@@ -62,21 +63,25 @@ public class BlockedAppStreamingActivity extends AlertActivity {
                mAlertParams.mTitle =
                        getString(R.string.app_streaming_blocked_title_for_permission_dialog);
                mAlertParams.mMessage =
                        getString(R.string.app_streaming_blocked_message_for_permission_dialog,
                                streamedDeviceName);
                        getString(R.string.app_streaming_blocked_message, streamedDeviceName);
            } else if (TextUtils.equals(activityInfo.packageName, BLOCKED_COMPONENT_PLAYSTORE)) {
                mAlertParams.mTitle =
                        getString(R.string.app_streaming_blocked_title_for_playstore_dialog);
                mAlertParams.mMessage =
                        getString(R.string.app_streaming_blocked_message, streamedDeviceName);
            } else if (TextUtils.equals(activityInfo.packageName, BLOCKED_COMPONENT_SETTINGS)) {
                mAlertParams.mTitle =
                        getString(R.string.app_streaming_blocked_title_for_settings_dialog);
                mAlertParams.mMessage =
                        getString(R.string.app_streaming_blocked_message, streamedDeviceName);
                        getString(R.string.app_streaming_blocked_message_for_settings_dialog,
                                streamedDeviceName);
            } else {
                mAlertParams.mTitle =
                        getString(R.string.app_streaming_blocked_title, appLabel);
                // No title required
                mAlertParams.mMessage =
                        getString(R.string.app_streaming_blocked_message, streamedDeviceName);
            }
        } else {
            mAlertParams.mTitle = getString(R.string.app_blocked_title);
            // No title required
            mAlertParams.mMessage = getString(R.string.app_blocked_message, appLabel);
        }
        mAlertParams.mPositiveButtonText = getString(android.R.string.ok);
+11 −9
Original line number Diff line number Diff line
@@ -5479,6 +5479,8 @@
    <string name="app_streaming_blocked_title_for_fingerprint_dialog">Continue on phone</string>
    <!-- Title of the dialog shown when the microphone permission is blocked from being streamed to a remote device. [CHAR LIMIT=NONE] -->
    <string name="app_streaming_blocked_title_for_microphone_dialog">Microphone unavailable</string>
    <!-- Title of the dialog shown when the play store is blocked from being streamed to a remote device. [CHAR LIMIT=NONE] -->
    <string name="app_streaming_blocked_title_for_playstore_dialog">Play Store unavailable</string>
    <!-- Title of the dialog shown when the settings is blocked from being streamed to a remote device. [CHAR LIMIT=NONE] -->
    <string name="app_streaming_blocked_title_for_settings_dialog" product="tv">Android TV settings unavailable</string>
    <!-- Title of the dialog shown when the settings is blocked from being streamed to a remote device. [CHAR LIMIT=NONE] -->
@@ -5486,23 +5488,23 @@
    <!-- Title of the dialog shown when the settings is blocked from being streamed to a remote device. [CHAR LIMIT=NONE] -->
    <string name="app_streaming_blocked_title_for_settings_dialog" product="default">Phone settings unavailable</string>
    <!-- Message shown when an app is blocked from being streamed to a remote device. [CHAR LIMIT=NONE] -->
    <string name="app_streaming_blocked_message" product="tv">This can’t be accessed on your <xliff:g id="device" example="Chromebook">%1$s</xliff:g>. Try on your Android TV device instead.</string>
    <string name="app_streaming_blocked_message" product="tv">This can’t be accessed on your <xliff:g id="device" example="Chromebook">%1$s</xliff:g> at this time. Try on your Android TV device instead.</string>
    <!-- Message shown when an app is blocked from being streamed to a remote device. [CHAR LIMIT=NONE] -->
    <string name="app_streaming_blocked_message" product="tablet">This can’t be accessed on your <xliff:g id="device" example="Chromebook">%1$s</xliff:g>. Try on your tablet instead.</string>
    <string name="app_streaming_blocked_message" product="tablet">This can’t be accessed on your <xliff:g id="device" example="Chromebook">%1$s</xliff:g> at this time. Try on your tablet instead.</string>
    <!-- Message shown when an app is blocked from being streamed to a remote device. [CHAR LIMIT=NONE] -->
    <string name="app_streaming_blocked_message" product="default">This can’t be accessed on your <xliff:g id="device" example="Chromebook">%1$s</xliff:g>. Try on your phone instead.</string>
    <!-- Message shown when an app is blocked from being streamed to a remote device. [CHAR LIMIT=NONE] -->
    <string name="app_streaming_blocked_message_for_permission_dialog" product="tv">This can’t be accessed on your <xliff:g id="device" example="Chromebook">%1$s</xliff:g> at this time. Try on your Android TV device instead.</string>
    <!-- Message shown when an app is blocked from being streamed to a remote device. [CHAR LIMIT=NONE] -->
    <string name="app_streaming_blocked_message_for_permission_dialog" product="tablet">This can’t be accessed on your <xliff:g id="device" example="Chromebook">%1$s</xliff:g> at this time. Try on your tablet instead.</string>
    <!-- Message shown when an app is blocked from being streamed to a remote device. [CHAR LIMIT=NONE] -->
    <string name="app_streaming_blocked_message_for_permission_dialog" product="default">This can’t be accessed on your <xliff:g id="device" example="Chromebook">%1$s</xliff:g> at this time. Try on your phone instead.</string>
    <string name="app_streaming_blocked_message" product="default">This can’t be accessed on your <xliff:g id="device" example="Chromebook">%1$s</xliff:g> at this time. Try on your phone instead.</string>
    <!-- Message shown when the fingerprint permission is blocked from being streamed to a remote device. [CHAR LIMIT=NONE] -->
    <string name="app_streaming_blocked_message_for_fingerprint_dialog" product="tv">This app is requesting additional security. Try on your Android TV device instead.</string>
    <!-- Message shown when the fingerprint permission is blocked from being streamed to a remote device. [CHAR LIMIT=NONE] -->
    <string name="app_streaming_blocked_message_for_fingerprint_dialog" product="tablet">This app is requesting additional security. Try on your tablet instead.</string>
    <!-- Message shown when the fingerprint permission is blocked from being streamed to a remote device. [CHAR LIMIT=NONE] -->
    <string name="app_streaming_blocked_message_for_fingerprint_dialog" product="default">This app is requesting additional security. Try on your phone instead.</string>
    <!-- Message shown when the settings is blocked from being streamed to a remote device. [CHAR LIMIT=NONE] -->
    <string name="app_streaming_blocked_message_for_settings_dialog" product="tv">This can’t be accessed on your <xliff:g id="device" example="Chromebook">%1$s</xliff:g>. Try on your Android TV device instead.</string>
    <!-- Message shown when the settings is blocked from being streamed to a remote device. [CHAR LIMIT=NONE] -->
    <string name="app_streaming_blocked_message_for_settings_dialog" product="tablet">This can’t be accessed on your <xliff:g id="device" example="Chromebook">%1$s</xliff:g>. Try on your tablet instead.</string>
    <!-- Message shown when the settings is blocked from being streamed to a remote device. [CHAR LIMIT=NONE] -->
    <string name="app_streaming_blocked_message_for_settings_dialog" product="default">This can’t be accessed on your <xliff:g id="device" example="Chromebook">%1$s</xliff:g>. Try on your phone instead.</string>

    <!-- Message displayed in dialog when app is too old to run on this verison of android. [CHAR LIMIT=NONE] -->
    <string name="deprecated_target_sdk_message">This app was built for an older version of Android and may not work properly. Try checking for updates, or contact the developer.</string>
+2 −1
Original line number Diff line number Diff line
@@ -3310,10 +3310,11 @@
  <java-symbol type="string" name="app_streaming_blocked_title_for_camera_dialog" />
  <java-symbol type="string" name="app_streaming_blocked_title_for_fingerprint_dialog" />
  <java-symbol type="string" name="app_streaming_blocked_title_for_microphone_dialog" />
  <java-symbol type="string" name="app_streaming_blocked_title_for_playstore_dialog" />
  <java-symbol type="string" name="app_streaming_blocked_title_for_settings_dialog" />
  <java-symbol type="string" name="app_streaming_blocked_message" />
  <java-symbol type="string" name="app_streaming_blocked_message_for_permission_dialog" />
  <java-symbol type="string" name="app_streaming_blocked_message_for_fingerprint_dialog" />
  <java-symbol type="string" name="app_streaming_blocked_message_for_settings_dialog" />

  <!-- Used internally for assistant to launch activity transitions -->
  <java-symbol type="id" name="cross_task_transition" />