diff options
3 files changed, 22 insertions, 0 deletions
diff --git a/res/flag(com.android.documentsui.flags.use_material3)/layout/drawer_layout.xml b/res/flag(com.android.documentsui.flags.use_material3)/layout/drawer_layout.xml index e86e0ec5a..de6b3d8a9 100644 --- a/res/flag(com.android.documentsui.flags.use_material3)/layout/drawer_layout.xml +++ b/res/flag(com.android.documentsui.flags.use_material3)/layout/drawer_layout.xml @@ -40,6 +40,7 @@ <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" + android:paddingBottom="@dimen/file_area_padding_bottom" app:layout_behavior="@string/scrolling_behavior"> <FrameLayout diff --git a/res/flag(com.android.documentsui.flags.use_material3)/values/dimens.xml b/res/flag(com.android.documentsui.flags.use_material3)/values/dimens.xml index c6a7ba8fd..a1117d626 100644 --- a/res/flag(com.android.documentsui.flags.use_material3)/values/dimens.xml +++ b/res/flag(com.android.documentsui.flags.use_material3)/values/dimens.xml @@ -23,6 +23,10 @@ <dimen name="profile_tab_padding">0dp</dimen> <dimen name="grid_container_padding">20dp</dimen> <dimen name="list_container_padding">@dimen/space_extra_small_4</dimen> + <!-- For compact screen, file area occupies the whole screen height, in M3 we show breadcrumb + at the bottom, so we need to add padding (breadcrumb height) at the bottom to make sure + breadcrumb won't over-shadow the file area. --> + <dimen name="file_area_padding_bottom">48dp</dimen> <dimen name="icon_size">40dp</dimen> <dimen name="button_touch_size">48dp</dimen> <dimen name="root_icon_size">24dp</dimen> diff --git a/tests/unit/com/android/documentsui/files/ActionHandlerTest.java b/tests/unit/com/android/documentsui/files/ActionHandlerTest.java index 2554ea52b..3d9cba6bf 100644 --- a/tests/unit/com/android/documentsui/files/ActionHandlerTest.java +++ b/tests/unit/com/android/documentsui/files/ActionHandlerTest.java @@ -810,6 +810,23 @@ public class ActionHandlerTest { assertFalse(intent.getExtras().containsKey(Intent.EXTRA_TITLE)); } + @Test + public void testViewInOwner() { + mEnv.populateStack(); + + mEnv.selectionMgr.clearSelection(); + mEnv.selectDocument(TestEnv.FILE_PNG); + + mHandler.viewInOwner(); + mActivity.assertActivityStarted(DocumentsContract.ACTION_DOCUMENT_SETTINGS); + } + + @Test + public void testOpenSettings() { + mHandler.openSettings(TestProvidersAccess.HAMMY); + mActivity.assertActivityStarted(DocumentsContract.ACTION_DOCUMENT_ROOT_SETTINGS); + } + private void assertRootPicked(Uri expectedUri) throws Exception { mEnv.beforeAsserts(); |