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

Commit 2e9c889d authored by James Cook's avatar James Cook Committed by Android (Google) Code Review
Browse files

Merge "Fix app shelf being visible during setup wizard"

parents 106b82b0 968403dd
Loading
Loading
Loading
Loading
+108 −102
Original line number Diff line number Diff line
@@ -69,6 +69,14 @@
                android:contentDescription="@string/accessibility_home"
                />

            <!-- Container for the app shelf. -->
            <LinearLayout
                android:id="@+id/app_shelf"
                android:orientation="horizontal"
                android:layout_height="match_parent"
                android:layout_width="0dp"
                android:layout_weight="1"
                >
                <com.android.systemui.statusbar.phone.NavigationBarApps
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
@@ -119,12 +127,7 @@
                        android:visibility="invisible"
                        />
                </com.android.systemui.statusbar.phone.NavigationBarRecents>

            <Space
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                />
            </LinearLayout>

            <FrameLayout
                android:layout_width="@dimen/navigation_extra_key_width"
@@ -262,6 +265,14 @@
                android:contentDescription="@string/accessibility_home"
                />

            <!-- Container for the app shelf. -->
            <LinearLayout
                android:id="@+id/app_shelf"
                android:orientation="horizontal"
                android:layout_height="match_parent"
                android:layout_width="0dp"
                android:layout_weight="1"
                >
                <com.android.systemui.statusbar.phone.NavigationBarApps
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
@@ -312,12 +323,7 @@
                        android:visibility="invisible"
                        />
                </com.android.systemui.statusbar.phone.NavigationBarRecents>

            <Space
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                />
            </LinearLayout>

            <FrameLayout
                android:layout_width="@dimen/navigation_extra_key_width"
+10 −0
Original line number Diff line number Diff line
@@ -243,6 +243,10 @@ public class NavigationBarView extends LinearLayout {
        return mCurrentView.findViewById(R.id.ime_switcher);
    }

    public View getAppShelf() {
        return mCurrentView.findViewById(R.id.app_shelf);
    }

    private void getIcons(Resources res) {
        mBackIcon = res.getDrawable(R.drawable.ic_sysbar_back);
        mBackLandIcon = res.getDrawable(R.drawable.ic_sysbar_back_land);
@@ -341,6 +345,12 @@ public class NavigationBarView extends LinearLayout {
        getBackButton()   .setVisibility(disableBack       ? View.INVISIBLE : View.VISIBLE);
        getHomeButton()   .setVisibility(disableHome       ? View.INVISIBLE : View.VISIBLE);
        getRecentsButton().setVisibility(disableRecent     ? View.INVISIBLE : View.VISIBLE);

        // The app shelf, if it exists, follows the visibility of the home button.
        View appShelf = getAppShelf();
        if (appShelf != null) {
            appShelf.setVisibility(disableHome ? View.INVISIBLE : View.VISIBLE);
        }
    }

    private boolean inLockTask() {