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

Commit fab7e3ef authored by Jon Mann's avatar Jon Mann Committed by android-build-merger
Browse files

Merge "Document rename with no change is now a no-op instead of an error." into arc-apps

am: f271d850

Change-Id: I688b7497b2d3ae3569be99cc98608f17a31fa9db
parents 34ea7752 f271d850
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -188,7 +188,9 @@ public class RenameDocumentFragment extends DialogFragment {
    private void renameDocuments(String newDisplayName) {
        BaseActivity activity = (BaseActivity) getActivity();

        if (!isValidDocumentName(newDisplayName)) {
        if (newDisplayName.equals(mDocument.displayName)) {
            mDialog.dismiss();
        } else if (!isValidDocumentName(newDisplayName)) {
            Log.w(TAG, "Failed to rename file - invalid name:" + newDisplayName);
            Snackbars.makeSnackbar(getActivity(), R.string.rename_error,
                    Snackbar.LENGTH_SHORT).show();