Volume can not be updated in Sound&notification

After "onActivityPause()" is invoked and "onActivityResume()"
is invoked again, "mVolumizer" is not empty object,
so volume is not updated.

To fix this issue, set "mVolumizer" is null in "onActivityPause()",
if "onActivityResume()" is invoked again, recreate "mVolumizer"
and update volume.

Bug: 37558283
Test: manual, cherrypicking from AOSP
Change-Id: Id91064ea32305b5bf203f34e31988ac923beee6d
This commit is contained in:
Sheng Wang
2016-08-19 17:09:32 +08:00
committed by Andrew Sapperstein
parent fbc9035bcd
commit 8c329af634

View File

@@ -91,9 +91,10 @@ public class VolumeSeekBarPreference extends SeekBarPreference {
mStopped = true;
if (mVolumizer != null) {
mVolumizer.stop();
mVolumizer = null;
}
}
@Override
public void onBindViewHolder(PreferenceViewHolder view) {
super.onBindViewHolder(view);