Loading packages/SystemUI/src/com/android/systemui/shade/StatusBarLongPressGestureDetector.kt→packages/SystemUI/src/com/android/systemui/shade/LongPressGestureDetector.kt +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ import javax.inject.Inject /** Accepts touch events, detects long press, and calls ShadeViewController#onStatusBarLongPress. */ @SysUISingleton class StatusBarLongPressGestureDetector class LongPressGestureDetector @Inject constructor(context: Context, val shadeViewController: ShadeViewController) { val gestureDetector = Loading packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +8 −11 Original line number Diff line number Diff line Loading @@ -2053,9 +2053,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump } if (mQsController.getExpanded()) { mQsController.flingQs(0, FLING_COLLAPSE); } else if (mBarState == KEYGUARD) { mLockscreenShadeTransitionController.goToLockedShade( /* expandedView= */null, /* needsQSAnimation= */false); } else { expand(true /* animate */); } Loading Loading @@ -3112,7 +3109,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump if (isTracking()) { onTrackingStopped(true); } if (isExpanded() && mBarState != KEYGUARD && !mQsController.getExpanded()) { if (isExpanded() && !mQsController.getExpanded()) { mShadeLog.d("Status Bar was long pressed. Expanding to QS."); expandToQs(); } else { Loading Loading @@ -5094,13 +5091,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump } boolean handled = mHeadsUpTouchHelper.onTouchEvent(event); // This touch session has already resulted in shade expansion. Ignore everything else. if (ShadeExpandsOnStatusBarLongPress.isEnabled() && event.getActionMasked() != MotionEvent.ACTION_DOWN && event.getDownTime() == mStatusBarLongPressDowntime) { mShadeLog.d("Touch has same down time as Status Bar long press. Ignoring."); return false; } if (!mHeadsUpTouchHelper.isTrackingHeadsUp() && mQsController.handleTouch( event, isFullyCollapsed(), isShadeOrQsHeightAnimationRunning())) { if (event.getActionMasked() != MotionEvent.ACTION_MOVE) { Loading @@ -5108,6 +5098,13 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump } return true; } // This touch session has already resulted in shade expansion. Ignore everything else. if (ShadeExpandsOnStatusBarLongPress.isEnabled() && event.getActionMasked() != MotionEvent.ACTION_DOWN && event.getDownTime() == mStatusBarLongPressDowntime) { mShadeLog.d("Touch has same down time as Status Bar long press. Ignoring."); return false; } if (event.getActionMasked() == MotionEvent.ACTION_DOWN && isFullyCollapsed()) { mMetricsLogger.count(COUNTER_PANEL_OPEN, 1); handled = true; Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +0 −10 Original line number Diff line number Diff line Loading @@ -171,14 +171,12 @@ import com.android.systemui.shade.NotificationShadeWindowView; import com.android.systemui.shade.NotificationShadeWindowViewController; import com.android.systemui.shade.QuickSettingsController; import com.android.systemui.shade.ShadeController; import com.android.systemui.shade.ShadeExpandsOnStatusBarLongPress; import com.android.systemui.shade.ShadeExpansionChangeEvent; import com.android.systemui.shade.ShadeExpansionListener; import com.android.systemui.shade.ShadeExpansionStateManager; import com.android.systemui.shade.ShadeLogger; import com.android.systemui.shade.ShadeSurface; import com.android.systemui.shade.ShadeViewController; import com.android.systemui.shade.StatusBarLongPressGestureDetector; import com.android.systemui.shared.recents.utilities.Utilities; import com.android.systemui.shared.statusbar.phone.BarTransitions; import com.android.systemui.statusbar.AutoHideUiElement; Loading Loading @@ -368,7 +366,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { private PhoneStatusBarViewController mPhoneStatusBarViewController; private PhoneStatusBarTransitions mStatusBarTransitions; private final Provider<StatusBarLongPressGestureDetector> mStatusBarLongPressGestureDetector; private final AuthRippleController mAuthRippleController; @WindowVisibleState private int mStatusBarWindowState = WINDOW_STATE_SHOWING; private final NotificationShadeWindowController mNotificationShadeWindowController; Loading Loading @@ -674,7 +671,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { ShadeController shadeController, WindowRootViewVisibilityInteractor windowRootViewVisibilityInteractor, StatusBarKeyguardViewManager statusBarKeyguardViewManager, Provider<StatusBarLongPressGestureDetector> statusBarLongPressGestureDetector, ViewMediatorCallback viewMediatorCallback, InitController initController, @Named(TIME_TICK_HANDLER_NAME) Handler timeTickHandler, Loading Loading @@ -782,7 +778,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mShadeController = shadeController; mWindowRootViewVisibilityInteractor = windowRootViewVisibilityInteractor; mStatusBarKeyguardViewManager = statusBarKeyguardViewManager; mStatusBarLongPressGestureDetector = statusBarLongPressGestureDetector; mKeyguardViewMediatorCallback = viewMediatorCallback; mInitController = initController; mPluginDependencyProvider = pluginDependencyProvider; Loading Loading @@ -1532,11 +1527,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { // to touch outside the customizer to close it, such as on the status or nav bar. mShadeController.onStatusBarTouch(event); } if (ShadeExpandsOnStatusBarLongPress.isEnabled() && mStatusBarStateController.getState() == StatusBarState.KEYGUARD) { mStatusBarLongPressGestureDetector.get().handleTouch(event); } return getNotificationShadeWindowView().onTouchEvent(event); }; } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java +6 −8 Original line number Diff line number Diff line Loading @@ -39,8 +39,8 @@ import com.android.systemui.Dependency; import com.android.systemui.Flags; import com.android.systemui.Gefingerpoken; import com.android.systemui.res.R; import com.android.systemui.shade.LongPressGestureDetector; import com.android.systemui.shade.ShadeExpandsOnStatusBarLongPress; import com.android.systemui.shade.StatusBarLongPressGestureDetector; import com.android.systemui.statusbar.phone.userswitcher.StatusBarUserSwitcherContainer; import com.android.systemui.statusbar.window.StatusBarWindowControllerStore; import com.android.systemui.user.ui.binder.StatusBarUserChipViewBinder; Loading Loading @@ -69,7 +69,7 @@ public class PhoneStatusBarView extends FrameLayout { private InsetsFetcher mInsetsFetcher; private int mDensity; private float mFontScale; private StatusBarLongPressGestureDetector mStatusBarLongPressGestureDetector; private LongPressGestureDetector mLongPressGestureDetector; /** * Draw this many pixels into the left/right side of the cutout to optimally use the space Loading @@ -81,10 +81,9 @@ public class PhoneStatusBarView extends FrameLayout { mStatusBarWindowControllerStore = Dependency.get(StatusBarWindowControllerStore.class); } void setLongPressGestureDetector( StatusBarLongPressGestureDetector statusBarLongPressGestureDetector) { void setLongPressGestureDetector(LongPressGestureDetector longPressGestureDetector) { if (ShadeExpandsOnStatusBarLongPress.isEnabled()) { mStatusBarLongPressGestureDetector = statusBarLongPressGestureDetector; mLongPressGestureDetector = longPressGestureDetector; } } Loading Loading @@ -208,9 +207,8 @@ public class PhoneStatusBarView extends FrameLayout { @Override public boolean onTouchEvent(MotionEvent event) { if (ShadeExpandsOnStatusBarLongPress.isEnabled() && mStatusBarLongPressGestureDetector != null) { mStatusBarLongPressGestureDetector.handleTouch(event); if (ShadeExpandsOnStatusBarLongPress.isEnabled() && mLongPressGestureDetector != null) { mLongPressGestureDetector.handleTouch(event); } if (mTouchEventHandler == null) { Log.w( Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt +5 −5 Original line number Diff line number Diff line Loading @@ -34,11 +34,11 @@ import com.android.systemui.plugins.DarkIconDispatcher import com.android.systemui.res.R import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.scene.ui.view.WindowRootView import com.android.systemui.shade.LongPressGestureDetector import com.android.systemui.shade.ShadeController import com.android.systemui.shade.ShadeExpandsOnStatusBarLongPress import com.android.systemui.shade.ShadeLogger import com.android.systemui.shade.ShadeViewController import com.android.systemui.shade.StatusBarLongPressGestureDetector import com.android.systemui.shade.domain.interactor.PanelExpansionInteractor import com.android.systemui.shared.animation.UnfoldMoveFromCenterAnimator import com.android.systemui.statusbar.data.repository.StatusBarContentInsetsProviderStore Loading Loading @@ -69,7 +69,7 @@ private constructor( private val shadeController: ShadeController, private val shadeViewController: ShadeViewController, private val panelExpansionInteractor: PanelExpansionInteractor, private val statusBarLongPressGestureDetector: Provider<StatusBarLongPressGestureDetector>, private val longPressGestureDetector: Provider<LongPressGestureDetector>, private val windowRootView: Provider<WindowRootView>, private val shadeLogger: ShadeLogger, private val moveFromCenterAnimationController: StatusBarMoveFromCenterAnimationController?, Loading Loading @@ -119,7 +119,7 @@ private constructor( addCursorSupportToIconContainers() if (ShadeExpandsOnStatusBarLongPress.isEnabled) { mView.setLongPressGestureDetector(statusBarLongPressGestureDetector.get()) mView.setLongPressGestureDetector(longPressGestureDetector.get()) } progressProvider?.setReadyToHandleTransition(true) Loading Loading @@ -336,7 +336,7 @@ private constructor( private val shadeController: ShadeController, private val shadeViewController: ShadeViewController, private val panelExpansionInteractor: PanelExpansionInteractor, private val statusBarLongPressGestureDetector: Provider<StatusBarLongPressGestureDetector>, private val longPressGestureDetector: Provider<LongPressGestureDetector>, private val windowRootView: Provider<WindowRootView>, private val shadeLogger: ShadeLogger, private val viewUtil: ViewUtil, Loading @@ -361,7 +361,7 @@ private constructor( shadeController, shadeViewController, panelExpansionInteractor, statusBarLongPressGestureDetector, longPressGestureDetector, windowRootView, shadeLogger, statusBarMoveFromCenterAnimationController, Loading Loading
packages/SystemUI/src/com/android/systemui/shade/StatusBarLongPressGestureDetector.kt→packages/SystemUI/src/com/android/systemui/shade/LongPressGestureDetector.kt +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ import javax.inject.Inject /** Accepts touch events, detects long press, and calls ShadeViewController#onStatusBarLongPress. */ @SysUISingleton class StatusBarLongPressGestureDetector class LongPressGestureDetector @Inject constructor(context: Context, val shadeViewController: ShadeViewController) { val gestureDetector = Loading
packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +8 −11 Original line number Diff line number Diff line Loading @@ -2053,9 +2053,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump } if (mQsController.getExpanded()) { mQsController.flingQs(0, FLING_COLLAPSE); } else if (mBarState == KEYGUARD) { mLockscreenShadeTransitionController.goToLockedShade( /* expandedView= */null, /* needsQSAnimation= */false); } else { expand(true /* animate */); } Loading Loading @@ -3112,7 +3109,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump if (isTracking()) { onTrackingStopped(true); } if (isExpanded() && mBarState != KEYGUARD && !mQsController.getExpanded()) { if (isExpanded() && !mQsController.getExpanded()) { mShadeLog.d("Status Bar was long pressed. Expanding to QS."); expandToQs(); } else { Loading Loading @@ -5094,13 +5091,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump } boolean handled = mHeadsUpTouchHelper.onTouchEvent(event); // This touch session has already resulted in shade expansion. Ignore everything else. if (ShadeExpandsOnStatusBarLongPress.isEnabled() && event.getActionMasked() != MotionEvent.ACTION_DOWN && event.getDownTime() == mStatusBarLongPressDowntime) { mShadeLog.d("Touch has same down time as Status Bar long press. Ignoring."); return false; } if (!mHeadsUpTouchHelper.isTrackingHeadsUp() && mQsController.handleTouch( event, isFullyCollapsed(), isShadeOrQsHeightAnimationRunning())) { if (event.getActionMasked() != MotionEvent.ACTION_MOVE) { Loading @@ -5108,6 +5098,13 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump } return true; } // This touch session has already resulted in shade expansion. Ignore everything else. if (ShadeExpandsOnStatusBarLongPress.isEnabled() && event.getActionMasked() != MotionEvent.ACTION_DOWN && event.getDownTime() == mStatusBarLongPressDowntime) { mShadeLog.d("Touch has same down time as Status Bar long press. Ignoring."); return false; } if (event.getActionMasked() == MotionEvent.ACTION_DOWN && isFullyCollapsed()) { mMetricsLogger.count(COUNTER_PANEL_OPEN, 1); handled = true; Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +0 −10 Original line number Diff line number Diff line Loading @@ -171,14 +171,12 @@ import com.android.systemui.shade.NotificationShadeWindowView; import com.android.systemui.shade.NotificationShadeWindowViewController; import com.android.systemui.shade.QuickSettingsController; import com.android.systemui.shade.ShadeController; import com.android.systemui.shade.ShadeExpandsOnStatusBarLongPress; import com.android.systemui.shade.ShadeExpansionChangeEvent; import com.android.systemui.shade.ShadeExpansionListener; import com.android.systemui.shade.ShadeExpansionStateManager; import com.android.systemui.shade.ShadeLogger; import com.android.systemui.shade.ShadeSurface; import com.android.systemui.shade.ShadeViewController; import com.android.systemui.shade.StatusBarLongPressGestureDetector; import com.android.systemui.shared.recents.utilities.Utilities; import com.android.systemui.shared.statusbar.phone.BarTransitions; import com.android.systemui.statusbar.AutoHideUiElement; Loading Loading @@ -368,7 +366,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { private PhoneStatusBarViewController mPhoneStatusBarViewController; private PhoneStatusBarTransitions mStatusBarTransitions; private final Provider<StatusBarLongPressGestureDetector> mStatusBarLongPressGestureDetector; private final AuthRippleController mAuthRippleController; @WindowVisibleState private int mStatusBarWindowState = WINDOW_STATE_SHOWING; private final NotificationShadeWindowController mNotificationShadeWindowController; Loading Loading @@ -674,7 +671,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { ShadeController shadeController, WindowRootViewVisibilityInteractor windowRootViewVisibilityInteractor, StatusBarKeyguardViewManager statusBarKeyguardViewManager, Provider<StatusBarLongPressGestureDetector> statusBarLongPressGestureDetector, ViewMediatorCallback viewMediatorCallback, InitController initController, @Named(TIME_TICK_HANDLER_NAME) Handler timeTickHandler, Loading Loading @@ -782,7 +778,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mShadeController = shadeController; mWindowRootViewVisibilityInteractor = windowRootViewVisibilityInteractor; mStatusBarKeyguardViewManager = statusBarKeyguardViewManager; mStatusBarLongPressGestureDetector = statusBarLongPressGestureDetector; mKeyguardViewMediatorCallback = viewMediatorCallback; mInitController = initController; mPluginDependencyProvider = pluginDependencyProvider; Loading Loading @@ -1532,11 +1527,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { // to touch outside the customizer to close it, such as on the status or nav bar. mShadeController.onStatusBarTouch(event); } if (ShadeExpandsOnStatusBarLongPress.isEnabled() && mStatusBarStateController.getState() == StatusBarState.KEYGUARD) { mStatusBarLongPressGestureDetector.get().handleTouch(event); } return getNotificationShadeWindowView().onTouchEvent(event); }; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java +6 −8 Original line number Diff line number Diff line Loading @@ -39,8 +39,8 @@ import com.android.systemui.Dependency; import com.android.systemui.Flags; import com.android.systemui.Gefingerpoken; import com.android.systemui.res.R; import com.android.systemui.shade.LongPressGestureDetector; import com.android.systemui.shade.ShadeExpandsOnStatusBarLongPress; import com.android.systemui.shade.StatusBarLongPressGestureDetector; import com.android.systemui.statusbar.phone.userswitcher.StatusBarUserSwitcherContainer; import com.android.systemui.statusbar.window.StatusBarWindowControllerStore; import com.android.systemui.user.ui.binder.StatusBarUserChipViewBinder; Loading Loading @@ -69,7 +69,7 @@ public class PhoneStatusBarView extends FrameLayout { private InsetsFetcher mInsetsFetcher; private int mDensity; private float mFontScale; private StatusBarLongPressGestureDetector mStatusBarLongPressGestureDetector; private LongPressGestureDetector mLongPressGestureDetector; /** * Draw this many pixels into the left/right side of the cutout to optimally use the space Loading @@ -81,10 +81,9 @@ public class PhoneStatusBarView extends FrameLayout { mStatusBarWindowControllerStore = Dependency.get(StatusBarWindowControllerStore.class); } void setLongPressGestureDetector( StatusBarLongPressGestureDetector statusBarLongPressGestureDetector) { void setLongPressGestureDetector(LongPressGestureDetector longPressGestureDetector) { if (ShadeExpandsOnStatusBarLongPress.isEnabled()) { mStatusBarLongPressGestureDetector = statusBarLongPressGestureDetector; mLongPressGestureDetector = longPressGestureDetector; } } Loading Loading @@ -208,9 +207,8 @@ public class PhoneStatusBarView extends FrameLayout { @Override public boolean onTouchEvent(MotionEvent event) { if (ShadeExpandsOnStatusBarLongPress.isEnabled() && mStatusBarLongPressGestureDetector != null) { mStatusBarLongPressGestureDetector.handleTouch(event); if (ShadeExpandsOnStatusBarLongPress.isEnabled() && mLongPressGestureDetector != null) { mLongPressGestureDetector.handleTouch(event); } if (mTouchEventHandler == null) { Log.w( Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt +5 −5 Original line number Diff line number Diff line Loading @@ -34,11 +34,11 @@ import com.android.systemui.plugins.DarkIconDispatcher import com.android.systemui.res.R import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.scene.ui.view.WindowRootView import com.android.systemui.shade.LongPressGestureDetector import com.android.systemui.shade.ShadeController import com.android.systemui.shade.ShadeExpandsOnStatusBarLongPress import com.android.systemui.shade.ShadeLogger import com.android.systemui.shade.ShadeViewController import com.android.systemui.shade.StatusBarLongPressGestureDetector import com.android.systemui.shade.domain.interactor.PanelExpansionInteractor import com.android.systemui.shared.animation.UnfoldMoveFromCenterAnimator import com.android.systemui.statusbar.data.repository.StatusBarContentInsetsProviderStore Loading Loading @@ -69,7 +69,7 @@ private constructor( private val shadeController: ShadeController, private val shadeViewController: ShadeViewController, private val panelExpansionInteractor: PanelExpansionInteractor, private val statusBarLongPressGestureDetector: Provider<StatusBarLongPressGestureDetector>, private val longPressGestureDetector: Provider<LongPressGestureDetector>, private val windowRootView: Provider<WindowRootView>, private val shadeLogger: ShadeLogger, private val moveFromCenterAnimationController: StatusBarMoveFromCenterAnimationController?, Loading Loading @@ -119,7 +119,7 @@ private constructor( addCursorSupportToIconContainers() if (ShadeExpandsOnStatusBarLongPress.isEnabled) { mView.setLongPressGestureDetector(statusBarLongPressGestureDetector.get()) mView.setLongPressGestureDetector(longPressGestureDetector.get()) } progressProvider?.setReadyToHandleTransition(true) Loading Loading @@ -336,7 +336,7 @@ private constructor( private val shadeController: ShadeController, private val shadeViewController: ShadeViewController, private val panelExpansionInteractor: PanelExpansionInteractor, private val statusBarLongPressGestureDetector: Provider<StatusBarLongPressGestureDetector>, private val longPressGestureDetector: Provider<LongPressGestureDetector>, private val windowRootView: Provider<WindowRootView>, private val shadeLogger: ShadeLogger, private val viewUtil: ViewUtil, Loading @@ -361,7 +361,7 @@ private constructor( shadeController, shadeViewController, panelExpansionInteractor, statusBarLongPressGestureDetector, longPressGestureDetector, windowRootView, shadeLogger, statusBarMoveFromCenterAnimationController, Loading