Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c94759d8 authored by Mike Digman's avatar Mike Digman
Browse files

Log rotation suggestion events in SystemUI

Also use non-static MetricsLogger calls
Test: manual

Change-Id: Ib32b1320934698b98103d7fa5f4929d8247a43f6
parent e53c1a1b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -124,6 +124,7 @@ public class NavigationBarFragment extends Fragment implements Callbacks {
    private AccessibilityManager mAccessibilityManager;
    private MagnificationContentObserver mMagnificationObserver;
    private ContentResolver mContentResolver;
    private final MetricsLogger mMetricsLogger = Dependency.get(MetricsLogger.class);

    private int mDisabledFlags1;
    private StatusBar mStatusBar;
@@ -355,6 +356,7 @@ public class NavigationBarFragment extends Fragment implements Callbacks {
            mLastRotationSuggestion = rotation; // Remember rotation for click
            setRotateSuggestionButtonState(true);
            rescheduleRotationTimeout(false);
            mMetricsLogger.visible(MetricsEvent.ROTATION_SUGGESTION_SHOWN);
        }
    }

@@ -612,7 +614,7 @@ public class NavigationBarFragment extends Fragment implements Callbacks {
        if (shouldDisableNavbarGestures()) {
            return false;
        }
        MetricsLogger.action(getContext(), MetricsEvent.ACTION_ASSIST_LONG_PRESS);
        mMetricsLogger.action(MetricsEvent.ACTION_ASSIST_LONG_PRESS);
        mAssistManager.startAssist(new Bundle() /* args */);
        mStatusBar.awakenDreams();

@@ -768,6 +770,7 @@ public class NavigationBarFragment extends Fragment implements Callbacks {
    }

    private void onRotateSuggestionClick(View v) {
        mMetricsLogger.action(MetricsEvent.ACTION_ROTATION_SUGGESTION_ACCEPTED);
        mRotationLockController.setRotationLockedAtAngle(true, mLastRotationSuggestion);
    }

+10 −0
Original line number Diff line number Diff line
@@ -5158,6 +5158,16 @@ message MetricsEvent {
    // OS: P
    NOTIFICATION_ZEN_MODE_ENABLE_DIALOG = 1286;

    // ACTION: Rotate suggestion accepted in rotation locked mode
    // CATEGORY: GLOBAL_SYSTEM_UI
    // OS: P
    ACTION_ROTATION_SUGGESTION_ACCEPTED = 1287;

    // OPEN: Rotation suggestion shown in rotation locked mode
    // CATEGORY: GLOBAL_SYSTEM_UI
    // OS: P
    ROTATION_SUGGESTION_SHOWN = 1288;

    // ---- End P Constants, all P constants go above this line ----
    // Add new aosp constants above this line.
    // END OF AOSP CONSTANTS