Implement remote media preference in Sound Setting

-Add test cases

Bug: 147395289
Test: make -j42 RunSettingsRoboTests
Change-Id: I7a3a2312e5f777cc22afb7a33df52afcc7707dc7
This commit is contained in:
timhypeng
2020-02-07 08:59:00 +08:00
parent aa461b0910
commit b545599933
3 changed files with 374 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ package com.android.settings.notification;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.SeekBar;
/**
* A slider preference that controls remote volume, which doesn't go through
@@ -50,7 +51,17 @@ public class RemoteVolumeSeekBarPreference extends VolumeSeekBarPreference {
@Override
protected void init() {
if (mSeekBar == null) return;
setContinuousUpdates(true);
updateIconView();
updateSuppressionText();
notifyHierarchyChanged();
}
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
super.onProgressChanged(seekBar, progress, fromUser);
if (fromUser) {
notifyChanged();
}
}
}