Loading packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +2 −0 Original line number Diff line number Diff line Loading @@ -4936,6 +4936,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump } handled |= handleTouch(event); mShadeLog.logOnTouchEventLastReturn(event, !mDozing, handled); return !mDozing || handled; } Loading Loading @@ -5118,6 +5119,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump } break; } mShadeLog.logHandleTouchLastReturn(event, !mGestureWaitForTouchSlop, mTracking); return !mGestureWaitForTouchSlop || mTracking; } Loading packages/SystemUI/src/com/android/systemui/shade/ShadeLogger.kt +76 −0 Original line number Diff line number Diff line Loading @@ -316,4 +316,80 @@ class ShadeLogger @Inject constructor(@ShadeLog private val buffer: LogBuffer) { { "QSC NotificationsClippingTopBound set to $int1 - $int2" } ) } fun logOnTouchEventLastReturn( event: MotionEvent, dozing: Boolean, handled: Boolean, ) { buffer.log( TAG, LogLevel.VERBOSE, { bool1 = dozing bool2 = handled long1 = event.eventTime long2 = event.downTime int1 = event.action int2 = event.classification double1 = event.y.toDouble() }, { "NPVC onTouchEvent last return: !mDozing: $bool1 || handled: $bool2 " + "\neventTime=$long1,downTime=$long2,y=$double1,action=$int1,class=$int2" } ) } fun logHandleTouchLastReturn( event: MotionEvent, gestureWaitForTouchSlop: Boolean, tracking: Boolean, ) { buffer.log( TAG, LogLevel.VERBOSE, { bool1 = gestureWaitForTouchSlop bool2 = tracking long1 = event.eventTime long2 = event.downTime int1 = event.action int2 = event.classification double1 = event.y.toDouble() }, { "NPVC handleTouch last return: !mGestureWaitForTouchSlop: $bool1 " + "|| mTracking: $bool2 " + "\neventTime=$long1,downTime=$long2,y=$double1,action=$int1,class=$int2" } ) } fun logUpdateNotificationPanelTouchState( disabled: Boolean, isGoingToSleep: Boolean, shouldControlScreenOff: Boolean, deviceInteractive: Boolean, isPulsing: Boolean, isFrpActive: Boolean, ) { buffer.log( TAG, LogLevel.VERBOSE, { bool1 = disabled bool2 = isGoingToSleep bool3 = shouldControlScreenOff bool4 = deviceInteractive str1 = isPulsing.toString() str2 = isFrpActive.toString() }, { "CentralSurfaces updateNotificationPanelTouchState set disabled to: $bool1\n" + "isGoingToSleep: $bool2, !shouldControlScreenOff: $bool3," + "!mDeviceInteractive: $bool4, !isPulsing: $str1, isFrpActive: $str2" } ) } } packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +8 −0 Original line number Diff line number Diff line Loading @@ -192,6 +192,7 @@ import com.android.systemui.shade.ShadeController; import com.android.systemui.shade.ShadeExpansionChangeEvent; import com.android.systemui.shade.ShadeExpansionStateManager; import com.android.systemui.shared.recents.utilities.Utilities; import com.android.systemui.shade.ShadeLogger; import com.android.systemui.statusbar.AutoHideUiElement; import com.android.systemui.statusbar.BackDropView; import com.android.systemui.statusbar.CircleReveal; Loading Loading @@ -505,6 +506,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { /** Controller for the Shade. */ @VisibleForTesting NotificationPanelViewController mNotificationPanelViewController; private final ShadeLogger mShadeLogger; // settings private QSPanelController mQSPanelController; Loading Loading @@ -738,6 +740,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { KeyguardViewMediator keyguardViewMediator, DisplayMetrics displayMetrics, MetricsLogger metricsLogger, ShadeLogger shadeLogger, @UiBackground Executor uiBgExecutor, NotificationMediaManager notificationMediaManager, NotificationLockscreenUserManager lockScreenUserManager, Loading Loading @@ -830,6 +833,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mKeyguardViewMediator = keyguardViewMediator; mDisplayMetrics = displayMetrics; mMetricsLogger = metricsLogger; mShadeLogger = shadeLogger; mUiBgExecutor = uiBgExecutor; mMediaManager = notificationMediaManager; mLockscreenUserManager = lockScreenUserManager; Loading Loading @@ -3672,6 +3676,10 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { boolean disabled = (!mDeviceInteractive && !mDozeServiceHost.isPulsing()) || goingToSleepWithoutAnimation || mDeviceProvisionedController.isFrpActive(); mShadeLogger.logUpdateNotificationPanelTouchState(disabled, isGoingToSleep(), !mDozeParameters.shouldControlScreenOff(), !mDeviceInteractive, !mDozeServiceHost.isPulsing(), mDeviceProvisionedController.isFrpActive()); mNotificationPanelViewController.setTouchAndAnimationDisabled(disabled); mNotificationIconAreaController.setAnimationsEnabled(!disabled); } Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java +3 −0 Original line number Diff line number Diff line Loading @@ -133,6 +133,7 @@ import com.android.systemui.shade.QuickSettingsController; import com.android.systemui.shade.ShadeController; import com.android.systemui.shade.ShadeControllerImpl; import com.android.systemui.shade.ShadeExpansionStateManager; import com.android.systemui.shade.ShadeLogger; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.KeyguardIndicationController; import com.android.systemui.statusbar.LockscreenShadeTransitionController; Loading Loading @@ -221,6 +222,7 @@ public class CentralSurfacesImplTest extends SysuiTestCase { @Mock private NotificationListContainer mNotificationListContainer; @Mock private HeadsUpManagerPhone mHeadsUpManager; @Mock private NotificationPanelViewController mNotificationPanelViewController; @Mock private ShadeLogger mShadeLogger; @Mock private NotificationPanelView mNotificationPanelView; @Mock private QuickSettingsController mQuickSettingsController; @Mock private IStatusBarService mBarService; Loading Loading @@ -469,6 +471,7 @@ public class CentralSurfacesImplTest extends SysuiTestCase { mKeyguardViewMediator, new DisplayMetrics(), mMetricsLogger, mShadeLogger, mUiBgExecutor, mNotificationMediaManager, mLockscreenUserManager, Loading Loading
packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +2 −0 Original line number Diff line number Diff line Loading @@ -4936,6 +4936,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump } handled |= handleTouch(event); mShadeLog.logOnTouchEventLastReturn(event, !mDozing, handled); return !mDozing || handled; } Loading Loading @@ -5118,6 +5119,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump } break; } mShadeLog.logHandleTouchLastReturn(event, !mGestureWaitForTouchSlop, mTracking); return !mGestureWaitForTouchSlop || mTracking; } Loading
packages/SystemUI/src/com/android/systemui/shade/ShadeLogger.kt +76 −0 Original line number Diff line number Diff line Loading @@ -316,4 +316,80 @@ class ShadeLogger @Inject constructor(@ShadeLog private val buffer: LogBuffer) { { "QSC NotificationsClippingTopBound set to $int1 - $int2" } ) } fun logOnTouchEventLastReturn( event: MotionEvent, dozing: Boolean, handled: Boolean, ) { buffer.log( TAG, LogLevel.VERBOSE, { bool1 = dozing bool2 = handled long1 = event.eventTime long2 = event.downTime int1 = event.action int2 = event.classification double1 = event.y.toDouble() }, { "NPVC onTouchEvent last return: !mDozing: $bool1 || handled: $bool2 " + "\neventTime=$long1,downTime=$long2,y=$double1,action=$int1,class=$int2" } ) } fun logHandleTouchLastReturn( event: MotionEvent, gestureWaitForTouchSlop: Boolean, tracking: Boolean, ) { buffer.log( TAG, LogLevel.VERBOSE, { bool1 = gestureWaitForTouchSlop bool2 = tracking long1 = event.eventTime long2 = event.downTime int1 = event.action int2 = event.classification double1 = event.y.toDouble() }, { "NPVC handleTouch last return: !mGestureWaitForTouchSlop: $bool1 " + "|| mTracking: $bool2 " + "\neventTime=$long1,downTime=$long2,y=$double1,action=$int1,class=$int2" } ) } fun logUpdateNotificationPanelTouchState( disabled: Boolean, isGoingToSleep: Boolean, shouldControlScreenOff: Boolean, deviceInteractive: Boolean, isPulsing: Boolean, isFrpActive: Boolean, ) { buffer.log( TAG, LogLevel.VERBOSE, { bool1 = disabled bool2 = isGoingToSleep bool3 = shouldControlScreenOff bool4 = deviceInteractive str1 = isPulsing.toString() str2 = isFrpActive.toString() }, { "CentralSurfaces updateNotificationPanelTouchState set disabled to: $bool1\n" + "isGoingToSleep: $bool2, !shouldControlScreenOff: $bool3," + "!mDeviceInteractive: $bool4, !isPulsing: $str1, isFrpActive: $str2" } ) } }
packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +8 −0 Original line number Diff line number Diff line Loading @@ -192,6 +192,7 @@ import com.android.systemui.shade.ShadeController; import com.android.systemui.shade.ShadeExpansionChangeEvent; import com.android.systemui.shade.ShadeExpansionStateManager; import com.android.systemui.shared.recents.utilities.Utilities; import com.android.systemui.shade.ShadeLogger; import com.android.systemui.statusbar.AutoHideUiElement; import com.android.systemui.statusbar.BackDropView; import com.android.systemui.statusbar.CircleReveal; Loading Loading @@ -505,6 +506,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { /** Controller for the Shade. */ @VisibleForTesting NotificationPanelViewController mNotificationPanelViewController; private final ShadeLogger mShadeLogger; // settings private QSPanelController mQSPanelController; Loading Loading @@ -738,6 +740,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { KeyguardViewMediator keyguardViewMediator, DisplayMetrics displayMetrics, MetricsLogger metricsLogger, ShadeLogger shadeLogger, @UiBackground Executor uiBgExecutor, NotificationMediaManager notificationMediaManager, NotificationLockscreenUserManager lockScreenUserManager, Loading Loading @@ -830,6 +833,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mKeyguardViewMediator = keyguardViewMediator; mDisplayMetrics = displayMetrics; mMetricsLogger = metricsLogger; mShadeLogger = shadeLogger; mUiBgExecutor = uiBgExecutor; mMediaManager = notificationMediaManager; mLockscreenUserManager = lockScreenUserManager; Loading Loading @@ -3672,6 +3676,10 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { boolean disabled = (!mDeviceInteractive && !mDozeServiceHost.isPulsing()) || goingToSleepWithoutAnimation || mDeviceProvisionedController.isFrpActive(); mShadeLogger.logUpdateNotificationPanelTouchState(disabled, isGoingToSleep(), !mDozeParameters.shouldControlScreenOff(), !mDeviceInteractive, !mDozeServiceHost.isPulsing(), mDeviceProvisionedController.isFrpActive()); mNotificationPanelViewController.setTouchAndAnimationDisabled(disabled); mNotificationIconAreaController.setAnimationsEnabled(!disabled); } Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java +3 −0 Original line number Diff line number Diff line Loading @@ -133,6 +133,7 @@ import com.android.systemui.shade.QuickSettingsController; import com.android.systemui.shade.ShadeController; import com.android.systemui.shade.ShadeControllerImpl; import com.android.systemui.shade.ShadeExpansionStateManager; import com.android.systemui.shade.ShadeLogger; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.KeyguardIndicationController; import com.android.systemui.statusbar.LockscreenShadeTransitionController; Loading Loading @@ -221,6 +222,7 @@ public class CentralSurfacesImplTest extends SysuiTestCase { @Mock private NotificationListContainer mNotificationListContainer; @Mock private HeadsUpManagerPhone mHeadsUpManager; @Mock private NotificationPanelViewController mNotificationPanelViewController; @Mock private ShadeLogger mShadeLogger; @Mock private NotificationPanelView mNotificationPanelView; @Mock private QuickSettingsController mQuickSettingsController; @Mock private IStatusBarService mBarService; Loading Loading @@ -469,6 +471,7 @@ public class CentralSurfacesImplTest extends SysuiTestCase { mKeyguardViewMediator, new DisplayMetrics(), mMetricsLogger, mShadeLogger, mUiBgExecutor, mNotificationMediaManager, mLockscreenUserManager, Loading