From 54bdf65cb59407b5694574d886008652ec945c0b Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Mon, 28 Mar 2022 19:44:28 +0000 Subject: 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 +- ...ssibility_enable_service_encryption_warning.xml | 175 --------------------- .../accessibility_enable_service_warning.xml | 167 ++++++++++++++++++++ core/res/res/values/strings.xml | 7 - core/res/res/values/symbols.xml | 4 +- 5 files changed, 169 insertions(+), 199 deletions(-) delete mode 100644 core/res/res/layout/accessibility_enable_service_encryption_warning.xml create mode 100644 core/res/res/layout/accessibility_enable_service_warning.xml 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_encryption_warning.xml deleted file mode 100644 index 400051660592..000000000000 --- a/core/res/res/layout/accessibility_enable_service_encryption_warning.xml +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -