Environment.isExternalStorageRemovable() is false if external storage is emulated
Change-Id: Ib1afe83e4295d8304b65e822edd0dfa1591a5be7
Signed-off-by: Mike Lockwood <lockwood@android.com>
diff --git a/core/java/android/os/Environment.java b/core/java/android/os/Environment.java
index 904b2e9..ec5030c 100644
--- a/core/java/android/os/Environment.java
+++ b/core/java/android/os/Environment.java
@@ -416,6 +416,7 @@
* <p>See {@link #getExternalStorageDirectory()} for more information.
*/
public static boolean isExternalStorageRemovable() {
+ if (isExternalStorageEmulated()) return false;
return Resources.getSystem().getBoolean(
com.android.internal.R.bool.config_externalStorageRemovable);
}