Merge "Vibrate when ringer changes to vibrate" into pi-dev

This commit is contained in:
TreeHugger Robot
2018-05-23 02:18:24 +00:00
committed by Android (Google) Code Review

View File

@@ -727,6 +727,12 @@ public class VolumeDialogImpl implements VolumeDialog {
}
protected void onStateChangedH(State state) {
if (mState != null && state != null
&& mState.ringerModeInternal != state.ringerModeInternal
&& state.ringerModeInternal == AudioManager.RINGER_MODE_VIBRATE) {
mController.vibrate(VibrationEffect.get(VibrationEffect.EFFECT_HEAVY_CLICK));
}
mState = state;
mDynamic.clear();
// add any new dynamic rows