sysui: remove shelf
Bug: 26742568
Change-Id: I10bbf55b4b93fb5d360a56dcc59c943d8806a27e
diff --git a/packages/SystemUI/res/layout/apps_bar.xml b/packages/SystemUI/res/layout/apps_bar.xml
deleted file mode 100644
index e226805..0000000
--- a/packages/SystemUI/res/layout/apps_bar.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2016, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
--->
-
-<!-- Container for the app shelf. -->
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- 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:id="@+id/navigation_bar_apps"
- android:layout_width="wrap_content"
- android:layout_height="match_parent" />
-</LinearLayout>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
index beeee0b..7395a33 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
@@ -43,8 +43,6 @@
private static final String RECENT = "recent";
private static final String NAVSPACE = "space";
- private static final String APP_SHELF = "app_shelf";
-
public static final String GRAVITY_SEPARATOR = ";";
public static final String BUTTON_SEPARATOR = ",";
@@ -141,19 +139,13 @@
inflateButtons(start, (ViewGroup) mRot90.findViewById(R.id.ends_group),
(ViewGroup) mRot90.findViewById(R.id.ends_group_lightsout), true);
- if (center.length == 1 && APP_SHELF.equals(center[0])) {
- inflateShelf((LinearLayout) mRot0.findViewById(R.id.ends_group),
- (LinearLayout) mRot0.findViewById(R.id.ends_group_lightsout), false);
- inflateShelf((LinearLayout) mRot90.findViewById(R.id.ends_group),
- (LinearLayout) mRot90.findViewById(R.id.ends_group_lightsout), true);
- } else {
- inflateButtons(center, (ViewGroup) mRot0.findViewById(R.id.center_group),
- (ViewGroup) mRot0.findViewById(R.id.center_group_lightsout), false);
- inflateButtons(center, (ViewGroup) mRot90.findViewById(R.id.center_group),
- (ViewGroup) mRot90.findViewById(R.id.center_group_lightsout), true);
- addGravitySpacer((LinearLayout) mRot0.findViewById(R.id.ends_group));
- addGravitySpacer((LinearLayout) mRot90.findViewById(R.id.ends_group));
- }
+ inflateButtons(center, (ViewGroup) mRot0.findViewById(R.id.center_group),
+ (ViewGroup) mRot0.findViewById(R.id.center_group_lightsout), false);
+ inflateButtons(center, (ViewGroup) mRot90.findViewById(R.id.center_group),
+ (ViewGroup) mRot90.findViewById(R.id.center_group_lightsout), true);
+
+ addGravitySpacer((LinearLayout) mRot0.findViewById(R.id.ends_group));
+ addGravitySpacer((LinearLayout) mRot90.findViewById(R.id.ends_group));
inflateButtons(end, (ViewGroup) mRot0.findViewById(R.id.ends_group),
(ViewGroup) mRot0.findViewById(R.id.ends_group_lightsout), false);
@@ -161,14 +153,6 @@
(ViewGroup) mRot90.findViewById(R.id.ends_group_lightsout), true);
}
- private void inflateShelf(LinearLayout layout, LinearLayout lightsOut, boolean landscape) {
- View v = (landscape ? mLandscapeInflater : mLayoutInflater)
- .inflate(R.layout.apps_bar, layout, false);
- layout.addView(v);
- addToDispatchers(v);
- copyToLightsout(v, lightsOut);
- }
-
private void addGravitySpacer(LinearLayout layout) {
layout.addView(new Space(mContext), new LinearLayout.LayoutParams(0, 0, 1));
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
index 839b579..d86629f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
@@ -263,11 +263,6 @@
return mButtonDisatchers.get(R.id.ime_switcher);
}
- @Nullable
- public View getAppShelf() {
- return getCurrentView().findViewById(R.id.app_shelf);
- }
-
private void getCarModeIcons(Context ctx) {
mBackCarModeIcon = ctx.getDrawable(R.drawable.ic_sysbar_back_carmode);
mBackLandCarModeIcon = mBackCarModeIcon;
@@ -395,12 +390,6 @@
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() {