From 06917034679ffa79b54ac9e618dfa5a3bad941b2 Mon Sep 17 00:00:00 2001 From: Xiaohui Chen Date: Tue, 26 Jan 2016 11:20:39 -0800 Subject: [PATCH] sysui: remove shelf Bug: 26742568 Change-Id: I10bbf55b4b93fb5d360a56dcc59c943d8806a27e --- packages/SystemUI/res/layout/apps_bar.xml | 31 ------------------- .../phone/NavigationBarInflaterView.java | 30 +++++------------- .../statusbar/phone/NavigationBarView.java | 11 ------- 3 files changed, 7 insertions(+), 65 deletions(-) delete mode 100644 packages/SystemUI/res/layout/apps_bar.xml diff --git a/packages/SystemUI/res/layout/apps_bar.xml b/packages/SystemUI/res/layout/apps_bar.xml deleted file mode 100644 index e226805dc2684..0000000000000 --- a/packages/SystemUI/res/layout/apps_bar.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - 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 beeee0b80f96f..7395a33c8be45 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 @@ public class NavigationBarInflaterView extends FrameLayout implements TunerServi 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 @@ public class NavigationBarInflaterView extends FrameLayout implements TunerServi 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 @@ public class NavigationBarInflaterView extends FrameLayout implements TunerServi (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 839b57956f9ab..d86629ff47405 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 @@ public class NavigationBarView extends LinearLayout { 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 @@ 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() {