Loading packages/SystemUI/res/layout/menu_ime.xml +0 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ android:id="@+id/menu_container" android:layout_width="@dimen/navigation_key_width" android:layout_height="match_parent" android:focusable="false" android:importantForAccessibility="no" > <!-- Use nav button width & height=match_parent for parent FrameLayout and buttons because they Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java +11 −0 Original line number Diff line number Diff line Loading @@ -615,6 +615,7 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav ((mNavigationIconHints & StatusBarManager.NAVIGATION_HINT_IME_SHOWN) != 0); getImeSwitchButton().setVisibility(showImeButton ? View.VISIBLE : View.INVISIBLE); getImeSwitchButton().setImageDrawable(mImeIcon); updateContextualContainerVisibility(); // Update menu button, visibility logic in method setMenuVisibility(mShowMenu, true); Loading Loading @@ -796,6 +797,7 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav ((mNavigationIconHints & StatusBarManager.NAVIGATION_HINT_IME_SHOWN) == 0); getMenuButton().setVisibility(shouldShow ? View.VISIBLE : View.INVISIBLE); updateContextualContainerVisibility(); } public void setAccessibilityButtonState(final boolean visible, final boolean longClickable) { Loading @@ -810,6 +812,7 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav getAccessibilityButton().setVisibility(visible ? View.VISIBLE : View.INVISIBLE); getAccessibilityButton().setLongClickable(longClickable); updateContextualContainerVisibility(); } public void updateRotateSuggestionButtonStyle(@StyleRes int style, boolean setIcon) { Loading Loading @@ -839,6 +842,7 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav getRotateSuggestionButton().setVisibility(vis); mShowRotateButton = visible; updateContextualContainerVisibility(); // Stop any active animations if hidden if (!visible && mRotateSuggestionIcon.canAnimate()) { Loading @@ -855,6 +859,13 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav public boolean isRotateButtonVisible() { return mShowRotateButton; } private void updateContextualContainerVisibility() { // Only show the menu container when one of its buttons are visible getMenuContainer().setVisibility((mShowAccessibilityButton || mShowRotateButton || mShowMenu || (mNavigationIconHints & StatusBarManager.NAVIGATION_HINT_IME_SHOWN) != 0) ? VISIBLE : INVISIBLE); } void hideRecentsOnboarding() { mRecentsOnboarding.hide(true); } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NearestTouchFrame.java +0 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,6 @@ public class NearestTouchFrame extends FrameLayout { return mClickableChildren .stream() .filter(v -> v.isAttachedToWindow()) .filter(v -> v.isFocusable()) .map(v -> new Pair<>(distance(v, event), v)) .min(Comparator.comparingInt(f -> f.first)) .get().second; Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NearestTouchFrameTest.java +0 −18 Original line number Diff line number Diff line Loading @@ -171,23 +171,6 @@ public class NearestTouchFrameTest extends SysuiTestCase { ev.recycle(); } @Test public void testFurtherSelectedWhenCloserNotFocusable() { View closer = mockViewAt(0, 0, 10, 10); View further = mockViewAt(20, 0, 10, 10); closer.setFocusable(false); mNearestTouchFrame.addView(closer); mNearestTouchFrame.addView(further); mNearestTouchFrame.onMeasure(0, 0); MotionEvent ev = MotionEvent.obtain(0, 0, 0, 12 /* x */, 5 /* y */, 0); mNearestTouchFrame.onTouchEvent(ev); verify(further).onTouchEvent(eq(ev)); ev.recycle(); } private View mockViewAt(int x, int y, int width, int height) { View v = spy(new View(mContext)); doAnswer(invocation -> { Loading @@ -204,7 +187,6 @@ public class NearestTouchFrameTest extends SysuiTestCase { v.setRight(width); v.setTop(0); v.setBottom(height); v.setFocusable(true); return v; } } No newline at end of file Loading
packages/SystemUI/res/layout/menu_ime.xml +0 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ android:id="@+id/menu_container" android:layout_width="@dimen/navigation_key_width" android:layout_height="match_parent" android:focusable="false" android:importantForAccessibility="no" > <!-- Use nav button width & height=match_parent for parent FrameLayout and buttons because they Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java +11 −0 Original line number Diff line number Diff line Loading @@ -615,6 +615,7 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav ((mNavigationIconHints & StatusBarManager.NAVIGATION_HINT_IME_SHOWN) != 0); getImeSwitchButton().setVisibility(showImeButton ? View.VISIBLE : View.INVISIBLE); getImeSwitchButton().setImageDrawable(mImeIcon); updateContextualContainerVisibility(); // Update menu button, visibility logic in method setMenuVisibility(mShowMenu, true); Loading Loading @@ -796,6 +797,7 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav ((mNavigationIconHints & StatusBarManager.NAVIGATION_HINT_IME_SHOWN) == 0); getMenuButton().setVisibility(shouldShow ? View.VISIBLE : View.INVISIBLE); updateContextualContainerVisibility(); } public void setAccessibilityButtonState(final boolean visible, final boolean longClickable) { Loading @@ -810,6 +812,7 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav getAccessibilityButton().setVisibility(visible ? View.VISIBLE : View.INVISIBLE); getAccessibilityButton().setLongClickable(longClickable); updateContextualContainerVisibility(); } public void updateRotateSuggestionButtonStyle(@StyleRes int style, boolean setIcon) { Loading Loading @@ -839,6 +842,7 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav getRotateSuggestionButton().setVisibility(vis); mShowRotateButton = visible; updateContextualContainerVisibility(); // Stop any active animations if hidden if (!visible && mRotateSuggestionIcon.canAnimate()) { Loading @@ -855,6 +859,13 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav public boolean isRotateButtonVisible() { return mShowRotateButton; } private void updateContextualContainerVisibility() { // Only show the menu container when one of its buttons are visible getMenuContainer().setVisibility((mShowAccessibilityButton || mShowRotateButton || mShowMenu || (mNavigationIconHints & StatusBarManager.NAVIGATION_HINT_IME_SHOWN) != 0) ? VISIBLE : INVISIBLE); } void hideRecentsOnboarding() { mRecentsOnboarding.hide(true); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NearestTouchFrame.java +0 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,6 @@ public class NearestTouchFrame extends FrameLayout { return mClickableChildren .stream() .filter(v -> v.isAttachedToWindow()) .filter(v -> v.isFocusable()) .map(v -> new Pair<>(distance(v, event), v)) .min(Comparator.comparingInt(f -> f.first)) .get().second; Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NearestTouchFrameTest.java +0 −18 Original line number Diff line number Diff line Loading @@ -171,23 +171,6 @@ public class NearestTouchFrameTest extends SysuiTestCase { ev.recycle(); } @Test public void testFurtherSelectedWhenCloserNotFocusable() { View closer = mockViewAt(0, 0, 10, 10); View further = mockViewAt(20, 0, 10, 10); closer.setFocusable(false); mNearestTouchFrame.addView(closer); mNearestTouchFrame.addView(further); mNearestTouchFrame.onMeasure(0, 0); MotionEvent ev = MotionEvent.obtain(0, 0, 0, 12 /* x */, 5 /* y */, 0); mNearestTouchFrame.onTouchEvent(ev); verify(further).onTouchEvent(eq(ev)); ev.recycle(); } private View mockViewAt(int x, int y, int width, int height) { View v = spy(new View(mContext)); doAnswer(invocation -> { Loading @@ -204,7 +187,6 @@ public class NearestTouchFrameTest extends SysuiTestCase { v.setRight(width); v.setTop(0); v.setBottom(height); v.setFocusable(true); return v; } } No newline at end of file