summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2025-03-12 01:04:10 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2025-03-12 01:04:10 -0700
commitb3003fa21a508858525b350f91efb57e3b41af69 (patch)
treeb88fa5059a6692e77b8f2e7f5e5b4f436f652960
parentd52c37caa837191d66720c0a062821393957b797 (diff)
parent001a2db3839ce06d93a3a7c452b966fa5d9f7491 (diff)
Merge "[DocsUI M3] Remove the break between folders and files" into main
-rw-r--r--src/com/android/documentsui/dirlist/DirectoryAddonsAdapter.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/documentsui/dirlist/DirectoryAddonsAdapter.java b/src/com/android/documentsui/dirlist/DirectoryAddonsAdapter.java
index 8989853a0..8be400924 100644
--- a/src/com/android/documentsui/dirlist/DirectoryAddonsAdapter.java
+++ b/src/com/android/documentsui/dirlist/DirectoryAddonsAdapter.java
@@ -16,6 +16,8 @@
package com.android.documentsui.dirlist;
+import static com.android.documentsui.util.FlagUtils.isUseMaterial3FlagEnabled;
+
import android.os.UserManager;
import android.view.ViewGroup;
@@ -207,6 +209,11 @@ final class DirectoryAddonsAdapter extends DocumentsAdapter {
return;
}
+ if (isUseMaterial3FlagEnabled()) {
+ // Do not add a visual break between folders and documents in Material3.
+ return;
+ }
+
// Walk down the list of IDs till we encounter something that's not a directory, and
// insert a whitespace element - this introduces a visual break in the grid between
// folders and documents.