Remove FDE support from accessibility settings

With FDE (Full Disk Encryption), secure start-up (i.e. requiring a PIN /
pattern / password to boot the device) was incompatible with
accessibility services.  Thus, the accessibility settings would ask the
user to disable secure start-up when enabling an accessibility service.

Now that FDE support has been removed in favor of FBE (File Based
Encryption), this is no longer necessary.  Remove it.

Bug: 208476087
Change-Id: I5f6e512f223df63e1b4d1c181fc8b3fe683dcd5f
This commit is contained in:
Eric Biggers
2022-01-11 17:01:22 -08:00
parent 6552bdd0ef
commit b4060ef65b
5 changed files with 4 additions and 149 deletions

View File

@@ -23,7 +23,6 @@ import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.drawable.Drawable;
import android.os.storage.StorageManager;
import android.text.BidiFormatter;
import android.view.LayoutInflater;
import android.view.MotionEvent;
@@ -86,16 +85,6 @@ public class AccessibilityServiceWarning {
return ad;
}
/**
* Returns whether the device is encrypted with legacy full disk encryption. Newer devices
* should be using File Based Encryption.
*
* @return true if device is encrypted
*/
private static boolean isFullDiskEncrypted() {
return StorageManager.isNonDefaultBlockEncrypted();
}
private static View createEnableDialogContentView(Context context,
@NonNull AccessibilityServiceInfo info, View.OnClickListener listener,
UninstallActionPerformer performer) {
@@ -105,17 +94,6 @@ public class AccessibilityServiceWarning {
View content = inflater.inflate(R.layout.enable_accessibility_service_dialog_content,
null);
TextView encryptionWarningView = (TextView) content.findViewById(
R.id.encryption_warning);
if (isFullDiskEncrypted()) {
String text = context.getString(R.string.enable_service_encryption_warning,
getServiceName(context, info));
encryptionWarningView.setText(text);
encryptionWarningView.setVisibility(View.VISIBLE);
} else {
encryptionWarningView.setVisibility(View.GONE);
}
final Drawable icon;
if (info.getResolveInfo().getIconResource() == 0) {
icon = ContextCompat.getDrawable(context, R.drawable.ic_accessibility_generic);