summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2015-07-07 17:26:59 -0700
committerJeff Sharkey <jsharkey@android.com>2015-07-07 17:46:16 -0700
commit5af1835d678031d4a6615edc96ba58c82304b31d (patch)
tree686e1a7e1a11374d4b760ac91ba66812fcfd631f /media
parent7a788a865e72da4205b5cf4e0a6f08ccb6f4bdbd (diff)
downloadframeworks_base-5af1835d678031d4a6615edc96ba58c82304b31d.zip
frameworks_base-5af1835d678031d4a6615edc96ba58c82304b31d.tar.gz
frameworks_base-5af1835d678031d4a6615edc96ba58c82304b31d.tar.bz2
Generate stable MTP storage IDs.
It ends up that MediaProvider is persisting MTP storage IDs in its database, so we need to make sure we generate stable IDs over time, otherwise we can end up looking into a black hole. Bug: 22256092 Change-Id: I6a75c239aac1b71fd5f6df0df69b24971079a086
Diffstat (limited to 'media')
-rw-r--r--media/java/android/mtp/MtpStorage.java12
1 files changed, 0 insertions, 12 deletions
diff --git a/media/java/android/mtp/MtpStorage.java b/media/java/android/mtp/MtpStorage.java
index 3641ff5..6ca442c 100644
--- a/media/java/android/mtp/MtpStorage.java
+++ b/media/java/android/mtp/MtpStorage.java
@@ -53,18 +53,6 @@ public class MtpStorage {
return mStorageId;
}
- /**
- * Generates a storage ID for storage of given index.
- * Index 0 is for primary external storage
- *
- * @return the storage ID
- */
- public static int getStorageIdForIndex(int index) {
- // storage ID is 0x00010001 for primary storage,
- // then 0x00020001, 0x00030001, etc. for secondary storages
- return ((index + 1) << 16) + 1;
- }
-
/**
* Returns the file path for the storage unit's storage in the file system
*