Merge "Fix metrics didn't log ONE_HANDED_TRIGGER_GESTURE_OUT logs when NavigationBar type is Gesture Navi" into sc-dev

This commit is contained in:
Jason Chang
2021-04-16 14:26:03 +00:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 7 deletions

View File

@@ -343,7 +343,6 @@ public class OneHandedController implements RemoteCallable<OneHandedController>
mOneHandedAccessibilityUtil.getOneHandedStartDescription());
mDisplayAreaOrganizer.scheduleOffset(0, yOffSet);
mTimeoutHandler.resetTimer();
mOneHandedUiEventLogger.writeEvent(
OneHandedUiEventLogger.EVENT_ONE_HANDED_TRIGGER_GESTURE_IN);
}
@@ -351,12 +350,7 @@ public class OneHandedController implements RemoteCallable<OneHandedController>
@VisibleForTesting
void stopOneHanded() {
if (mDisplayAreaOrganizer.isInOneHanded()) {
mOneHandedAccessibilityUtil.announcementForScreenReader(
mOneHandedAccessibilityUtil.getOneHandedStopDescription());
mDisplayAreaOrganizer.scheduleOffset(0, 0);
mTimeoutHandler.removeTimer();
}
stopOneHanded(OneHandedUiEventLogger.EVENT_ONE_HANDED_TRIGGER_GESTURE_OUT);
}
private void stopOneHanded(int uiEvent) {

View File

@@ -268,6 +268,7 @@ public final class WMShell extends SystemUI
public void onStop() {
mSysUiMainExecutor.execute(() -> {
if (oneHanded.isOneHandedEnabled()) {
// Log metrics for 3-button navigation mode.
oneHanded.stopOneHanded(
OneHandedUiEventLogger.EVENT_ONE_HANDED_TRIGGER_GESTURE_OUT);
} else if (oneHanded.isSwipeToNotificationEnabled()) {