From 54bdf65cb59407b5694574d886008652ec945c0b Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Mon, 28 Mar 2022 19:44:28 +0000 Subject: [PATCH] Remove FDE warning from AccessibilityShortcutChooserActivity This encryption warning is never shown, since StorageManager.isNonDefaultBlockEncrypted() is hard-coded to return false, since FDE (Full Disk Encryption) is no longer supported. Therefore, remove an unused TextView and string, and stop calling StorageManager.isNonDefaultBlockEncrypted(). Remove the word "encryption" from the layout name "accessibility_enable_service_encryption_warning", since this layout is still used for other, non-encryption related warnings. Bug: 208476087 Change-Id: Ic4e9024eadd602205516aa3ba4cc01887a2a7d34 --- .../dialog/AccessibilityTargetHelper.java | 15 +-------------- ...l => accessibility_enable_service_warning.xml} | 8 -------- core/res/res/values/strings.xml | 7 ------- core/res/res/values/symbols.xml | 4 +--- 4 files changed, 2 insertions(+), 32 deletions(-) rename core/res/res/layout/{accessibility_enable_service_encryption_warning.xml => accessibility_enable_service_warning.xml} (94%) diff --git a/core/java/com/android/internal/accessibility/dialog/AccessibilityTargetHelper.java b/core/java/com/android/internal/accessibility/dialog/AccessibilityTargetHelper.java index 4a20ad0f33f5..fc2c8cca9796 100644 --- a/core/java/com/android/internal/accessibility/dialog/AccessibilityTargetHelper.java +++ b/core/java/com/android/internal/accessibility/dialog/AccessibilityTargetHelper.java @@ -33,7 +33,6 @@ import android.app.ActivityManager; import android.content.ComponentName; import android.content.Context; import android.os.Build; -import android.os.storage.StorageManager; import android.provider.Settings; import android.text.BidiFormatter; import android.view.LayoutInflater; @@ -282,19 +281,7 @@ public final class AccessibilityTargetHelper { Context.LAYOUT_INFLATER_SERVICE); final View content = inflater.inflate( - R.layout.accessibility_enable_service_encryption_warning, /* root= */ null); - - final TextView encryptionWarningView = (TextView) content.findViewById( - R.id.accessibility_encryption_warning); - if (StorageManager.isNonDefaultBlockEncrypted()) { - final String text = context.getString( - R.string.accessibility_enable_service_encryption_warning, - getServiceName(context, target.getLabel())); - encryptionWarningView.setText(text); - encryptionWarningView.setVisibility(View.VISIBLE); - } else { - encryptionWarningView.setVisibility(View.GONE); - } + R.layout.accessibility_enable_service_warning, /* root= */ null); final ImageView dialogIcon = content.findViewById( R.id.accessibility_permissionDialog_icon); diff --git a/core/res/res/layout/accessibility_enable_service_encryption_warning.xml b/core/res/res/layout/accessibility_enable_service_warning.xml similarity index 94% rename from core/res/res/layout/accessibility_enable_service_encryption_warning.xml rename to core/res/res/layout/accessibility_enable_service_warning.xml index 400051660592..01ef10177c5a 100644 --- a/core/res/res/layout/accessibility_enable_service_encryption_warning.xml +++ b/core/res/res/layout/accessibility_enable_service_warning.xml @@ -53,14 +53,6 @@ android:textColor="?android:attr/textColorPrimary" android:fontFamily="google-sans-medium"/> - - %1$s to have full control of your device? - - If you turn on - %1$s, your device won’t use your screen - lock to enhance data encryption. - - Full control is appropriate for apps diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 55e2ca6c4263..4881ff049e25 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -3413,14 +3413,12 @@ - + - -