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

Commit 7d77eecd authored by George Chan's avatar George Chan
Browse files

USB Advanced Protection: Updated the strings to new legal approved UX placeholders.

Test: Manual testing
Bug: 412433451
Flag: android.security.aapm_feature_usb_data_protection
Change-Id: Ie8fdba2e748bbce054144d8cfdefcd453d73bea0
parent 19b7013e
Loading
Loading
Loading
Loading
+10 −9
Original line number Diff line number Diff line
@@ -6858,21 +6858,22 @@ ul.</string>
    <!--  AdvancedProtectionService USB notifications -->
    <string name="usb_apm_usb_plugged_in_when_locked_notification_app_title">Security &amp; privacy</string>
    <string name="usb_apm_usb_plugged_in_when_locked_notification_title">Advanced Protection for USB</string>
    <string name="usb_apm_usb_plugged_in_when_locked_notification_title">Unlock your screen first</string>
    <string name="usb_apm_usb_plugged_in_when_locked_replug_notification_title">Unlock screen &amp; reconnect</string>
    <string name="usb_apm_usb_plugged_in_when_locked_notification_text">Unlock device for data transfer</string>
    <string name="usb_apm_usb_plugged_in_when_locked_replug_notification_text">You may need to unlock and reconnect your device for data transfer</string>
    <string name="usb_apm_usb_plugged_in_when_locked_notification_text">Advanced Protection requires your usual screen unlock for USB data transfers</string>
    <string name="usb_apm_usb_plugged_in_when_locked_replug_notification_text">Advanced Protection requires your usual screen unlock for USB data transfers</string>
    <string name="usb_apm_usb_plugged_in_when_locked_low_power_charge_notification_text">Unlock device for fast charging and data transferring</string>
    <string name="usb_apm_usb_plugged_in_when_locked_low_power_charge_replug_notification_text">You may need to unlock and reconnect your device for fast charging and data transferring</string>
    <string name="usb_apm_usb_plugged_in_when_locked_low_power_charge_notification_text">Advanced Protection requires your screen unlock for USB transfer or fast charging</string>
    <string name="usb_apm_usb_plugged_in_when_locked_low_power_charge_replug_notification_text">Advanced Protection requires your screen unlock for USB transfer or fast charging</string>
    <string name="usb_apm_usb_plugged_in_for_power_brick_notification_text">Unlock device for fast charging</string>
    <string name="usb_apm_usb_plugged_in_for_power_brick_replug_notification_text">You may need to unlock and reconnect your device for fast charging</string>
    <string name="usb_apm_usb_plugged_in_for_power_brick_notification_text">Advanced Protection requires your usual screen unlock for USB fast charging</string>
    <string name="usb_apm_usb_plugged_in_for_power_brick_replug_notification_text">Advanced Protection requires your usual screen unlock for USB fast charging</string>
    <string name="usb_apm_usb_plugged_in_when_locked_notification_silence_action_text">Silence</string>
    <string name="usb_apm_usb_notification_silenced_title">Notification silenced</string>
    <string name="usb_apm_usb_notification_silenced_text">Silenced until you restart your device</string>
    <string name="usb_apm_usb_notification_silenced_title">Notifications silenced</string>
    <string name="usb_apm_usb_notification_silenced_text">Advanced Protection USB notifications silenced until you restart device</string>
    <string name="usb_apm_usb_suspicious_activity_notification_title">Suspicious USB activity</string>
    <string name="usb_apm_usb_suspicious_activity_notification_text">USB data signal has been disabled.</string>
+1 −0
Original line number Diff line number Diff line
@@ -6190,6 +6190,7 @@

  <java-symbol type="string" name="usb_apm_usb_plugged_in_when_locked_notification_app_title" />
  <java-symbol type="string" name="usb_apm_usb_plugged_in_when_locked_notification_title" />
  <java-symbol type="string" name="usb_apm_usb_plugged_in_when_locked_replug_notification_title" />

  <java-symbol type="string" name="usb_apm_usb_plugged_in_when_locked_notification_text" />
  <java-symbol type="string" name="usb_apm_usb_plugged_in_when_locked_replug_notification_text" />
