Loading packages/SystemUI/res/layout/navigation_layout.xml +2 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,8 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:clipChildren="false" android:clipToPadding="false"> android:clipToPadding="false" systemui:isVertical="false"> <LinearLayout android:id="@+id/ends_group" Loading packages/SystemUI/res/layout/navigation_layout_vertical.xml +2 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,8 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:clipChildren="false" android:clipToPadding="false"> android:clipToPadding="false" systemui:isVertical="true"> <com.android.systemui.navigationbar.buttons.ReverseLinearLayout android:id="@+id/ends_group" Loading packages/SystemUI/res/values/attrs.xml +2 −0 Original line number Diff line number Diff line Loading @@ -143,6 +143,8 @@ <attr name="handleColor" format="color" /> <attr name="scrimColor" format="color" /> <attr name="isVertical" format="boolean" /> <!-- Used display CarrierText in Keyguard or QS Footer --> <declare-styleable name="CarrierText"> <attr name="allCaps" format="boolean" /> Loading packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +1 −1 Original line number Diff line number Diff line Loading @@ -1124,7 +1124,7 @@ public class NavigationBar implements View.OnAttachStateChangeListener, } // If an incoming call is ringing, HOME is totally disabled. // (The user is already on the InCallUI at this point, // and his ONLY options are to answer or reject the call.) // and their ONLY options are to answer or reject the call.) switch (event.getAction()) { case MotionEvent.ACTION_DOWN: mHomeBlockedThisTouch = false; Loading packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java +19 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,7 @@ import com.android.systemui.navigationbar.buttons.ContextualButton; import com.android.systemui.navigationbar.buttons.ContextualButtonGroup; import com.android.systemui.navigationbar.buttons.DeadZone; import com.android.systemui.navigationbar.buttons.KeyButtonDrawable; import com.android.systemui.navigationbar.buttons.NearestTouchFrame; import com.android.systemui.navigationbar.buttons.RotationContextButton; import com.android.systemui.navigationbar.gestural.EdgeBackGestureHandler; import com.android.systemui.navigationbar.gestural.FloatingRotationButton; Loading @@ -97,6 +98,8 @@ import com.android.wm.shell.legacysplitscreen.LegacySplitScreen; import com.android.wm.shell.pip.Pip; import java.io.PrintWriter; import java.util.HashMap; import java.util.Map; import java.util.function.Consumer; public class NavigationBarView extends FrameLayout implements Loading Loading @@ -129,6 +132,7 @@ public class NavigationBarView extends FrameLayout implements private final Region mTmpRegion = new Region(); private final int[] mTmpPosition = new int[2]; private Rect mTmpBounds = new Rect(); private Map<View, Rect> mButtonFullTouchableRegions = new HashMap<>(); private KeyButtonDrawable mBackIcon; private KeyButtonDrawable mHomeDefaultIcon; Loading Loading @@ -973,9 +977,18 @@ public class NavigationBarView extends FrameLayout implements getButtonLocations(true /* includeFloatingRotationButton */, true /* inScreen */)); } private void updateButtonTouchRegionCache() { FrameLayout navBarLayout = mIsVertical ? mNavigationInflaterView.mVertical : mNavigationInflaterView.mHorizontal; mButtonFullTouchableRegions = ((NearestTouchFrame) navBarLayout .findViewById(R.id.nav_buttons)).getFullTouchableChildRegions(); } private Region getButtonLocations(boolean includeFloatingRotationButton, boolean inScreenSpace) { mTmpRegion.setEmpty(); updateButtonTouchRegionCache(); updateButtonLocation(getBackButton(), inScreenSpace); updateButtonLocation(getHomeButton(), inScreenSpace); updateButtonLocation(getRecentsButton(), inScreenSpace); Loading @@ -999,6 +1012,12 @@ public class NavigationBarView extends FrameLayout implements if (view == null || !button.isVisible()) { return; } // If the button is tappable from perspective of NearestTouchFrame, then we'll // include the regions where the tap is valid instead of just the button layout location if (mButtonFullTouchableRegions.containsKey(view)) { mTmpRegion.op(mButtonFullTouchableRegions.get(view), Op.UNION); return; } updateButtonLocation(view, inScreenSpace); } Loading Loading
packages/SystemUI/res/layout/navigation_layout.xml +2 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,8 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:clipChildren="false" android:clipToPadding="false"> android:clipToPadding="false" systemui:isVertical="false"> <LinearLayout android:id="@+id/ends_group" Loading
packages/SystemUI/res/layout/navigation_layout_vertical.xml +2 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,8 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:clipChildren="false" android:clipToPadding="false"> android:clipToPadding="false" systemui:isVertical="true"> <com.android.systemui.navigationbar.buttons.ReverseLinearLayout android:id="@+id/ends_group" Loading
packages/SystemUI/res/values/attrs.xml +2 −0 Original line number Diff line number Diff line Loading @@ -143,6 +143,8 @@ <attr name="handleColor" format="color" /> <attr name="scrimColor" format="color" /> <attr name="isVertical" format="boolean" /> <!-- Used display CarrierText in Keyguard or QS Footer --> <declare-styleable name="CarrierText"> <attr name="allCaps" format="boolean" /> Loading
packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +1 −1 Original line number Diff line number Diff line Loading @@ -1124,7 +1124,7 @@ public class NavigationBar implements View.OnAttachStateChangeListener, } // If an incoming call is ringing, HOME is totally disabled. // (The user is already on the InCallUI at this point, // and his ONLY options are to answer or reject the call.) // and their ONLY options are to answer or reject the call.) switch (event.getAction()) { case MotionEvent.ACTION_DOWN: mHomeBlockedThisTouch = false; Loading
packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java +19 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,7 @@ import com.android.systemui.navigationbar.buttons.ContextualButton; import com.android.systemui.navigationbar.buttons.ContextualButtonGroup; import com.android.systemui.navigationbar.buttons.DeadZone; import com.android.systemui.navigationbar.buttons.KeyButtonDrawable; import com.android.systemui.navigationbar.buttons.NearestTouchFrame; import com.android.systemui.navigationbar.buttons.RotationContextButton; import com.android.systemui.navigationbar.gestural.EdgeBackGestureHandler; import com.android.systemui.navigationbar.gestural.FloatingRotationButton; Loading @@ -97,6 +98,8 @@ import com.android.wm.shell.legacysplitscreen.LegacySplitScreen; import com.android.wm.shell.pip.Pip; import java.io.PrintWriter; import java.util.HashMap; import java.util.Map; import java.util.function.Consumer; public class NavigationBarView extends FrameLayout implements Loading Loading @@ -129,6 +132,7 @@ public class NavigationBarView extends FrameLayout implements private final Region mTmpRegion = new Region(); private final int[] mTmpPosition = new int[2]; private Rect mTmpBounds = new Rect(); private Map<View, Rect> mButtonFullTouchableRegions = new HashMap<>(); private KeyButtonDrawable mBackIcon; private KeyButtonDrawable mHomeDefaultIcon; Loading Loading @@ -973,9 +977,18 @@ public class NavigationBarView extends FrameLayout implements getButtonLocations(true /* includeFloatingRotationButton */, true /* inScreen */)); } private void updateButtonTouchRegionCache() { FrameLayout navBarLayout = mIsVertical ? mNavigationInflaterView.mVertical : mNavigationInflaterView.mHorizontal; mButtonFullTouchableRegions = ((NearestTouchFrame) navBarLayout .findViewById(R.id.nav_buttons)).getFullTouchableChildRegions(); } private Region getButtonLocations(boolean includeFloatingRotationButton, boolean inScreenSpace) { mTmpRegion.setEmpty(); updateButtonTouchRegionCache(); updateButtonLocation(getBackButton(), inScreenSpace); updateButtonLocation(getHomeButton(), inScreenSpace); updateButtonLocation(getRecentsButton(), inScreenSpace); Loading @@ -999,6 +1012,12 @@ public class NavigationBarView extends FrameLayout implements if (view == null || !button.isVisible()) { return; } // If the button is tappable from perspective of NearestTouchFrame, then we'll // include the regions where the tap is valid instead of just the button layout location if (mButtonFullTouchableRegions.containsKey(view)) { mTmpRegion.op(mButtonFullTouchableRegions.get(view), Op.UNION); return; } updateButtonLocation(view, inScreenSpace); } Loading