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

Commit f4b80834 authored by Aga Wronska's avatar Aga Wronska Committed by Android (Google) Code Review
Browse files

Merge "Add logic for selecting filename in RenameDocumentFragment - different...

Merge "Add logic for selecting filename in RenameDocumentFragment - different selection for directory. Prevent test from creating directories in Documents folder." into nyc-dev
parents 91eff22b 568b3b36
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -163,7 +163,8 @@ public class RenameDocumentFragment extends DialogFragment {
    private void selectFileName(EditText editText) {
        String text = editText.getText().toString();
        int separatorIndex = text.indexOf(".");
        editText.setSelection(0, separatorIndex == -1 ? text.length() : separatorIndex);
        editText.setSelection(0,
                (separatorIndex == -1 || mDocument.isDirectory()) ? text.length() : separatorIndex);
    }

    /**
+2 −0
Original line number Diff line number Diff line
@@ -92,6 +92,8 @@ public class FilesActivityUiTest extends ActivityTest<FilesActivity> {
    public void testCreateDirectory() throws Exception {
        initTestFiles();

        bots.roots.openRoot(ROOT_0_ID);

        bots.main.openOverflowMenu();
        bots.main.menuNewFolder().click();
        bots.main.setDialogText("Kung Fu Panda");