Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/EdgeBackGestureHandler.java +22 −6 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ import com.android.systemui.recents.OverviewProxyService; import com.android.systemui.shared.system.QuickStepContract; import com.android.systemui.shared.system.WindowManagerWrapper; import java.io.PrintWriter; import java.util.concurrent.Executor; /** Loading Loading @@ -118,7 +119,7 @@ public class EdgeBackGestureHandler implements DisplayListener { private final Region mExcludeRegion = new Region(); // The edge width where touch down is allowed private final int mEdgeWidth; private int mEdgeWidth; // The slop to distinguish between horizontal and vertical motion private final float mTouchSlop; // Duration after which we consider the event as longpress. Loading Loading @@ -163,10 +164,6 @@ public class EdgeBackGestureHandler implements DisplayListener { mWm = context.getSystemService(WindowManager.class); mOverviewProxyService = overviewProxyService; // TODO: Get this for the current user mEdgeWidth = res.getDimensionPixelSize( com.android.internal.R.dimen.config_backGestureInset); // Reduce the default touch slop to ensure that we can intercept the gesture // before the app starts to react to it. // TODO(b/130352502) Tune this value and extract into a constant Loading @@ -176,6 +173,12 @@ public class EdgeBackGestureHandler implements DisplayListener { mNavBarHeight = res.getDimensionPixelSize(R.dimen.navigation_bar_frame_height); mMinArrowPosition = res.getDimensionPixelSize(R.dimen.navigation_edge_arrow_min_y); mFingerOffset = res.getDimensionPixelSize(R.dimen.navigation_edge_finger_offset); updateCurrentUserResources(res); } public void updateCurrentUserResources(Resources res) { mEdgeWidth = res.getDimensionPixelSize( com.android.internal.R.dimen.config_backGestureInset); } /** Loading @@ -194,9 +197,10 @@ public class EdgeBackGestureHandler implements DisplayListener { updateIsEnabled(); } public void onNavigationModeChanged(int mode) { public void onNavigationModeChanged(int mode, Context currentUserContext) { mIsGesturalModeEnabled = QuickStepContract.isGesturalMode(mode); updateIsEnabled(); updateCurrentUserResources(currentUserContext.getResources()); } private void disposeInputChannel() { Loading Loading @@ -270,6 +274,8 @@ public class EdgeBackGestureHandler implements DisplayListener { | WindowManager.LayoutParams.FLAG_SPLIT_TOUCH | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN, PixelFormat.TRANSLUCENT); mEdgePanelLp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS; mEdgePanelLp.setTitle(TAG + mDisplayId); mEdgePanelLp.accessibilityTitle = mContext.getString(R.string.nav_bar_edge_panel); mEdgePanelLp.windowAnimations = 0; Loading Loading @@ -449,6 +455,16 @@ public class EdgeBackGestureHandler implements DisplayListener { mRightInset = rightInset; } public void dump(PrintWriter pw) { pw.println("EdgeBackGestureHandler:"); pw.println(" mIsEnabled=" + mIsEnabled); pw.println(" mAllowGesture=" + mAllowGesture); pw.println(" mExcludeRegion=" + mExcludeRegion); pw.println(" mImeHeight=" + mImeHeight); pw.println(" mIsAttached=" + mIsAttached); pw.println(" mEdgeWidth=" + mEdgeWidth); } class SysUiInputEventReceiver extends InputEventReceiver { SysUiInputEventReceiver(InputChannel channel, Looper looper) { super(channel, looper); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java +3 −1 Original line number Diff line number Diff line Loading @@ -772,9 +772,10 @@ public class NavigationBarView extends FrameLayout implements @Override public void onNavigationModeChanged(int mode) { Context curUserCtx = Dependency.get(NavigationModeController.class).getCurrentUserContext(); mNavBarMode = mode; mBarTransitions.onNavigationModeChanged(mNavBarMode); mEdgeBackGestureHandler.onNavigationModeChanged(mNavBarMode); mEdgeBackGestureHandler.onNavigationModeChanged(mNavBarMode, curUserCtx); mRecentsOnboarding.onNavigationModeChanged(mNavBarMode); getRotateSuggestionButton().onNavigationModeChanged(mNavBarMode); Loading Loading @@ -1103,6 +1104,7 @@ public class NavigationBarView extends FrameLayout implements mContextualButtonGroup.dump(pw); mRecentsOnboarding.dump(pw); mTintController.dump(pw); mEdgeBackGestureHandler.dump(pw); } @Override Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationModeController.java +1 −1 Original line number Diff line number Diff line Loading @@ -224,7 +224,7 @@ public class NavigationModeController implements Dumpable { return mode; } private Context getCurrentUserContext() { public Context getCurrentUserContext() { int userId = ActivityManagerWrapper.getInstance().getCurrentUserId(); if (DEBUG) { Log.d(TAG, "getCurrentUserContext: contextUser=" + mContext.getUserId() Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/EdgeBackGestureHandler.java +22 −6 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ import com.android.systemui.recents.OverviewProxyService; import com.android.systemui.shared.system.QuickStepContract; import com.android.systemui.shared.system.WindowManagerWrapper; import java.io.PrintWriter; import java.util.concurrent.Executor; /** Loading Loading @@ -118,7 +119,7 @@ public class EdgeBackGestureHandler implements DisplayListener { private final Region mExcludeRegion = new Region(); // The edge width where touch down is allowed private final int mEdgeWidth; private int mEdgeWidth; // The slop to distinguish between horizontal and vertical motion private final float mTouchSlop; // Duration after which we consider the event as longpress. Loading Loading @@ -163,10 +164,6 @@ public class EdgeBackGestureHandler implements DisplayListener { mWm = context.getSystemService(WindowManager.class); mOverviewProxyService = overviewProxyService; // TODO: Get this for the current user mEdgeWidth = res.getDimensionPixelSize( com.android.internal.R.dimen.config_backGestureInset); // Reduce the default touch slop to ensure that we can intercept the gesture // before the app starts to react to it. // TODO(b/130352502) Tune this value and extract into a constant Loading @@ -176,6 +173,12 @@ public class EdgeBackGestureHandler implements DisplayListener { mNavBarHeight = res.getDimensionPixelSize(R.dimen.navigation_bar_frame_height); mMinArrowPosition = res.getDimensionPixelSize(R.dimen.navigation_edge_arrow_min_y); mFingerOffset = res.getDimensionPixelSize(R.dimen.navigation_edge_finger_offset); updateCurrentUserResources(res); } public void updateCurrentUserResources(Resources res) { mEdgeWidth = res.getDimensionPixelSize( com.android.internal.R.dimen.config_backGestureInset); } /** Loading @@ -194,9 +197,10 @@ public class EdgeBackGestureHandler implements DisplayListener { updateIsEnabled(); } public void onNavigationModeChanged(int mode) { public void onNavigationModeChanged(int mode, Context currentUserContext) { mIsGesturalModeEnabled = QuickStepContract.isGesturalMode(mode); updateIsEnabled(); updateCurrentUserResources(currentUserContext.getResources()); } private void disposeInputChannel() { Loading Loading @@ -270,6 +274,8 @@ public class EdgeBackGestureHandler implements DisplayListener { | WindowManager.LayoutParams.FLAG_SPLIT_TOUCH | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN, PixelFormat.TRANSLUCENT); mEdgePanelLp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS; mEdgePanelLp.setTitle(TAG + mDisplayId); mEdgePanelLp.accessibilityTitle = mContext.getString(R.string.nav_bar_edge_panel); mEdgePanelLp.windowAnimations = 0; Loading Loading @@ -449,6 +455,16 @@ public class EdgeBackGestureHandler implements DisplayListener { mRightInset = rightInset; } public void dump(PrintWriter pw) { pw.println("EdgeBackGestureHandler:"); pw.println(" mIsEnabled=" + mIsEnabled); pw.println(" mAllowGesture=" + mAllowGesture); pw.println(" mExcludeRegion=" + mExcludeRegion); pw.println(" mImeHeight=" + mImeHeight); pw.println(" mIsAttached=" + mIsAttached); pw.println(" mEdgeWidth=" + mEdgeWidth); } class SysUiInputEventReceiver extends InputEventReceiver { SysUiInputEventReceiver(InputChannel channel, Looper looper) { super(channel, looper); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java +3 −1 Original line number Diff line number Diff line Loading @@ -772,9 +772,10 @@ public class NavigationBarView extends FrameLayout implements @Override public void onNavigationModeChanged(int mode) { Context curUserCtx = Dependency.get(NavigationModeController.class).getCurrentUserContext(); mNavBarMode = mode; mBarTransitions.onNavigationModeChanged(mNavBarMode); mEdgeBackGestureHandler.onNavigationModeChanged(mNavBarMode); mEdgeBackGestureHandler.onNavigationModeChanged(mNavBarMode, curUserCtx); mRecentsOnboarding.onNavigationModeChanged(mNavBarMode); getRotateSuggestionButton().onNavigationModeChanged(mNavBarMode); Loading Loading @@ -1103,6 +1104,7 @@ public class NavigationBarView extends FrameLayout implements mContextualButtonGroup.dump(pw); mRecentsOnboarding.dump(pw); mTintController.dump(pw); mEdgeBackGestureHandler.dump(pw); } @Override Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationModeController.java +1 −1 Original line number Diff line number Diff line Loading @@ -224,7 +224,7 @@ public class NavigationModeController implements Dumpable { return mode; } private Context getCurrentUserContext() { public Context getCurrentUserContext() { int userId = ActivityManagerWrapper.getInstance().getCurrentUserId(); if (DEBUG) { Log.d(TAG, "getCurrentUserContext: contextUser=" + mContext.getUserId() Loading