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
This commit is contained in:
Beverly
2020-08-12 08:33:54 -04:00
committed by Beverly Tai
parent d56bfed60c
commit 3fbdd17f45

View File

@@ -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));