Merge "Fix the logic to add suffix when copying." into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
07db6f3969
@@ -360,8 +360,12 @@ public class MtpDocumentsProvider extends DocumentsProvider {
|
||||
if (i == 0) {
|
||||
infoUniqueName = info;
|
||||
} else {
|
||||
infoUniqueName = new MtpObjectInfo.Builder(info).setName(
|
||||
baseName + " (" + i + ")." + extension).build();
|
||||
String suffixedName = baseName + " (" + i + " )";
|
||||
if (!extension.isEmpty()) {
|
||||
suffixedName += "." + extension;
|
||||
}
|
||||
infoUniqueName =
|
||||
new MtpObjectInfo.Builder(info).setName(suffixedName).build();
|
||||
}
|
||||
try {
|
||||
objectHandle = mMtpManager.createDocument(
|
||||
|
||||
Reference in New Issue
Block a user