diff options
author | Luis Vidal <lvidal@cyngn.com> | 2016-05-11 16:41:59 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-05-13 13:52:11 -0700 |
commit | ba3acb5e9fa4f639ffcddcd2bf5dd7bb45c60124 (patch) | |
tree | 368e382b9afd0d53fcaa0c356015af3a360cdf4a /core | |
parent | c30e3aa5458b97cfb6b3d55faa65f16086ae12bf (diff) | |
download | frameworks_base-ba3acb5e9fa4f639ffcddcd2bf5dd7bb45c60124.zip frameworks_base-ba3acb5e9fa4f639ffcddcd2bf5dd7bb45c60124.tar.gz frameworks_base-ba3acb5e9fa4f639ffcddcd2bf5dd7bb45c60124.tar.bz2 |
Update volume slider only if ringer mode changed
Prevents unnecesary updates to volume slider.
Change-Id: Ie8c19c2061dc9f418972b16ca1618a80f10f1325
TICKET: CYNGNOS-958
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/preference/SeekBarVolumizer.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/preference/SeekBarVolumizer.java b/core/java/android/preference/SeekBarVolumizer.java index 72f5de5..e5f71a0 100644 --- a/core/java/android/preference/SeekBarVolumizer.java +++ b/core/java/android/preference/SeekBarVolumizer.java @@ -412,10 +412,11 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba int streamValue = intent.getIntExtra(AudioManager.EXTRA_VOLUME_STREAM_VALUE, -1); updateVolumeSlider(streamType, streamValue); } else if (AudioManager.INTERNAL_RINGER_MODE_CHANGED_ACTION.equals(action)) { + final int oldRingerMode = mRingerMode; if (mNotificationOrRing) { mRingerMode = mAudioManager.getRingerModeInternal(); } - if (mAffectedByRingerMode) { + if (mAffectedByRingerMode && oldRingerMode != mRingerMode) { updateSlider(); } } else if (AudioManager.STREAM_DEVICES_CHANGED_ACTION.equals(action)) { |