diff --git a/src/com/android/settings/MainClear.java b/src/com/android/settings/MainClear.java index 62462b3492a..1e8b47b4cb1 100644 --- a/src/com/android/settings/MainClear.java +++ b/src/com/android/settings/MainClear.java @@ -44,7 +44,6 @@ import android.os.SystemProperties; import android.os.UserHandle; import android.os.UserManager; import android.provider.Settings; -import android.sysprop.VoldProperties; import android.telephony.euicc.EuiccManager; import android.text.TextUtils; import android.util.Log; @@ -309,12 +308,9 @@ public class MainClear extends InstrumentedFragment implements OnGlobalLayoutLis * If the external storage is emulated, it will be erased with a factory * reset at any rate. There is no need to have a separate option until * we have a factory reset that only erases some directories and not - * others. Likewise, if it's non-removable storage, it could potentially have been - * encrypted, and will also need to be wiped. + * others. */ - boolean isExtStorageEmulated = Environment.isExternalStorageEmulated(); - if (isExtStorageEmulated - || (!Environment.isExternalStorageRemovable() && isExtStorageEncrypted())) { + if (Environment.isExternalStorageEmulated()) { mExternalStorageContainer.setVisibility(View.GONE); final View externalOption = mContentView.findViewById(R.id.erase_external_option_text); @@ -323,9 +319,7 @@ public class MainClear extends InstrumentedFragment implements OnGlobalLayoutLis final View externalAlsoErased = mContentView.findViewById(R.id.also_erases_external); externalAlsoErased.setVisibility(View.VISIBLE); - // If it's not emulated, it is on a separate partition but it means we're doing - // a force wipe due to encryption. - mExternalStorage.setChecked(!isExtStorageEmulated); + mExternalStorage.setChecked(false); } else { mExternalStorageContainer.setOnClickListener(new View.OnClickListener() { @@ -457,11 +451,6 @@ public class MainClear extends InstrumentedFragment implements OnGlobalLayoutLis } } - private boolean isExtStorageEncrypted() { - String state = VoldProperties.decrypt().orElse(""); - return !"".equals(state); - } - private void loadAccountList(final UserManager um) { View accountsLabel = mContentView.findViewById(R.id.accounts_label); LinearLayout contents = (LinearLayout) mContentView.findViewById(R.id.accounts);