History log of /frameworks/base/media/java/android/mtp/MtpStorage.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5af1835d678031d4a6615edc96ba58c82304b31d 08-Jul-2015 Jeff Sharkey <jsharkey@android.com> 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
/frameworks/base/media/java/android/mtp/MtpStorage.java
1b8ef7e3165ff9aa52a4905dafc8d0f83e7403f9 04-Apr-2015 Jeff Sharkey <jsharkey@android.com> Parcelable objects for Disk/Volume.

Will eventually be used by SystemUI and/or Settings.

Also fix SettingsProvider NPE.

Bug: 19993667, 19909433
Change-Id: Ie326849ac5f43ee35f728d9cc0e332b72292db70
/frameworks/base/media/java/android/mtp/MtpStorage.java
4887789e44cdb16b042a35e8ec03983213e88ac6 18-Mar-2015 Jeff Sharkey <jsharkey@android.com> Progress towards dynamic storage support.

Storage devices are no longer hard-coded, and instead bubble up from
whatever Disk and VolumeBase that vold uncovered, turning into
sibling Java objects in MountService. We now treat vold events as
the source-of-truth for state, and synchronize our state by asking
vold to "reset" whenever we reconnect.

We've now moved to a model where all storage devices are mounted in
the root mount namespace (user boundaries protected with GIDs), so
we no longer need app-to-vold path translation. This also means that
zygote only needs to bind mount the user-specific /mnt/user/n/ path
onto /storage/self/ to make legacy paths like /sdcard work. This
grealy simplifies a lot of system code.

Many parts of the platform depend on a primary storage device always
being present, so we hack together a stub StorageVolume when vold
doesn't have a volume ready yet.

StorageVolume isn't really a volume anymore; it's the user-specific
view onto a volume, so MountService now filters and builds them
based on the calling user. StorageVolume is now immutable, making
it easier to reason about.

Environment now builds all of its paths dynamically based on active
volumes. Adds utility methods to turn int types and flags into
user-readable strings for debugging purposes.

Remove UMS sharing support for now, since no current devices support
it; MTP is the recommended solution going forward because it offers
better multi-user support.

Simplify unmount logic, since vold will now gladly trigger EJECTING
broadcast and kill stubborn processes.

Bug: 19993667
Change-Id: I9842280e61974c91bae15d764e386969aedcd338
/frameworks/base/media/java/android/mtp/MtpStorage.java
6393b07134f99ee827ebac2d339b0f5449addb0b 29-Nov-2012 Henrik Engström <henrik.engstrom@sonymobile.com> Fix possible integer overflow in MtpStorage

When converting the MB value MtpReserveSpace value to bytes there is a
possible integer overflow since 3 integer values are multiplied, even
though the result is stored in a long variable. This would be visible when
the value is more than 2 GB. This is solved by making the constants
longs instead of ints.

Change-Id: I799129f7076a6e331cece17b5c05aed210499648
/frameworks/base/media/java/android/mtp/MtpStorage.java
3b60dacb4e1871d1c7b410ac55fd3e5fd6bfacfb 06-Aug-2012 bo huang <bo.b.huang@intel.com> MtpStorage: correct the size of reserve space for MTP

According to description in frameworks/base/core/res/res/xml/storage_list.xml,
"mtpReserve: (integer) number of megabytes of storage MTP should reserve for free storage".
Mtpstorage class use it directly and doesn't change it to correct size in megabyes.
Mtp initor can not get correct storage information from android.

Change-Id: Icf59eb1eb478e67ea5990be96a9decb41aa55504
Signed-off-by: Bo Huang <bo.b.huang@intel.com>
Signed-off-by: Jack Ren<jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
/frameworks/base/media/java/android/mtp/MtpStorage.java
13fe2a5330a5df662d7b1b136e7b08fe34c94a42 19-May-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #6522190 MountService should respond to configuration changes ("INTERNAL STORAGE" string should be translated dynamically)

- use an ID instead of a String for StorageVolume description
- use this ID for getting the correct localized version of the description string

Change-Id: I30f3080fce2c889be38bfdf9f5121dffcf8a99e8
/frameworks/base/media/java/android/mtp/MtpStorage.java
7a59dd2ce33b46cbc73eef964ddb4272ea1da8d1 11-Jul-2011 Mike Lockwood <lockwood@android.com> MTP: Return error if user tries to copy a file >= 4GB to a FAT32 file system

Bug: 4561836

Change-Id: I2bffb93b032038f6c220c24c752ccd7ca66c23a0
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/media/java/android/mtp/MtpStorage.java
fbfe55512596fd00c1fb51caa851e17dae60fd43 17-May-2011 Mike Lockwood <lockwood@android.com> StorageVolume: Add getStorageId() accessor

This ID is used for MTP as well as per volume querying in the media provider.

Change-Id: Ic4fc986d972bd477730643f7e9450c390c0b3a4b
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/media/java/android/mtp/MtpStorage.java
51690544aaeee82b1c50232cd57d50038b77f0c4 10-May-2011 Mike Lockwood <lockwood@android.com> MTP: Have GetStorageInfo command return correct storage type for removable storage

Change-Id: I09b548483c12080e7d77970babcae2eef379f2f4
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/media/java/android/mtp/MtpStorage.java
7ae938be1b4fb8938f0f438cfd611cd9ed0da513 05-Apr-2011 Mike Lockwood <lockwood@android.com> DO NOT MERGE MTP and media provider support for multiple storage devices:

- MTP support for multiple storage units

- Add storage_id column to media database for MTP storage ID

- Add framework resource for defining mount points and user visible descriptions
for multiple volumes

- Clean up locking in MtpServer JNI code

Change-Id: Ide6d47bd9aa1698ed2a13d695613e03f2a9b29e3
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/media/java/android/mtp/MtpStorage.java