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

Commit 2937130b authored by Wenbo Jie's avatar Wenbo Jie
Browse files

[DocsUI M3] Hide app row

The app icons shown in the app row are already shown in the
side bar, we are hiding app row in M3.

Bug: 383667675
Test: Manual inspection
Flag: com.android.documentsui.flags.use_material3
Change-Id: Ifeb9e99a41255e9a033da79c3525a164e3d91b2a
parent 24f2aca3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -14,6 +14,9 @@
     limitations under the License.
-->

<!-- TODO(b/379776735): Remove this after M3 uplift.
    Currently it's being referenced in AppsRowManager.
-->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/apps_row"
+7 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.documentsui.dirlist;

import static com.android.documentsui.flags.Flags.useMaterial3;

import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
@@ -45,6 +47,7 @@ import java.util.Map;

/**
 * A manager class stored apps row chip data list. Data will be synced by RootsFragment.
 * TODO(b/379776735): Remove this after M3 uplift.
 */
public class AppsRowManager {

@@ -102,6 +105,10 @@ public class AppsRowManager {
    }

    private boolean shouldShow(State state, boolean isSearchExpanded) {
        if (useMaterial3()) {
            return false;
        }

        boolean isHiddenAction = state.action == State.ACTION_CREATE
                || state.action == State.ACTION_OPEN_TREE
                || state.action == State.ACTION_PICK_COPY_DESTINATION;