summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/MountService.java
diff options
context:
space:
mode:
Diffstat (limited to 'services/java/com/android/server/MountService.java')
-rw-r--r--services/java/com/android/server/MountService.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java
index dfe0c2c..5fb8385 100644
--- a/services/java/com/android/server/MountService.java
+++ b/services/java/com/android/server/MountService.java
@@ -1192,9 +1192,9 @@ class MountService extends IMountService.Stub
" allowMassStorage: " + allowMassStorage +
" maxFileSize: " + maxFileSize);
- if (emulated) {
- // For devices with emulated storage, we create separate
- // volumes for each known user.
+ if (emulated && primary) {
+ // For devices with emulated primary storage,
+ // we create separate volumes for each known user.
mEmulatedTemplate = new StorageVolume(null, descriptionId, true, false,
true, mtpReserve, false, maxFileSize, null);
@@ -1222,11 +1222,11 @@ class MountService extends IMountService.Stub
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
- // Compute storage ID for each physical volume; emulated storage is
- // always 0 when defined.
+ // Compute storage ID for each physical volume;
+ // Primary emulated storage is always 0 when defined.
int index = isExternalStorageEmulated() ? 1 : 0;
for (StorageVolume volume : mVolumes) {
- if (!volume.isEmulated()) {
+ if (!(volume.isEmulated() && volume.isPrimary())) {
volume.setStorageId(index++);
}
}