Merge "Filling in holes in shade touch handling logging" into udc-dev
This commit is contained in:
@@ -4936,6 +4936,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
|
|||||||
}
|
}
|
||||||
|
|
||||||
handled |= handleTouch(event);
|
handled |= handleTouch(event);
|
||||||
|
mShadeLog.logOnTouchEventLastReturn(event, !mDozing, handled);
|
||||||
return !mDozing || handled;
|
return !mDozing || handled;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5118,6 +5119,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
mShadeLog.logHandleTouchLastReturn(event, !mGestureWaitForTouchSlop, mTracking);
|
||||||
return !mGestureWaitForTouchSlop || mTracking;
|
return !mGestureWaitForTouchSlop || mTracking;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -316,4 +316,80 @@ class ShadeLogger @Inject constructor(@ShadeLog private val buffer: LogBuffer) {
|
|||||||
{ "QSC NotificationsClippingTopBound set to $int1 - $int2" }
|
{ "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"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -192,6 +192,7 @@ import com.android.systemui.shade.ShadeController;
|
|||||||
import com.android.systemui.shade.ShadeExpansionChangeEvent;
|
import com.android.systemui.shade.ShadeExpansionChangeEvent;
|
||||||
import com.android.systemui.shade.ShadeExpansionStateManager;
|
import com.android.systemui.shade.ShadeExpansionStateManager;
|
||||||
import com.android.systemui.shared.recents.utilities.Utilities;
|
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.AutoHideUiElement;
|
||||||
import com.android.systemui.statusbar.BackDropView;
|
import com.android.systemui.statusbar.BackDropView;
|
||||||
import com.android.systemui.statusbar.CircleReveal;
|
import com.android.systemui.statusbar.CircleReveal;
|
||||||
@@ -505,6 +506,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
|
|||||||
/** Controller for the Shade. */
|
/** Controller for the Shade. */
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
NotificationPanelViewController mNotificationPanelViewController;
|
NotificationPanelViewController mNotificationPanelViewController;
|
||||||
|
private final ShadeLogger mShadeLogger;
|
||||||
|
|
||||||
// settings
|
// settings
|
||||||
private QSPanelController mQSPanelController;
|
private QSPanelController mQSPanelController;
|
||||||
@@ -738,6 +740,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
|
|||||||
KeyguardViewMediator keyguardViewMediator,
|
KeyguardViewMediator keyguardViewMediator,
|
||||||
DisplayMetrics displayMetrics,
|
DisplayMetrics displayMetrics,
|
||||||
MetricsLogger metricsLogger,
|
MetricsLogger metricsLogger,
|
||||||
|
ShadeLogger shadeLogger,
|
||||||
@UiBackground Executor uiBgExecutor,
|
@UiBackground Executor uiBgExecutor,
|
||||||
NotificationMediaManager notificationMediaManager,
|
NotificationMediaManager notificationMediaManager,
|
||||||
NotificationLockscreenUserManager lockScreenUserManager,
|
NotificationLockscreenUserManager lockScreenUserManager,
|
||||||
@@ -830,6 +833,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
|
|||||||
mKeyguardViewMediator = keyguardViewMediator;
|
mKeyguardViewMediator = keyguardViewMediator;
|
||||||
mDisplayMetrics = displayMetrics;
|
mDisplayMetrics = displayMetrics;
|
||||||
mMetricsLogger = metricsLogger;
|
mMetricsLogger = metricsLogger;
|
||||||
|
mShadeLogger = shadeLogger;
|
||||||
mUiBgExecutor = uiBgExecutor;
|
mUiBgExecutor = uiBgExecutor;
|
||||||
mMediaManager = notificationMediaManager;
|
mMediaManager = notificationMediaManager;
|
||||||
mLockscreenUserManager = lockScreenUserManager;
|
mLockscreenUserManager = lockScreenUserManager;
|
||||||
@@ -3672,6 +3676,10 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
|
|||||||
boolean disabled = (!mDeviceInteractive && !mDozeServiceHost.isPulsing())
|
boolean disabled = (!mDeviceInteractive && !mDozeServiceHost.isPulsing())
|
||||||
|| goingToSleepWithoutAnimation
|
|| goingToSleepWithoutAnimation
|
||||||
|| mDeviceProvisionedController.isFrpActive();
|
|| mDeviceProvisionedController.isFrpActive();
|
||||||
|
mShadeLogger.logUpdateNotificationPanelTouchState(disabled, isGoingToSleep(),
|
||||||
|
!mDozeParameters.shouldControlScreenOff(), !mDeviceInteractive,
|
||||||
|
!mDozeServiceHost.isPulsing(), mDeviceProvisionedController.isFrpActive());
|
||||||
|
|
||||||
mNotificationPanelViewController.setTouchAndAnimationDisabled(disabled);
|
mNotificationPanelViewController.setTouchAndAnimationDisabled(disabled);
|
||||||
mNotificationIconAreaController.setAnimationsEnabled(!disabled);
|
mNotificationIconAreaController.setAnimationsEnabled(!disabled);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,6 +133,7 @@ import com.android.systemui.shade.QuickSettingsController;
|
|||||||
import com.android.systemui.shade.ShadeController;
|
import com.android.systemui.shade.ShadeController;
|
||||||
import com.android.systemui.shade.ShadeControllerImpl;
|
import com.android.systemui.shade.ShadeControllerImpl;
|
||||||
import com.android.systemui.shade.ShadeExpansionStateManager;
|
import com.android.systemui.shade.ShadeExpansionStateManager;
|
||||||
|
import com.android.systemui.shade.ShadeLogger;
|
||||||
import com.android.systemui.statusbar.CommandQueue;
|
import com.android.systemui.statusbar.CommandQueue;
|
||||||
import com.android.systemui.statusbar.KeyguardIndicationController;
|
import com.android.systemui.statusbar.KeyguardIndicationController;
|
||||||
import com.android.systemui.statusbar.LockscreenShadeTransitionController;
|
import com.android.systemui.statusbar.LockscreenShadeTransitionController;
|
||||||
@@ -221,6 +222,7 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
|
|||||||
@Mock private NotificationListContainer mNotificationListContainer;
|
@Mock private NotificationListContainer mNotificationListContainer;
|
||||||
@Mock private HeadsUpManagerPhone mHeadsUpManager;
|
@Mock private HeadsUpManagerPhone mHeadsUpManager;
|
||||||
@Mock private NotificationPanelViewController mNotificationPanelViewController;
|
@Mock private NotificationPanelViewController mNotificationPanelViewController;
|
||||||
|
@Mock private ShadeLogger mShadeLogger;
|
||||||
@Mock private NotificationPanelView mNotificationPanelView;
|
@Mock private NotificationPanelView mNotificationPanelView;
|
||||||
@Mock private QuickSettingsController mQuickSettingsController;
|
@Mock private QuickSettingsController mQuickSettingsController;
|
||||||
@Mock private IStatusBarService mBarService;
|
@Mock private IStatusBarService mBarService;
|
||||||
@@ -469,6 +471,7 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
|
|||||||
mKeyguardViewMediator,
|
mKeyguardViewMediator,
|
||||||
new DisplayMetrics(),
|
new DisplayMetrics(),
|
||||||
mMetricsLogger,
|
mMetricsLogger,
|
||||||
|
mShadeLogger,
|
||||||
mUiBgExecutor,
|
mUiBgExecutor,
|
||||||
mNotificationMediaManager,
|
mNotificationMediaManager,
|
||||||
mLockscreenUserManager,
|
mLockscreenUserManager,
|
||||||
|
|||||||
Reference in New Issue
Block a user