Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/EdgeBackGestureHandler.java +17 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.systemui.statusbar.phone; import static android.view.Display.INVALID_DISPLAY; import static android.view.View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; import static android.view.View.NAVIGATION_BAR_TRANSIENT; import android.content.Context; import android.content.pm.ParceledListSlice; Loading Loading @@ -144,6 +146,7 @@ public class EdgeBackGestureHandler implements DisplayListener { private boolean mIsAttached; private boolean mIsGesturalModeEnabled; private boolean mIsEnabled; private boolean mIsInTransientImmersiveStickyState; private InputMonitor mInputMonitor; private InputEventReceiver mInputEventReceiver; Loading Loading @@ -205,6 +208,12 @@ public class EdgeBackGestureHandler implements DisplayListener { updateCurrentUserResources(currentUserContext.getResources()); } public void onSystemUiVisibilityChanged(int systemUiVisibility) { mIsInTransientImmersiveStickyState = (systemUiVisibility & SYSTEM_UI_FLAG_IMMERSIVE_STICKY) != 0 && (systemUiVisibility & NAVIGATION_BAR_TRANSIENT) != 0; } private void disposeInputChannel() { if (mInputEventReceiver != null) { mInputEventReceiver.dispose(); Loading Loading @@ -305,13 +314,21 @@ public class EdgeBackGestureHandler implements DisplayListener { } private boolean isWithinTouchRegion(int x, int y) { // Disallow if over the IME if (y > (mDisplaySize.y - Math.max(mImeHeight, mNavBarHeight))) { return false; } // Disallow if too far from the edge if (x > mEdgeWidth + mLeftInset && x < (mDisplaySize.x - mEdgeWidth - mRightInset)) { return false; } // Always allow if the user is in a transient sticky immersive state if (mIsInTransientImmersiveStickyState) { return true; } boolean isInExcludedRegion = mExcludeRegion.contains(x, y); if (isInExcludedRegion) { mOverviewProxyService.notifyBackAction(false /* completed */, -1, -1, Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java +3 −0 Original line number Diff line number Diff line Loading @@ -539,6 +539,9 @@ public class NavigationBarFragment extends LifecycleFragment implements Callback } mAutoHideController.touchAutoHide(); } if (mNavigationBarView != null) { mNavigationBarView.onSystemUiVisibilityChanged(mSystemUiVisibility); } } mLightBarController.onNavigationVisibilityChanged( vis, mask, nbModeChanged, mNavigationBarMode, navbarColorManagedByIme); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java +4 −0 Original line number Diff line number Diff line Loading @@ -346,6 +346,10 @@ public class NavigationBarView extends FrameLayout implements return super.onTouchEvent(event); } void onSystemUiVisibilityChanged(int systemUiVisibility) { mEdgeBackGestureHandler.onSystemUiVisibilityChanged(systemUiVisibility); } void onBarTransition(int newMode) { if (newMode == MODE_OPAQUE) { // If the nav bar background is opaque, stop auto tinting since we know the icons are Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/EdgeBackGestureHandler.java +17 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.systemui.statusbar.phone; import static android.view.Display.INVALID_DISPLAY; import static android.view.View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; import static android.view.View.NAVIGATION_BAR_TRANSIENT; import android.content.Context; import android.content.pm.ParceledListSlice; Loading Loading @@ -144,6 +146,7 @@ public class EdgeBackGestureHandler implements DisplayListener { private boolean mIsAttached; private boolean mIsGesturalModeEnabled; private boolean mIsEnabled; private boolean mIsInTransientImmersiveStickyState; private InputMonitor mInputMonitor; private InputEventReceiver mInputEventReceiver; Loading Loading @@ -205,6 +208,12 @@ public class EdgeBackGestureHandler implements DisplayListener { updateCurrentUserResources(currentUserContext.getResources()); } public void onSystemUiVisibilityChanged(int systemUiVisibility) { mIsInTransientImmersiveStickyState = (systemUiVisibility & SYSTEM_UI_FLAG_IMMERSIVE_STICKY) != 0 && (systemUiVisibility & NAVIGATION_BAR_TRANSIENT) != 0; } private void disposeInputChannel() { if (mInputEventReceiver != null) { mInputEventReceiver.dispose(); Loading Loading @@ -305,13 +314,21 @@ public class EdgeBackGestureHandler implements DisplayListener { } private boolean isWithinTouchRegion(int x, int y) { // Disallow if over the IME if (y > (mDisplaySize.y - Math.max(mImeHeight, mNavBarHeight))) { return false; } // Disallow if too far from the edge if (x > mEdgeWidth + mLeftInset && x < (mDisplaySize.x - mEdgeWidth - mRightInset)) { return false; } // Always allow if the user is in a transient sticky immersive state if (mIsInTransientImmersiveStickyState) { return true; } boolean isInExcludedRegion = mExcludeRegion.contains(x, y); if (isInExcludedRegion) { mOverviewProxyService.notifyBackAction(false /* completed */, -1, -1, Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java +3 −0 Original line number Diff line number Diff line Loading @@ -539,6 +539,9 @@ public class NavigationBarFragment extends LifecycleFragment implements Callback } mAutoHideController.touchAutoHide(); } if (mNavigationBarView != null) { mNavigationBarView.onSystemUiVisibilityChanged(mSystemUiVisibility); } } mLightBarController.onNavigationVisibilityChanged( vis, mask, nbModeChanged, mNavigationBarMode, navbarColorManagedByIme); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java +4 −0 Original line number Diff line number Diff line Loading @@ -346,6 +346,10 @@ public class NavigationBarView extends FrameLayout implements return super.onTouchEvent(event); } void onSystemUiVisibilityChanged(int systemUiVisibility) { mEdgeBackGestureHandler.onSystemUiVisibilityChanged(systemUiVisibility); } void onBarTransition(int newMode) { if (newMode == MODE_OPAQUE) { // If the nav bar background is opaque, stop auto tinting since we know the icons are Loading