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
Loading
Please register or sign in to comment