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

Commit 019d6f63 authored by Beverly's avatar Beverly Committed by Beverly Tai
Browse files

Add metric to log use of hush gesture

Change-Id: I14578149a79b1455267cb6efc6493c596129032d
Bug: 79537757
Bug: 78665512
Test: manual, builds
parent e5c8e375
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -5969,6 +5969,11 @@ message MetricsEvent {
    // OS: P
    FIELD_BATTERY_CHARGE_CYCLES = 1439;

    // ACTION: Hush gesture - volume up + power button
    // CATEGORY: GLOBAL_SYSTEM_UI
    // OS: P
    ACTION_HUSH_GESTURE = 1440;

    // ---- End P Constants, all P constants go above this line ----
    // Add new aosp constants above this line.
    // END OF AOSP CONSTANTS
+4 −0
Original line number Diff line number Diff line
@@ -267,6 +267,7 @@ import com.android.internal.accessibility.AccessibilityShortcutController;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto;
import com.android.internal.policy.IKeyguardDismissCallback;
import com.android.internal.policy.IShortcutService;
import com.android.internal.policy.KeyguardDismissCallback;
@@ -621,6 +622,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
    boolean mUseTvRouting;
    int mVeryLongPressTimeout;
    boolean mAllowStartActivityForLongPressOnPowerDuringSetup;
    MetricsLogger mLogger;

    private boolean mHandleVolumeKeysInWM;

@@ -1136,6 +1138,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        }
        getAudioManagerInternal();
        mAudioManagerInternal.silenceRingerModeInternal("volume_hush");
        mLogger.action(MetricsProto.MetricsEvent.ACTION_HUSH_GESTURE, mRingerToggleChord);
    }

    IStatusBarService getStatusBarService() {
@@ -2003,6 +2006,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        mHasFeatureLeanback = mContext.getPackageManager().hasSystemFeature(FEATURE_LEANBACK);
        mAccessibilityShortcutController =
                new AccessibilityShortcutController(mContext, new Handler(), mCurrentUserId);
        mLogger = new MetricsLogger();
        // Init display burn-in protection
        boolean burnInProtectionEnabled = context.getResources().getBoolean(
                com.android.internal.R.bool.config_enableBurnInProtection);