diff --git a/res/layout/master_clear.xml b/res/layout/master_clear.xml
index ec61310b286..e15169ed179 100644
--- a/res/layout/master_clear.xml
+++ b/res/layout/master_clear.xml
@@ -35,6 +35,12 @@
android:layout_height="wrap_content"
android:textSize="18sp"
android:text="@string/master_clear_desc" />
+
- "This will erase all data from your phone\'s internal storage, including:\n\nYour Google account\nSystem and application data and settings\nDownloaded applications"
"\n\nYou are currently signed into the following accounts:\n"
+
+ "Music\nPhotos\nOther user data"
"\n\nTo also clear music, pictures, and other user data, the USB storage needs to be erased."
diff --git a/src/com/android/settings/MasterClear.java b/src/com/android/settings/MasterClear.java
index 3060d3e1893..1b045eae3a7 100644
--- a/src/com/android/settings/MasterClear.java
+++ b/src/com/android/settings/MasterClear.java
@@ -29,6 +29,7 @@ import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
+import android.os.Environment;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.util.Log;
@@ -133,13 +134,29 @@ public class MasterClear extends Fragment {
mExternalStorageContainer = mContentView.findViewById(R.id.erase_external_container);
mExternalStorage = (CheckBox) mContentView.findViewById(R.id.erase_external);
- mExternalStorageContainer.setOnClickListener(new View.OnClickListener() {
+ /*
+ * 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.
+ */
+ if (Environment.isExternalStorageEmulated()) {
+ mExternalStorageContainer.setVisibility(View.GONE);
- @Override
- public void onClick(View v) {
- mExternalStorage.toggle();
- }
- });
+ final View externalOption = mContentView.findViewById(R.id.erase_external_option_text);
+ externalOption.setVisibility(View.GONE);
+
+ final View externalAlsoErased = mContentView.findViewById(R.id.also_erases_external);
+ externalAlsoErased.setVisibility(View.VISIBLE);
+ } else {
+ mExternalStorageContainer.setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+ mExternalStorage.toggle();
+ }
+ });
+ }
loadAccountList();
}
diff --git a/src/com/android/settings/deviceinfo/Memory.java b/src/com/android/settings/deviceinfo/Memory.java
index 1860d6d3388..c3df2d54529 100644
--- a/src/com/android/settings/deviceinfo/Memory.java
+++ b/src/com/android/settings/deviceinfo/Memory.java
@@ -171,9 +171,7 @@ public class Memory extends SettingsPreferenceFragment implements OnCancelListen
mSdMountPreferenceGroup = (PreferenceGroup)findPreference(MEMORY_SD_GROUP);
if (Environment.isExternalStorageEmulated()) {
- mSdMountPreferenceGroup.removePreference(mSdSize);
- mSdMountPreferenceGroup.removePreference(mSdAvail);
- mSdMountPreferenceGroup.removePreference(mSdMountToggle);
+ getPreferenceScreen().removePreference(mSdMountPreferenceGroup);
}
mInternalSize = findPreference(MEMORY_INTERNAL_SIZE);