Merge "Add metric to log use of hush gesture" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
2b0ead73c7
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user