Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2fa6b52c authored by Amith Yamasani's avatar Amith Yamasani Committed by Android (Google) Code Review
Browse files

Merge "Workaround for a database update callback that claims that the data doesn't exist."

parents 48da344c 58bb107f
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -230,10 +230,14 @@ public class VolumePreference extends SeekBarPreference implements
            @Override
            public void onChange(boolean selfChange) {
                super.onChange(selfChange);
    
                if (mSeekBar != null) {
                    mSeekBar.setProgress(System.getInt(mContext.getContentResolver(),
                            System.VOLUME_SETTINGS[mStreamType], 0));
                    int volume = System.getInt(mContext.getContentResolver(),
                            System.VOLUME_SETTINGS[mStreamType], -1);
                    // Works around an atomicity problem with volume updates
                    // TODO: Fix the actual issue, probably in AudioService
                    if (volume >= 0) {
                        mSeekBar.setProgress(volume);
                    }
                }
            }
        };