History log of /frameworks/base/packages/MtpDocumentsProvider/src/com/android/mtp/BusyDeviceException.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
fc7fb7533f46b53247d1e6e6edca6e6c9ac676fe 15-Mar-2016 Daichi Hirono <hirono@google.com> Add suffix number when copying a file.

If we have an existing file in the destination directory, which has the
same name with the source file, adding suffix number is
DocumentsProvider's responsibility.

Because MTP does not provide a way to check existance of files with
given name, the logic is implemented as try-and error strategy. The CL
lets If we MtpDocumentsProvider assume we have a file that shares the
same name with the source file if it failed to invoke
MtpDevice#sendObjectInfo. In this case MtpDocumentsProvider retry to
invoke sendObjectInfo with new name with suffix number.

BUG=26991190

Change-Id: I223ac5031f079bc91eb27709b0356f621a1ed55b
/frameworks/base/packages/MtpDocumentsProvider/src/com/android/mtp/BusyDeviceException.java