Add a new method to set state description
- This CL add a new method setSeekBarStateDescription() to set the state of seek bar. Because in some case the description of seek bar is not align progress of seek bar. - Add test case Bug: 157629483 Test: make -j42 RunSettingsRoboTests Change-Id: I432e6f9deef59756b0a41244d50aaada1ddac6a9
This commit is contained in:
@@ -19,6 +19,7 @@ package com.android.settings.widget;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import static org.mockito.Mockito.spy;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import android.content.Context;
|
||||
@@ -110,6 +111,13 @@ public class SeekBarPreferenceTest {
|
||||
assertThat(seekBarPreference.isSelectable()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetSeekBarStateDescription() {
|
||||
mSeekBarPreference.setSeekBarStateDescription("test");
|
||||
|
||||
verify(mSeekBarPreference).setSeekBarStateDescription("test");
|
||||
}
|
||||
|
||||
public static class TestFragment extends PreferenceFragmentCompat {
|
||||
@Override
|
||||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
||||
|
Reference in New Issue
Block a user