Loading packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +4 −0 Original line number Diff line number Diff line Loading @@ -2303,6 +2303,10 @@ public final class NotificationPanelViewController implements @Deprecated public void onStatusBarLongPress(MotionEvent event) { Log.i(TAG, "Status Bar was long pressed."); if (mTouchDisabled) { mShadeLog.d("Touch disabled. Long press expansion ignored."); return; } if (mBarState == KEYGUARD) { mShadeLog.d("Lockscreen Status Bar was long pressed. Expansion not supported."); return; Loading packages/SystemUI/src/com/android/systemui/shade/StatusBarLongPressGestureDetector.kt +9 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.view.GestureDetector.SimpleOnGestureListener import android.view.MotionEvent import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.statusbar.policy.DeviceProvisionedController import javax.inject.Inject /** Accepts touch events, detects long press, and calls ShadeViewController#onStatusBarLongPress. */ Loading @@ -32,14 +33,21 @@ constructor( // TODO b/383125226 - Make this class per-display @Main context: Context, val shadeViewController: ShadeViewController, val shadeController: ShadeController, val deviceProvisionedController: DeviceProvisionedController, ) { val gestureDetector = GestureDetector( context, object : SimpleOnGestureListener() { override fun onLongPress(event: MotionEvent) { if ( shadeController.isShadeEnabled() && deviceProvisionedController.isDeviceProvisioned() ) { shadeViewController.onStatusBarLongPress(event) } } }, ) Loading Loading
packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +4 −0 Original line number Diff line number Diff line Loading @@ -2303,6 +2303,10 @@ public final class NotificationPanelViewController implements @Deprecated public void onStatusBarLongPress(MotionEvent event) { Log.i(TAG, "Status Bar was long pressed."); if (mTouchDisabled) { mShadeLog.d("Touch disabled. Long press expansion ignored."); return; } if (mBarState == KEYGUARD) { mShadeLog.d("Lockscreen Status Bar was long pressed. Expansion not supported."); return; Loading
packages/SystemUI/src/com/android/systemui/shade/StatusBarLongPressGestureDetector.kt +9 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.view.GestureDetector.SimpleOnGestureListener import android.view.MotionEvent import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.statusbar.policy.DeviceProvisionedController import javax.inject.Inject /** Accepts touch events, detects long press, and calls ShadeViewController#onStatusBarLongPress. */ Loading @@ -32,14 +33,21 @@ constructor( // TODO b/383125226 - Make this class per-display @Main context: Context, val shadeViewController: ShadeViewController, val shadeController: ShadeController, val deviceProvisionedController: DeviceProvisionedController, ) { val gestureDetector = GestureDetector( context, object : SimpleOnGestureListener() { override fun onLongPress(event: MotionEvent) { if ( shadeController.isShadeEnabled() && deviceProvisionedController.isDeviceProvisioned() ) { shadeViewController.onStatusBarLongPress(event) } } }, ) Loading