Loading src/com/android/documentsui/dirlist/DirectoryFragment.java +5 −1 Original line number Diff line number Diff line Loading @@ -1535,7 +1535,11 @@ public class DirectoryFragment extends Fragment implements SwipeRefreshLayout.On // For orientation changed case, sometimes the docs loading comes after the menu // update. We need to update the menu here to ensure the status is correct. mInjector.menuManager.updateModel(mModel); if (useMaterial3()) { mActivity.getNavigator().updateActionMenu(); } else { mInjector.menuManager.updateOptionMenu(); } if (VersionUtils.isAtLeastS()) { mActivity.updateHeader(update.hasCrossProfileException()); } else { Loading tests/functional/com/android/documentsui/FileManagementUiTest.java +15 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,21 @@ public class FileManagementUiTest extends ActivityTest<FilesActivity> { bots.directory.waitForDocument("file1.png"); } @HugeLongTest public void testKeyboard_PasteDocumentWhileSelectionActive() throws Exception { bots.directory.selectDocument("file1.png", 1); bots.keyboard.pressKey(KeyEvent.KEYCODE_C, KeyEvent.META_CTRL_ON); device.waitForIdle(); bots.directory.openDocument("Dir1"); bots.directory.selectDocument("ChildDir1", 1); bots.keyboard.pressKey(KeyEvent.KEYCODE_V, KeyEvent.META_CTRL_ON); device.waitForIdle(); bots.directory.assertDocumentsPresent("file1.png"); } public void testDeleteDocument_Cancel() throws Exception { bots.directory.selectDocument("file1.png", 1); device.waitForIdle(); Loading Loading
src/com/android/documentsui/dirlist/DirectoryFragment.java +5 −1 Original line number Diff line number Diff line Loading @@ -1535,7 +1535,11 @@ public class DirectoryFragment extends Fragment implements SwipeRefreshLayout.On // For orientation changed case, sometimes the docs loading comes after the menu // update. We need to update the menu here to ensure the status is correct. mInjector.menuManager.updateModel(mModel); if (useMaterial3()) { mActivity.getNavigator().updateActionMenu(); } else { mInjector.menuManager.updateOptionMenu(); } if (VersionUtils.isAtLeastS()) { mActivity.updateHeader(update.hasCrossProfileException()); } else { Loading
tests/functional/com/android/documentsui/FileManagementUiTest.java +15 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,21 @@ public class FileManagementUiTest extends ActivityTest<FilesActivity> { bots.directory.waitForDocument("file1.png"); } @HugeLongTest public void testKeyboard_PasteDocumentWhileSelectionActive() throws Exception { bots.directory.selectDocument("file1.png", 1); bots.keyboard.pressKey(KeyEvent.KEYCODE_C, KeyEvent.META_CTRL_ON); device.waitForIdle(); bots.directory.openDocument("Dir1"); bots.directory.selectDocument("ChildDir1", 1); bots.keyboard.pressKey(KeyEvent.KEYCODE_V, KeyEvent.META_CTRL_ON); device.waitForIdle(); bots.directory.assertDocumentsPresent("file1.png"); } public void testDeleteDocument_Cancel() throws Exception { bots.directory.selectDocument("file1.png", 1); device.waitForIdle(); Loading