+24 −6
Original line number Diff line number Diff line
@@ -368,13 +368,20 @@ public class UsbDataAdvancedProtectionHook extends AdvancedProtectionHook {
                && mKeyguardManager.isKeyguardLocked()
                && usbPortIsConnectedWithDataDisabled(portStatus)) {

            String notificationTitle;
            String notificationBody;
            if (mReplugRequiredUponEnable) {
              notificationTitle =
                        mContext.getString(
                                R.string.usb_apm_usb_plugged_in_when_locked_replug_notification_title);
                notificationBody =
                        mContext.getString(
                                R.string
                                        .usb_apm_usb_plugged_in_for_power_brick_replug_notification_text);
            } else {
              notificationTitle =
                        mContext.getString(
                                R.string.usb_apm_usb_plugged_in_when_locked_notification_title);
                notificationBody =
                        mContext.getString(
                                R.string.usb_apm_usb_plugged_in_for_power_brick_notification_text);
@@ -383,8 +390,7 @@ public class UsbDataAdvancedProtectionHook extends AdvancedProtectionHook {
            Intent silenceIntent = new Intent(ACTION_SILENCE_NOTIFICATION);
            silenceIntent.putExtra(EXTRA_SILENCE_POWER_NOTIFICATION, true);
            sendNotification(
                    mContext.getString(
                            R.string.usb_apm_usb_plugged_in_when_locked_notification_title),
                    notificationTitle,
                    notificationBody,
                    PendingIntent.getBroadcast(
                            mContext, 0, silenceIntent, PendingIntent.FLAG_IMMUTABLE));
@@ -396,13 +402,20 @@ public class UsbDataAdvancedProtectionHook extends AdvancedProtectionHook {
    private void sendPowerAndDataNotificationIfDeviceLocked(UsbPortStatus portStatus) {
        if (mSilencePowerNotification && mSilenceDataNotification) return;
        if (mKeyguardManager.isKeyguardLocked() && usbPortIsConnectedWithDataDisabled(portStatus)) {
            String notificationTitle;
            String notificationBody;
            if (mReplugRequiredUponEnable) {
              notificationTitle =
                        mContext.getString(
                                R.string.usb_apm_usb_plugged_in_when_locked_replug_notification_title);
                notificationBody =
                        mContext.getString(
                                R.string
                                        .usb_apm_usb_plugged_in_when_locked_low_power_charge_replug_notification_text);
            } else {
                notificationTitle =
                        mContext.getString(
                                R.string.usb_apm_usb_plugged_in_when_locked_notification_title);
                notificationBody =
                        mContext.getString(
                                R.string
@@ -413,8 +426,7 @@ public class UsbDataAdvancedProtectionHook extends AdvancedProtectionHook {
            silenceIntent.putExtra(EXTRA_SILENCE_DATA_NOTIFICATION, true);
            silenceIntent.putExtra(EXTRA_SILENCE_POWER_NOTIFICATION, true);
            sendNotification(
                    mContext.getString(
                            R.string.usb_apm_usb_plugged_in_when_locked_notification_title),
                    notificationTitle,
                    notificationBody,
                    PendingIntent.getBroadcast(
                            mContext, 0, silenceIntent, PendingIntent.FLAG_IMMUTABLE));
@@ -428,13 +440,20 @@ public class UsbDataAdvancedProtectionHook extends AdvancedProtectionHook {
                && mKeyguardManager.isKeyguardLocked()
                && usbPortIsConnectedWithDataDisabled(portStatus)) {

            String notificationTitle;
            String notificationBody;
            if (mReplugRequiredUponEnable) {
              notificationTitle =
                        mContext.getString(
                                R.string.usb_apm_usb_plugged_in_when_locked_replug_notification_title);
                notificationBody =
                        mContext.getString(
                                R.string
                                        .usb_apm_usb_plugged_in_when_locked_replug_notification_text);
            } else {
                notificationTitle =
                        mContext.getString(
                                R.string.usb_apm_usb_plugged_in_when_locked_notification_title);
                notificationBody =
                        mContext.getString(
                                R.string.usb_apm_usb_plugged_in_when_locked_notification_text);
@@ -443,8 +462,7 @@ public class UsbDataAdvancedProtectionHook extends AdvancedProtectionHook {
            Intent silenceIntent = new Intent(ACTION_SILENCE_NOTIFICATION);
            silenceIntent.putExtra(EXTRA_SILENCE_DATA_NOTIFICATION, true);
            sendNotification(
                    mContext.getString(
                            R.string.usb_apm_usb_plugged_in_when_locked_notification_title),
                    notificationTitle,
                    notificationBody,
                    PendingIntent.getBroadcast(
                            mContext, 0, silenceIntent, PendingIntent.FLAG_IMMUTABLE));