From 3fbdd17f4582232568076a79bbe3793c19a9b605 Mon Sep 17 00:00:00 2001 From: Beverly Date: Wed, 12 Aug 2020 08:33:54 -0400 Subject: [PATCH] No vibrate on initial ringer setting Don't vibrate the device when the initial ringer state is set (ie: mState.ringerModeInternal = -1) Fixes: 160919337 Test: manual 1. Set ringer to vibrate 2. Restart device 3. Observe: when device boots up, no vibration from ringer Change-Id: Id9bcc00731ac166c104d9fd8aa9fa02c70cad70f --- .../src/com/android/systemui/volume/VolumeDialogImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java index 3455ff47de8d1..6fe11ed1792b6 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java @@ -935,6 +935,7 @@ public class VolumeDialogImpl implements VolumeDialog, protected void onStateChangedH(State state) { if (D.BUG) Log.d(TAG, "onStateChangedH() state: " + state.toString()); if (mState != null && state != null + && mState.ringerModeInternal != -1 && mState.ringerModeInternal != state.ringerModeInternal && state.ringerModeInternal == AudioManager.RINGER_MODE_VIBRATE) { mController.vibrate(VibrationEffect.get(VibrationEffect.EFFECT_HEAVY_CLICK));