History log of /frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestUtil.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
64111e08d905525c7f4fe27e69953eb71bd62511 24-Mar-2016 Daichi Hirono <hirono@google.com> Get object size that is more than 4GB.

MtpObjectInfo contains object size as 32-bit integer and the provider
needs to invoke MtpDevice#getObjectSizeLong hidden API to get 64-bit
object size.

The CL switches to use MtpDevice#getObjectSizeLong hidden API if
MtpObjectInfo#getCompressedSize() returns 0xffffffffL, which means the
object size is more than 4GB.

BUG=27805369

Change-Id: I87ea02c09aa784246cf016def309d1f39ed20e90
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestUtil.java
61ba923ca0cb5c928a16729d0aa67b6bf4b2f027 25-Feb-2016 Daichi Hirono <hirono@google.com> Set document flag by referring MTP supported operations.

BUG=26147375

Change-Id: I6c4244f1f1153c1bbbf21ea9d608dc1a92ca70cd
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestUtil.java
0f32537e40ee2662d4f0b7b625ee280ca9c02066 21-Feb-2016 Daichi Hirono <hirono@google.com> Stops performing operations that does not supported by MTP device.

MTP devices can return supported operation list. The CL sets root flag
by referring it.

BUG=26147375

Change-Id: I02397821e208cf5a8fcf7457aa279d2818ce24c7
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestUtil.java
f578fa275a535016f5322c88ad7a92e517d04a12 19-Feb-2016 Daichi Hirono <hirono@google.com> Update object info when writing a file.

The MTP spec does not offer a way to update bytes of exisitng files, so
our provider implementation creates a new file with new bytes and
removes old one.

Previously the new file uses new document ID and the exising document ID
is expired. Also the provider does not update the metadata
database. Thus users see the old flie in DocumentsUI but actually the
files is not accessible.

The CL updates the database with exisitng document ID, so that we can
access the new file with exisiting document ID.

BUG=26549400

Change-Id: I629b707a2e662b34625e8b28857ef818d8933996
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestUtil.java
ab03cb1b469940ab672850e0d2de3c78025260d3 11-Jan-2016 Daichi Hirono <hirono@google.com> Clean up TestUtil.

* Integrate two while loops waiting for valid device.
* Try to open a device just after getting an device ownership so that
other applicaitons do not steal device ownership before TestUtil
opens a device.

Change-Id: Ia273cfb2a47fe630efd8c54b22d6ef5823a402b8
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestUtil.java
1d4779c29a95114c89ec353a8899c0cc8eee3ba5 06-Jan-2016 Daichi Hirono <hirono@google.com> Add operationsSupported to device info.

Because not all MTP devices support getPartialObject, we need to check
supported operation of MTP devices. The CL adds operationsSupported
field to MtpDeviceInfo class.

BUG=26147375

Change-Id: Iaad968fb4497a5ad11bf6489097abea99c3cbac7
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestUtil.java
af5ea38b8c51f0878e4070671e240f693f3ad796 07-Jan-2016 Daichi Hirono <hirono@google.com> RealDeviceTest for MTP does not need to ask device permission.

MtpDocumentsProvider can obtain permission itself now because it's
system component.

BUG=26415299

Change-Id: Ia2cd275e57cffadbaefd0f1bf3cb99cde12e5e33
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestUtil.java
20754c5a112e418c11cc88176283db2c4bf2efd6 15-Dec-2015 Daichi Hirono <hirono@google.com> Store device document even if the device is not opened.

BUG=26197156

Change-Id: I2a80bb3e85310cf63253173b1110a155ee1391ba
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestUtil.java
99b58052f85c18272e63047b471edfd8089c09d3 03-Dec-2015 Daichi Hirono <hirono@google.com> Polish MtpManagerTest.

Change-Id: Ibadd209ee1cb752f0e55694d0f1f631c558f1370
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestUtil.java
b255f58904d7a2aa64ba9f03ed0ede3759fd03c5 01-Dec-2015 Daichi Hirono <hirono@google.com> Extract test utility class.

Change-Id: I8505ab13ceccf32e7a9b6817f84a66766098b09e
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestUtil.java