Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07db6f39 authored by Daichi Hirono's avatar Daichi Hirono Committed by Android (Google) Code Review
Browse files

Merge "Fix the logic to add suffix when copying." into nyc-dev

parents ef8ee4c7 4f04fd35
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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(