/packages/apps/Settings/tests/robotests/src/com/android/settings/widget/ |
D | SeekBarPreferenceTest.java | 61 private SeekBarPreference mSeekBarPreference; field in SeekBarPreferenceTest 72 mSeekBarPreference = spy(new SeekBarPreference(mContext)); in setUp() 73 mSeekBarPreference.setMax(MAX); in setUp() 74 mSeekBarPreference.setMin(MIN); in setUp() 75 mSeekBarPreference.setProgress(PROGRESS); in setUp() 76 mSeekBarPreference.setPersistent(false); in setUp() 77 mSeekBarPreference.setHapticFeedbackMode(SeekBarPreference.HAPTIC_FEEDBACK_MODE_NONE); in setUp() 86 final Parcelable parcelable = mSeekBarPreference.onSaveInstanceState(); in testSaveAndRestoreInstanceState() 98 when(mSeekBarPreference.isDisabledByAdmin()).thenReturn(true); in isSelectable_disabledByAdmin_returnTrue() 100 assertThat(mSeekBarPreference.isSelectable()).isTrue(); in isSelectable_disabledByAdmin_returnTrue() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/accessibility/ |
D | PreviewSizeSeekBarControllerTest.java | 80 private LabeledSeekBarPreference mSeekBarPreference; field in PreviewSizeSeekBarControllerTest 112 mSeekBarPreference = spy(new LabeledSeekBarPreference(mContext, /* attrs= */ null)); in setUp() 113 mSeekBarPreference.setKey(FONT_SIZE_KEY); in setUp() 120 mSeekBarPreference.onBindViewHolder(mHolder); in setUp() 122 when(mPreferenceScreen.findPreference(anyString())).thenReturn(mSeekBarPreference); in setUp() 140 mSeekBarPreference); in setUp() 145 when(mPreferenceScreen.findPreference(anyString())).thenReturn(mSeekBarPreference); in initMax_matchResult() 149 assertThat(mSeekBarPreference.getMax()).isEqualTo( in initMax_matchResult() 155 when(mPreferenceScreen.findPreference(anyString())).thenReturn(mSeekBarPreference); in initProgress_matchResult() 159 verify(mSeekBarPreference).setProgress(mFontSizeData.getInitialIndex()); in initProgress_matchResult() [all …]
|
D | FloatingMenuTransparencyPreferenceControllerTest.java | 68 private SeekBarPreference mSeekBarPreference; field in FloatingMenuTransparencyPreferenceControllerTest 78 mSeekBarPreference = new SeekBarPreference(mContext); in setUp() 79 doReturn(mSeekBarPreference).when(mScreen).findPreference("test_key"); in setUp() 107 assertThat(mSeekBarPreference.isEnabled()).isTrue(); in displayPreference_floatingMenuMode_fadeEnabled_preferenceEnabled() 119 assertThat(mSeekBarPreference.isEnabled()).isFalse(); in displayPreference_floatingMenuMode_fadeDisabled_preferenceDisabled() 129 assertThat(mSeekBarPreference.isEnabled()).isFalse(); in displayPreference_navigationBarMode_preferenceDisabled() 144 assertThat(mSeekBarPreference.isEnabled()).isFalse(); in onChange_floatingMenuModeChangeToNavigationBar_preferenceDisabled() 159 assertThat(mSeekBarPreference.isEnabled()).isTrue(); in onChange_navigationBarModeChangeToFloatingMenu_preferenceDisabled()
|
D | BalanceSeekBarPreferenceTest.java | 48 private BalanceSeekBarPreference mSeekBarPreference; field in BalanceSeekBarPreferenceTest 53 mSeekBarPreference = new BalanceSeekBarPreference(mContext, mAttrs); in setUp() 56 inflater.inflate(mSeekBarPreference.getLayoutResource(), in setUp() 64 mSeekBarPreference.onBindViewHolder(mHolder); in seekBarPreferenceOnBindViewHolder_shouldInitSeekBarValue()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterysaver/ |
D | BatterySaverScheduleSeekBarController.java | 56 @VisibleForTesting public SeekBarPreference mSeekBarPreference; field in BatterySaverScheduleSeekBarController 63 mSeekBarPreference = new SeekBarPreference(context); in BatterySaverScheduleSeekBarController() 64 mSeekBarPreference.setLayoutResource(R.layout.preference_widget_seekbar_settings); in BatterySaverScheduleSeekBarController() 65 mSeekBarPreference.setIconSpaceReserved(false); in BatterySaverScheduleSeekBarController() 66 mSeekBarPreference.setOnPreferenceChangeListener(this); in BatterySaverScheduleSeekBarController() 67 mSeekBarPreference.setOnSeekBarChangeListener(this); in BatterySaverScheduleSeekBarController() 68 mSeekBarPreference.setContinuousUpdates(true); in BatterySaverScheduleSeekBarController() 69 mSeekBarPreference.setMax(MAX_SEEKBAR_VALUE); in BatterySaverScheduleSeekBarController() 70 mSeekBarPreference.setMin(MIN_SEEKBAR_VALUE); in BatterySaverScheduleSeekBarController() 71 mSeekBarPreference.setKey(KEY_BATTERY_SAVER_SEEK_BAR); in BatterySaverScheduleSeekBarController() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterysaver/ |
D | BatterySaverScheduleSeekBarControllerTest.java | 45 mController.mSeekBarPreference = spy(mController.mSeekBarPreference); in setUp() 53 mController.onPreferenceChange(mController.mSeekBarPreference, 10); in onPreferenceChange_withoutOnStopTrackingTouch_updatesTitleAndDescriptionOnly() 56 assertThat(mController.mSeekBarPreference.getTitle()).isEqualTo(expectedTitle); in onPreferenceChange_withoutOnStopTrackingTouch_updatesTitleAndDescriptionOnly() 57 verify(mController.mSeekBarPreference).overrideSeekBarStateDescription(expectedTitle); in onPreferenceChange_withoutOnStopTrackingTouch_updatesTitleAndDescriptionOnly() 65 mController.onPreferenceChange(mController.mSeekBarPreference, 10); in onPreferenceChange_withOnStopTrackingTouch_updatesSettingsGlobal() 69 assertThat(mController.mSeekBarPreference.getTitle()).isEqualTo(expectedTitle); in onPreferenceChange_withOnStopTrackingTouch_updatesSettingsGlobal() 70 verify(mController.mSeekBarPreference).overrideSeekBarStateDescription(expectedTitle); in onPreferenceChange_withOnStopTrackingTouch_updatesSettingsGlobal() 92 assertThat(mController.mSeekBarPreference.isVisible()).isFalse(); in updateSeekBar_routineMode_hasCorrectProperties() 93 verify(mController.mSeekBarPreference, never()).overrideSeekBarStateDescription(any()); in updateSeekBar_routineMode_hasCorrectProperties() 107 assertThat(mController.mSeekBarPreference.isVisible()).isTrue(); in updateSeekBar_percentageMode_hasCorrectProperties() [all …]
|
/packages/apps/Settings/src/com/android/settings/accessibility/ |
D | PreviewSizeSeekBarController.java | 52 private LabeledSeekBarPreference mSeekBarPreference; field in PreviewSizeSeekBarController 146 mSeekBarPreference = screen.findPreference(getPreferenceKey()); in displayPreference() 147 mSeekBarPreference.setMax(dataSize - 1); in displayPreference() 148 mSeekBarPreference.setProgress(initialIndex); in displayPreference() 149 mSeekBarPreference.setContinuousUpdates(true); in displayPreference() 150 mSeekBarPreference.setOnSeekBarChangeListener(mSeekBarChangeListener); in displayPreference() 154 setSeekbarStateDescription(mSeekBarPreference.getProgress()); in displayPreference() 160 mSeekBarPreference.setProgress(defaultProgress); in resetState() 178 updateState(mSeekBarPreference); in setProgressStateLabels() 190 mSeekBarPreference.setSeekBarStateDescription( in setSeekbarStateDescription() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/gestures/ |
D | LabeledSeekBarPreferenceTest.java | 73 private LabeledSeekBarPreference mSeekBarPreference; field in LabeledSeekBarPreferenceTest 86 mSeekBarPreference = new LabeledSeekBarPreference(mContext, null); in setUp() 89 inflater.inflate(mSeekBarPreference.getLayoutResource(), in setUp() 103 mSeekBarPreference.setOnPreferenceChangeStopListener(mListener); in seekBarPreferenceOnStopTrackingTouch_callsListener() 104 mSeekBarPreference.onStopTrackingTouch(mSeekBar); in seekBarPreferenceOnStopTrackingTouch_callsListener() 106 verify(mListener, times(1)).onPreferenceChange(mSeekBarPreference, 2); in seekBarPreferenceOnStopTrackingTouch_callsListener() 112 mSeekBarPreference.setSummary(summary); in seekBarPreferenceSummarySet_returnsValue() 113 mSeekBarPreference.onBindViewHolder(mViewHolder); in seekBarPreferenceSummarySet_returnsValue() 115 assertThat(mSeekBarPreference.getSummary()).isEqualTo(summary); in seekBarPreferenceSummarySet_returnsValue() 121 mSeekBarPreference.setSummary(null); in seekBarPreferenceSummaryNull_hidesView() [all …]
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/display/ |
D | BrightnessLevelPreferenceControllerTest.java | 61 private SeekBarPreference mSeekBarPreference; field in BrightnessLevelPreferenceControllerTest 79 mSeekBarPreference = new SeekBarPreference(mContext); in setUp() 84 PreferenceControllerTestUtil.assignPreference(mController, mSeekBarPreference); in setUp() 113 assertThat(mSeekBarPreference.getMax()).isEqualTo(GAMMA_SPACE_MAX); in testRefreshUi_maxSet() 121 assertThat(mSeekBarPreference.getValue()).isEqualTo(0); in testRefreshUi_minValue() 129 assertThat(mSeekBarPreference.getValue()).isEqualTo(GAMMA_SPACE_MAX); in testRefreshUi_maxValue() 137 assertThat(mSeekBarPreference.getValue()).isEqualTo(convertLinearToGamma(mMid, mMin, mMax)); in testRefreshUi_midValue() 142 mSeekBarPreference.callChangeListener(0); in testHandlePreferenceChanged_minValue() 149 mSeekBarPreference.callChangeListener(GAMMA_SPACE_MAX); in testHandlePreferenceChanged_maxValue() 156 mSeekBarPreference.callChangeListener(convertLinearToGamma(mMid, mMin, mMax)); in testHandlePreferenceChanged_midValue()
|