Migrates LS_* tron events to WW.
Test: manual(lunch coral-userdebug && make) Bug: 147509049 Change-Id: I56e3680a7de7445deadff52588887ea2beef24fe
This commit is contained in:
@@ -146,6 +146,7 @@ import com.android.systemui.statusbar.phone.HeadsUpManagerPhone;
|
||||
import com.android.systemui.statusbar.phone.HeadsUpTouchHelper;
|
||||
import com.android.systemui.statusbar.phone.KeyguardBypassController;
|
||||
import com.android.systemui.statusbar.phone.LockscreenGestureLogger;
|
||||
import com.android.systemui.statusbar.phone.LockscreenGestureLogger.LockscreenUiEvent;
|
||||
import com.android.systemui.statusbar.phone.NotificationGroupManager;
|
||||
import com.android.systemui.statusbar.phone.NotificationGroupManager.OnGroupChangeListener;
|
||||
import com.android.systemui.statusbar.phone.NotificationIconAreaController;
|
||||
@@ -6633,6 +6634,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
||||
MetricsEvent.ACTION_LS_SHADE,
|
||||
(int) (dragLengthY / mDisplayMetrics.density),
|
||||
0 /* velocityDp - N/A */);
|
||||
mLockscreenGestureLogger.log(LockscreenUiEvent.LOCKSCREEN_PULL_SHADE_OPEN);
|
||||
|
||||
if (!mAmbientState.isDozing() || startingChild != null) {
|
||||
// We have notifications, go to locked shade.
|
||||
|
||||
@@ -20,6 +20,9 @@ import android.metrics.LogMaker;
|
||||
import android.util.ArrayMap;
|
||||
|
||||
import com.android.internal.logging.MetricsLogger;
|
||||
import com.android.internal.logging.UiEvent;
|
||||
import com.android.internal.logging.UiEventLogger;
|
||||
import com.android.internal.logging.UiEventLoggerImpl;
|
||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.systemui.Dependency;
|
||||
import com.android.systemui.EventLogConstants;
|
||||
@@ -34,6 +37,56 @@ import javax.inject.Singleton;
|
||||
*/
|
||||
@Singleton
|
||||
public class LockscreenGestureLogger {
|
||||
|
||||
/**
|
||||
* Contains Lockscreen related Westworld UiEvent enums.
|
||||
*/
|
||||
public enum LockscreenUiEvent implements UiEventLogger.UiEventEnum {
|
||||
@UiEvent(doc = "Lockscreen > Pull shade open")
|
||||
LOCKSCREEN_PULL_SHADE_OPEN(539),
|
||||
|
||||
@UiEvent(doc = "Lockscreen > Tap on lock, locks phone")
|
||||
LOCKSCREEN_LOCK_TAP(540),
|
||||
|
||||
@UiEvent(doc = "Lockscreen > Swipe down to open quick settings")
|
||||
LOCKSCREEN_QUICK_SETTINGS_OPEN(541),
|
||||
|
||||
@UiEvent(doc = "Swipe down to open quick settings when unlocked")
|
||||
LOCKSCREEN_UNLOCKED_QUICK_SETTINGS_OPEN(542),
|
||||
|
||||
@UiEvent(doc = "Lockscreen > Tap on lock, shows hint")
|
||||
LOCKSCREEN_LOCK_SHOW_HINT(543),
|
||||
|
||||
@UiEvent(doc = "Notification shade > Tap to open quick settings")
|
||||
LOCKSCREEN_NOTIFICATION_SHADE_QUICK_SETTINGS_OPEN(544),
|
||||
|
||||
@UiEvent(doc = "Lockscreen > Dialer")
|
||||
LOCKSCREEN_DIALER(545),
|
||||
|
||||
@UiEvent(doc = "Lockscreen > Camera")
|
||||
LOCKSCREEN_CAMERA(546),
|
||||
|
||||
@UiEvent(doc = "Lockscreen > Unlock gesture")
|
||||
LOCKSCREEN_UNLOCK(547),
|
||||
|
||||
@UiEvent(doc = "Lockscreen > Tap on notification, false touch rejection")
|
||||
LOCKSCREEN_NOTIFICATION_FALSE_TOUCH(548),
|
||||
|
||||
@UiEvent(doc = "Expand the notification panel while unlocked")
|
||||
LOCKSCREEN_UNLOCKED_NOTIFICATION_PANEL_EXPAND(549);
|
||||
|
||||
private final int mId;
|
||||
|
||||
LockscreenUiEvent(int id) {
|
||||
mId = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
return mId;
|
||||
}
|
||||
}
|
||||
|
||||
private ArrayMap<Integer, Integer> mLegacyMap;
|
||||
private final MetricsLogger mMetricsLogger = Dependency.get(MetricsLogger.class);
|
||||
|
||||
@@ -54,6 +107,13 @@ public class LockscreenGestureLogger {
|
||||
EventLogTags.writeSysuiLockscreenGesture(safeLookup(gesture), length, velocity);
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs {@link LockscreenUiEvent}.
|
||||
*/
|
||||
public void log(LockscreenUiEvent lockscreenUiEvent) {
|
||||
new UiEventLoggerImpl().log(lockscreenUiEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Record the location of a swipe gesture, expressed as percentages of the whole screen
|
||||
* @param category the action
|
||||
|
||||
@@ -45,6 +45,7 @@ import com.android.systemui.statusbar.KeyguardIndicationController;
|
||||
import com.android.systemui.statusbar.StatusBarState;
|
||||
import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator;
|
||||
import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator.WakeUpListener;
|
||||
import com.android.systemui.statusbar.phone.LockscreenGestureLogger.LockscreenUiEvent;
|
||||
import com.android.systemui.statusbar.policy.AccessibilityController;
|
||||
import com.android.systemui.statusbar.policy.ConfigurationController;
|
||||
import com.android.systemui.statusbar.policy.ConfigurationController.ConfigurationListener;
|
||||
@@ -436,6 +437,7 @@ public class LockscreenLockIconController {
|
||||
private boolean handleLongClick(View view) {
|
||||
mLockscreenGestureLogger.write(MetricsProto.MetricsEvent.ACTION_LS_LOCK,
|
||||
0 /* lengthDp - N/A */, 0 /* velocityDp - N/A */);
|
||||
mLockscreenGestureLogger.log(LockscreenUiEvent.LOCKSCREEN_LOCK_TAP);
|
||||
mKeyguardIndicationController.showTransientIndication(
|
||||
R.string.keyguard_indication_trust_disabled);
|
||||
mKeyguardUpdateMonitor.onLockIconPressed();
|
||||
|
||||
@@ -104,9 +104,9 @@ import com.android.systemui.statusbar.notification.row.ActivatableNotificationVi
|
||||
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
|
||||
import com.android.systemui.statusbar.notification.row.ExpandableView;
|
||||
import com.android.systemui.statusbar.notification.stack.AnimationProperties;
|
||||
import com.android.systemui.statusbar.notification.stack.MediaHeaderView;
|
||||
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout;
|
||||
import com.android.systemui.statusbar.notification.stack.StackStateAnimator;
|
||||
import com.android.systemui.statusbar.phone.LockscreenGestureLogger.LockscreenUiEvent;
|
||||
import com.android.systemui.statusbar.phone.dagger.StatusBarComponent;
|
||||
import com.android.systemui.statusbar.policy.ConfigurationController;
|
||||
import com.android.systemui.statusbar.policy.KeyguardStateController;
|
||||
@@ -2474,6 +2474,8 @@ public class NotificationPanelViewController extends PanelViewController {
|
||||
} else {
|
||||
mLockscreenGestureLogger.write(MetricsEvent.ACTION_LS_HINT,
|
||||
0 /* lengthDp - N/A */, 0 /* velocityDp - N/A */);
|
||||
mLockscreenGestureLogger
|
||||
.log(LockscreenUiEvent.LOCKSCREEN_LOCK_SHOW_HINT);
|
||||
startUnlockHintAnimation();
|
||||
}
|
||||
}
|
||||
@@ -3257,7 +3259,7 @@ public class NotificationPanelViewController extends PanelViewController {
|
||||
int velocityDp = Math.abs((int) (vel / displayDensity));
|
||||
if (start) {
|
||||
mLockscreenGestureLogger.write(MetricsEvent.ACTION_LS_DIALER, lengthDp, velocityDp);
|
||||
|
||||
mLockscreenGestureLogger.log(LockscreenUiEvent.LOCKSCREEN_DIALER);
|
||||
mFalsingManager.onLeftAffordanceOn();
|
||||
if (mFalsingManager.shouldEnforceBouncer()) {
|
||||
mStatusBar.executeRunnableDismissingKeyguard(
|
||||
@@ -3272,6 +3274,7 @@ public class NotificationPanelViewController extends PanelViewController {
|
||||
mLastCameraLaunchSource)) {
|
||||
mLockscreenGestureLogger.write(
|
||||
MetricsEvent.ACTION_LS_CAMERA, lengthDp, velocityDp);
|
||||
mLockscreenGestureLogger.log(LockscreenUiEvent.LOCKSCREEN_CAMERA);
|
||||
}
|
||||
mFalsingManager.onCameraOn();
|
||||
if (mFalsingManager.shouldEnforceBouncer()) {
|
||||
|
||||
@@ -47,6 +47,7 @@ import com.android.systemui.statusbar.FlingAnimationUtils;
|
||||
import com.android.systemui.statusbar.StatusBarState;
|
||||
import com.android.systemui.statusbar.SysuiStatusBarStateController;
|
||||
import com.android.systemui.statusbar.VibratorHelper;
|
||||
import com.android.systemui.statusbar.phone.LockscreenGestureLogger.LockscreenUiEvent;
|
||||
import com.android.systemui.statusbar.policy.KeyguardStateController;
|
||||
|
||||
import java.io.FileDescriptor;
|
||||
@@ -319,6 +320,8 @@ public abstract class PanelViewController {
|
||||
|
||||
mLockscreenGestureLogger.writeAtFractionalPosition(MetricsEvent.ACTION_PANEL_VIEW_EXPAND,
|
||||
(int) (event.getX() / width * 100), (int) (event.getY() / height * 100), rot);
|
||||
mLockscreenGestureLogger
|
||||
.log(LockscreenUiEvent.LOCKSCREEN_UNLOCKED_NOTIFICATION_PANEL_EXPAND);
|
||||
}
|
||||
|
||||
protected void maybeVibrateOnOpening() {
|
||||
@@ -378,6 +381,7 @@ public abstract class PanelViewController {
|
||||
int heightDp = (int) Math.abs((y - mInitialTouchY) / displayDensity);
|
||||
int velocityDp = (int) Math.abs(vel / displayDensity);
|
||||
mLockscreenGestureLogger.write(MetricsEvent.ACTION_LS_UNLOCK, heightDp, velocityDp);
|
||||
mLockscreenGestureLogger.log(LockscreenUiEvent.LOCKSCREEN_UNLOCK);
|
||||
}
|
||||
fling(vel, expand, isFalseTouch(x, y));
|
||||
onTrackingStopped(expand);
|
||||
|
||||
@@ -72,6 +72,7 @@ import com.android.systemui.statusbar.notification.row.NotificationGutsManager;
|
||||
import com.android.systemui.statusbar.notification.row.NotificationGutsManager.OnSettingsClickListener;
|
||||
import com.android.systemui.statusbar.notification.row.NotificationInfo.CheckSaveListener;
|
||||
import com.android.systemui.statusbar.notification.stack.NotificationListContainer;
|
||||
import com.android.systemui.statusbar.phone.LockscreenGestureLogger.LockscreenUiEvent;
|
||||
import com.android.systemui.statusbar.policy.ConfigurationController;
|
||||
import com.android.systemui.statusbar.policy.KeyguardStateController;
|
||||
|
||||
@@ -374,6 +375,7 @@ public class StatusBarNotificationPresenter implements NotificationPresenter,
|
||||
mLockscreenGestureLogger.write(
|
||||
MetricsEvent.ACTION_LS_NOTE,
|
||||
0 /* lengthDp - N/A */, 0 /* velocityDp - N/A */);
|
||||
mLockscreenGestureLogger.log(LockscreenUiEvent.LOCKSCREEN_NOTIFICATION_FALSE_TOUCH);
|
||||
mNotificationPanel.showTransientIndication(R.string.notification_tap_again);
|
||||
ActivatableNotificationView previousView = mNotificationPanel.getActivatedChild();
|
||||
if (previousView != null) {
|
||||
|
||||
Reference in New Issue
Block a user