/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/ |
D | BarChartPreferenceTest.java | 55 private BarChartPreference mPreference; field in BarChartPreferenceTest 63 mPreference = new BarChartPreference(mContext, null /* attrs */); in setUp() 88 mPreference.initializeBarChart(barChartInfo); in initializeBarChart_titleSet_shouldSetTitleInChartView() 89 mPreference.onBindViewHolder(mHolder); in initializeBarChart_titleSet_shouldSetTitleInChartView() 102 mPreference.initializeBarChart(barChartInfo); in initializeBarChart_noBarViewSet_shouldShowTitleAndEmptyView() 104 mPreference.onBindViewHolder(mHolder); in initializeBarChart_noBarViewSet_shouldShowTitleAndEmptyView() 124 mPreference.initializeBarChart(barChartInfo); in initializeBarChart_detailsSet_shouldShowBarChartDetailsView() 125 mPreference.onBindViewHolder(mHolder); in initializeBarChart_detailsSet_shouldShowBarChartDetailsView() 142 mPreference.initializeBarChart(barChartInfo); in initializeBarChart_detailsNotSet_shouldHideBarChartDetailsView() 143 mPreference.onBindViewHolder(mHolder); in initializeBarChart_detailsNotSet_shouldHideBarChartDetailsView() [all …]
|
D | LayoutPreferenceTest.java | 39 private LayoutPreference mPreference; field in LayoutPreferenceTest 45 mPreference = new LayoutPreference(mContext, R.layout.settings_entity_header); in setUp() 54 mPreference.setOnPreferenceClickListener(listener); in setOnPreferenceClickListener_layoutPreferenceShouldListenClickEvent() 55 mPreference.onBindViewHolder(mHolder); in setOnPreferenceClickListener_layoutPreferenceShouldListenClickEvent() 59 verify(listener).onPreferenceClick(mPreference); in setOnPreferenceClickListener_layoutPreferenceShouldListenClickEvent() 66 mPreference.setSelectable(false); in setNonSelectable_viewShouldNotBeSelectable() 67 mPreference.onBindViewHolder(mHolder); in setNonSelectable_viewShouldNotBeSelectable() 75 mPreference.findViewById(android.R.id.button1).setEnabled(false); in disableSomeView_shouldMaintainStateAfterBind() 76 mPreference.findViewById(android.R.id.button2).setEnabled(true); in disableSomeView_shouldMaintainStateAfterBind() 78 mPreference.onBindViewHolder(mHolder); in disableSomeView_shouldMaintainStateAfterBind() [all …]
|
D | RadioButtonPreferenceTest.java | 41 private RadioButtonPreference mPreference; field in RadioButtonPreferenceTest 57 mPreference = new RadioButtonPreference(mContext); in setUp() 63 mPreference.onBindViewHolder(preferenceViewHolder); in setUp() 71 assertThat(mPreference.getLayoutResource()).isEqualTo(R.layout.preference_radio); in shouldHaveRadioPreferenceLayout() 76 assertThat(mPreference.isIconSpaceReserved()).isFalse(); in iconSpaceReservedShouldBeFalse() 81 mPreference.setSummary("some summary"); in onBindViewHolder_withSummary_containerShouldBeVisible() 88 mPreference.onBindViewHolder(preferenceViewHolder); in onBindViewHolder_withSummary_containerShouldBeVisible() 95 mPreference.setSummary(""); in onBindViewHolder_emptySummary_containerShouldBeGone() 102 mPreference.onBindViewHolder(preferenceViewHolder); in onBindViewHolder_emptySummary_containerShouldBeGone() 109 mPreference.setSummary(null); in nullSummary_containerShouldBeGone() [all …]
|
D | IllustrationPreferenceTest.java | 59 private IllustrationPreference mPreference; field in IllustrationPreferenceTest 81 mPreference = new IllustrationPreference(mContext, attributeSet); in setUp() 89 mPreference.setMiddleGroundView(view); in setMiddleGroundView_middleGroundView_shouldVisible() 90 mPreference.onBindViewHolder(mViewHolder); in setMiddleGroundView_middleGroundView_shouldVisible() 97 mPreference.enableAnimationAutoScale(true); in enableAnimationAutoScale_shouldChangeScaleType() 98 mPreference.onBindViewHolder(mViewHolder); in enableAnimationAutoScale_shouldChangeScaleType() 108 mPreference.setImageUri(mImageUri); in playAnimationWithUri_animatedImageDrawable_success() 109 mPreference.onBindViewHolder(mViewHolder); in playAnimationWithUri_animatedImageDrawable_success() 119 mPreference.setImageUri(mImageUri); in playAnimationWithUri_animatedVectorDrawable_success() 120 mPreference.onBindViewHolder(mViewHolder); in playAnimationWithUri_animatedVectorDrawable_success() [all …]
|
D | MainSwitchPreferenceTest.java | 39 private MainSwitchPreference mPreference; field in MainSwitchPreferenceTest 47 mPreference = new MainSwitchPreference(mContext); in setUp() 54 mPreference.onBindViewHolder(mHolder); in setTitle_shouldUpdateTitle() 55 mPreference.setTitle(defaultOnText); in setTitle_shouldUpdateTitle() 56 mPreference.updateStatus(true /* checked */); in setTitle_shouldUpdateTitle() 64 mPreference.onBindViewHolder(mHolder); in updateStatus_shouldMatchTheStatus() 65 mPreference.updateStatus(true); in updateStatus_shouldMatchTheStatus() 67 assertThat(mPreference.isChecked()).isTrue(); in updateStatus_shouldMatchTheStatus()
|
D | TwoTargetPreferenceTest.java | 51 private TwoTargetPreference mPreference; field in TwoTargetPreferenceTest 58 mPreference = spy(new TwoTargetPreference(mContext)); in setUp() 68 assertThat(mPreference.shouldHideSecondTarget()).isTrue(); in bind_noSecondTarget_shouldNotDrawDivider() 70 mPreference.onBindViewHolder(mViewHolder); in bind_noSecondTarget_shouldNotDrawDivider() 78 doReturn(false).when(mPreference).shouldHideSecondTarget(); in bind_hasSecondTarget_shouldNotDrawDivider() 80 mPreference.onBindViewHolder(mViewHolder); in bind_hasSecondTarget_shouldNotDrawDivider() 88 mPreference.setIconSize(ICON_SIZE_SMALL); in bind_smallIcon_shouldUseSmallIconSize() 90 mPreference.onBindViewHolder(mViewHolder); in bind_smallIcon_shouldUseSmallIconSize() 104 mPreference.setIconSize(ICON_SIZE_MEDIUM); in bind_mediumIcon_shouldUseMediumIconSize() 106 mPreference.onBindViewHolder(mViewHolder); in bind_mediumIcon_shouldUseMediumIconSize() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/ |
D | EnableAdbPreferenceControllerTest.java | 65 private RestrictedSwitchPreference mPreference; field in EnableAdbPreferenceControllerTest 79 mPreference = new RestrictedSwitchPreference(mContext); in setUp() 80 mPreference.setKey(mController.getPreferenceKey()); in setUp() 81 when(mScreen.findPreference(mPreference.getKey())).thenReturn(mPreference); in setUp() 90 assertThat(mPreference.isVisible()).isFalse(); in displayPreference_isNotAdmin_shouldRemovePreference() 99 assertThat(mPreference.isVisible()).isTrue(); in displayPreference_isAdmin_shouldNotRemovePreference() 106 mPreference.setChecked(true); in resetPreference_shouldUncheck() 110 assertThat(mPreference.isChecked()).isFalse(); in resetPreference_shouldUncheck() 118 mPreference.setChecked(true); in handlePreferenceTreeClick_shouldUpdateSettings() 121 mController.handlePreferenceTreeClick(mPreference); in handlePreferenceTreeClick_shouldUpdateSettings() [all …]
|
D | DeveloperOptionsPreferenceControllerTest.java | 39 private Preference mPreference; field in DeveloperOptionsPreferenceControllerTest 49 doReturn(mPreference).when(mPreferenceScreen).findPreference(TEST_KEY); in setUp() 57 verify(mPreference).setEnabled(true); in onDeveloperOptionsEnabled_shouldEnablePreference() 64 verify(mPreference).setEnabled(false); in onDeveloperOptionsDisabled_shouldDisablePreference()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/ |
D | AbstractPreferenceControllerTest.java | 44 private Preference mPreference; field in AbstractPreferenceControllerTest 51 mPreference = new Preference(mContext); in setUp() 52 mPreference.setKey(KEY_PREF); in setUp() 53 when(mScreen.findPreference(KEY_PREF)).thenReturn(mPreference); in setUp() 63 assertThat(mPreference.isVisible()).isTrue(); in displayPref_ifAvailable() 72 assertThat(mPreference.isVisible()).isTrue(); in displayPref_noKey_shouldDoNothing() 79 assertThat(mPreference.isVisible()).isTrue(); in setVisible_prefIsVisible_shouldSetToVisible() 86 assertThat(mPreference.isVisible()).isFalse(); in setVisible_prefNotVisible_shouldSetToInvisible() 95 assertThat(mPreference.isVisible()).isFalse(); in doNotDisplayPref_ifNotAvailable() 100 mTestPrefController.updateState(mPreference); in updateState_hasSummary_shouldSetSummary() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/ |
D | RestrictedTopLevelPreferenceTest.java | 39 private RestrictedTopLevelPreference mPreference; field in RestrictedTopLevelPreferenceTest 45 mPreference = spy(new RestrictedTopLevelPreference(mContext)); in setUp() 46 mHelper = spy(new RestrictedPreferenceHelper(mContext, mPreference, null)); in setUp() 47 ReflectionHelpers.setField(mPreference, "mHelper", mHelper); in setUp() 54 mPreference.setEnabled(true); in setEnabled_disabledByAdmin_shouldCallSetDisabledByAdmin() 63 mPreference.setEnabled(true); in setEnabled_notDisabledByAdmin_shouldNotCallSetDisabledByAdmin() 70 mPreference.setDisabledByAdmin(new RestrictedLockUtils.EnforcedAdmin()); in setDisabledByAdmin_shouldNotCallSetEnabled() 72 verify(mPreference, never()).setEnabled(anyBoolean()); in setDisabledByAdmin_shouldNotCallSetEnabled()
|
D | CustomEditTextPreferenceTest.java | 43 private TestPreference mPreference; field in CustomEditTextPreferenceTest 48 mPreference = new TestPreference(RuntimeEnvironment.application); in setUp() 58 mPreference.onBindDialogView(mView); in bindDialogView_shouldRequestFocus() 65 ReflectionHelpers.setField(mPreference, "mFragment", in getEditText_noDialog_shouldNotCrash() 68 mPreference.getEditText(); in getEditText_noDialog_shouldNotCrash()
|
D | CustomEditTextPreferenceComaptTest.java | 43 private TestPreference mPreference; field in CustomEditTextPreferenceComaptTest 48 mPreference = new TestPreference(RuntimeEnvironment.application); in setUp() 58 mPreference.onBindDialogView(mView); in bindDialogView_shouldRequestFocus() 65 ReflectionHelpers.setField(mPreference, "mFragment", in getEditText_noDialog_shouldNotCrash() 68 mPreference.getEditText(); in getEditText_noDialog_shouldNotCrash()
|
D | RestrictedSwitchPreferenceTest.java | 39 private RestrictedSwitchPreference mPreference; field in RestrictedSwitchPreferenceTest 48 mPreference = new RestrictedSwitchPreference(mContext); in setUp() 57 mPreference.setIconSize(SIZE); in onBindViewHolder_setIconSize_shouldHaveCorrectLayoutParam() 59 mPreference.onBindViewHolder(mViewHolder); in onBindViewHolder_setIconSize_shouldHaveCorrectLayoutParam() 67 mPreference.onBindViewHolder(mViewHolder); in onBindViewHolder_notSetIconSize_shouldHaveCorrectLayoutParam()
|
D | RestrictedPreferenceHelperTest.java | 45 private Preference mPreference; field in RestrictedPreferenceHelperTest 56 mHelper = new RestrictedPreferenceHelper(mContext, mPreference, null); in setUp() 96 verify(mPreference).setEnabled(false); in setDisabledByAdmin_RestrictedPreference_shouldDisablePreference()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/ |
D | SerialNumberPreferenceControllerTest.java | 43 private Preference mPreference; field in SerialNumberPreferenceControllerTest 50 mPreference = new Preference(mContext); in setUp() 51 mPreference.setKey(AbstractSerialNumberPreferenceController.KEY_SERIAL_NUMBER); in setUp() 52 when(mScreen.findPreference(mPreference.getKey())).thenReturn(mPreference); in setUp() 75 assertThat(mPreference.isVisible()).isFalse(); in testDisplay_noSerial_shouldHidePreference() 85 assertThat(mPreference.isVisible()).isTrue(); in testDisplay_hasSerial_shouldSetSummary() 86 assertThat(mPreference.getSummary()).isEqualTo(serial); in testDisplay_hasSerial_shouldSetSummary()
|
D | UptimePreferenceControllerTest.java | 50 private Preference mPreference; field in UptimePreferenceControllerTest 55 doReturn(mPreference).when(mScreen) in setUp() 67 verify(mPreference).setSummary( in testDisplayPreference() 78 verify(mPreference, times(1)).setSummary(any(CharSequence.class)); in testUptimeTick() 82 verify(mPreference, times(2)).setSummary(any(CharSequence.class)); in testUptimeTick() 86 verify(mPreference, times(3)).setSummary(any(CharSequence.class)); in testUptimeTick() 90 verify(mPreference, times(4)).setSummary(any(CharSequence.class)); in testUptimeTick()
|
D | WifiMacAddressPreferenceControllerTest.java | 64 private Preference mPreference; field in WifiMacAddressPreferenceControllerTest 73 mPreference = new Preference(mContext); in setUp() 75 doReturn(mPreference).when(mScreen) in setUp() 113 assertThat(mPreference.getSummary()) in updateConnectivity_null_setMacUnavailable() 122 assertThat(mPreference.getSummary()).isEqualTo(TEST_MAC_ADDRESS); in updateConnectivity_validMac_setValidMac()
|
D | IpAddressPreferenceControllerTest.java | 51 private Preference mPreference; field in IpAddressPreferenceControllerTest 56 doReturn(mPreference).when(mScreen) in setUp()
|
D | BluetoothAddressPreferenceControllerTest.java | 50 private Preference mPreference; field in BluetoothAddressPreferenceControllerTest 55 doReturn(mPreference).when(mScreen) in setUp()
|
D | ImsStatusPreferenceControllerTest.java | 51 private Preference mPreference; field in ImsStatusPreferenceControllerTest 56 doReturn(mPreference).when(mScreen) in setUp()
|
/frameworks/base/core/tests/coretests/src/android/preference/ |
D | PreferenceIconSpaceTest.java | 43 private TestPreference mPreference; field in PreferenceIconSpaceTest 60 mPreference = new TestPreference(InstrumentationRegistry.getTargetContext()); in setUp() 65 mPreference.setIconSpaceReserved(true); in bindView_iconSpaceReserved_shouldReserveIconSpace() 66 mPreference.bindView(mViewGroup); in bindView_iconSpaceReserved_shouldReserveIconSpace() 74 mPreference.setIconSpaceReserved(false); in bindView_iconSpaceNotReserved_shouldNotReserveIconSpace() 75 mPreference.bindView(mViewGroup); in bindView_iconSpaceNotReserved_shouldNotReserveIconSpace() 83 mPreference.setIcon(new ColorDrawable(Color.BLACK)); in bindView_hasIcon_shouldDisplayIcon() 84 mPreference.bindView(mViewGroup); in bindView_hasIcon_shouldDisplayIcon()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/development/ |
D | AbstractEnableAdbPreferenceController.java | 50 protected RestrictedSwitchPreference mPreference; field in AbstractEnableAdbPreferenceController 60 mPreference = (RestrictedSwitchPreference) screen.findPreference(KEY_ENABLE_ADB); in displayPreference() 93 mPreference.setDisabledByAdmin( in onDeveloperOptionsSwitchEnabled() 100 mPreference.setEnabled(enabled); in enablePreference() 105 if (mPreference.isChecked()) { in resetPreference() 106 mPreference.setChecked(false); in resetPreference() 107 handlePreferenceTreeClick(mPreference); in resetPreference()
|
D | DeveloperOptionsPreferenceController.java | 34 protected Preference mPreference; field in DeveloperOptionsPreferenceController 53 mPreference = screen.findPreference(getPreferenceKey()); in displayPreference() 78 mPreference.setEnabled(true); in onDeveloperOptionsSwitchEnabled() 85 mPreference.setEnabled(false); in onDeveloperOptionsSwitchDisabled()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/ |
D | RestrictedPreferenceHelper.java | 38 private final Preference mPreference; field in RestrictedPreferenceHelper 48 mPreference = preference; in RestrictedPreferenceHelper() 169 if (!(mPreference instanceof RestrictedTopLevelPreference)) { in setDisabledByAdmin() 170 mPreference.setEnabled(!disabled); in setDisabledByAdmin()
|
/frameworks/base/media/java/android/media/ |
D | MediaRouter2.java | 436 mRouteCallbackRecords.stream().map(record -> record.mPreference).collect( in updateDiscoveryPreferenceIfNeededLocked() 1084 List<MediaRoute2Info> filteredRoutes = filterRoutes(routes, record.mPreference); in notifyRoutesAdded() 1094 List<MediaRoute2Info> filteredRoutes = filterRoutes(routes, record.mPreference); in notifyRoutesRemoved() 1104 List<MediaRoute2Info> filteredRoutes = filterRoutes(routes, record.mPreference); in notifyRoutesChanged() 1764 public final RouteDiscoveryPreference mPreference; field in MediaRouter2.RouteCallbackRecord 1770 mPreference = preference; in RouteCallbackRecord()
|