Home
last modified time | relevance | path

Searched refs:mPreferenceCategory (Results 1 – 25 of 33) sorted by relevance

12

/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/accounts/
DAccountListPreferenceControllerTest.java63 private PreferenceCategory mPreferenceCategory; field in AccountListPreferenceControllerTest
84 mPreferenceCategory = new PreferenceCategory(application); in setUp()
86 AccountListPreferenceController.class, mPreferenceCategory); in setUp()
102 assertThat(mPreferenceCategory.getTitle()).isEqualTo(expectedTitle); in onCreate_preferenceCategoryTitleShouldBeSet()
109 assertThat(mPreferenceCategory.getPreferenceCount()).isEqualTo(1); in refreshUi_hasNoAccounts_shouldDisplayNoAccountPref()
110 Preference noAccountPref = mPreferenceCategory.getPreference(0); in refreshUi_hasNoAccounts_shouldDisplayNoAccountPref()
123 assertThat(mPreferenceCategory.getPreferenceCount()).isEqualTo(2); in refreshUi_hasAccounts_shouldDisplayAccounts()
125 Preference firstPref = mPreferenceCategory.getPreference(0); in refreshUi_hasAccounts_shouldDisplayAccounts()
129 Preference secondPref = mPreferenceCategory.getPreference(1); in refreshUi_hasAccounts_shouldDisplayAccounts()
144 assertThat(mPreferenceCategory.getPreferenceCount()).isEqualTo(2); in refreshUi_hasUnauthenticatedAccount_shouldNotDisplayAccount()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/
DRemoteVolumeGroupControllerTest.java85 private PreferenceCategory mPreferenceCategory; field in RemoteVolumeGroupControllerTest
97 mPreferenceCategory = spy(new PreferenceCategory(mContext)); in setUp()
98 mPreferenceCategory.setKey(mController.getPreferenceKey()); in setUp()
100 when(mPreferenceCategory.getPreferenceManager()).thenReturn(mPreferenceManager); in setUp()
103 mPreferenceCategory); in setUp()
135 assertThat(mPreferenceCategory.getPreferenceCount()).isEqualTo(0); in displayPreference_noActiveSession_checkPreferenceCount()
142 assertThat(mPreferenceCategory.getPreferenceCount()).isEqualTo(2); in displayPreference_withActiveSession_checkPreferenceCount()
148 final Preference preference = mPreferenceCategory.findPreference(TEST_SESSION_1_ID); in displayPreference_withActiveSession_checkSeekBarTitle()
157 final SeekBarPreference preference = mPreferenceCategory.findPreference(TEST_SESSION_1_ID); in displayPreference_withActiveSession_checkSeekBarMaxVolume()
165 final SeekBarPreference preference = mPreferenceCategory.findPreference(TEST_SESSION_1_ID); in displayPreference_withActiveSession_checkSeekBarCurrentVolume()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/connecteddevice/usb/
DUsbDetailsPowerRoleController.java40 private PreferenceCategory mPreferenceCategory; field in UsbDetailsPowerRoleController
61 mPreferenceCategory = screen.findPreference(getPreferenceKey()); in displayPreference()
62 mSwitchPreference = new SwitchPreference(mPreferenceCategory.getContext()); in displayPreference()
65 mPreferenceCategory.addPreference(mSwitchPreference); in displayPreference()
72 mFragment.getPreferenceScreen().removePreference(mPreferenceCategory); in refresh()
74 mFragment.getPreferenceScreen().addPreference(mPreferenceCategory); in refresh()
78 mPreferenceCategory.setEnabled(true); in refresh()
81 mPreferenceCategory.setEnabled(true); in refresh()
83 mPreferenceCategory.setEnabled(false); in refresh()
DUsbDetailsDataRoleController.java39 private PreferenceCategory mPreferenceCategory; field in UsbDetailsDataRoleController
60 mPreferenceCategory = screen.findPreference(getPreferenceKey()); in displayPreference()
72 mPreferenceCategory.setEnabled(true); in refresh()
76 mPreferenceCategory.setEnabled(true); in refresh()
78 mPreferenceCategory.setEnabled(false); in refresh()
125 RadioButtonPreference pref = new RadioButtonPreference(mPreferenceCategory.getContext()); in makeRadioPreference()
129 mPreferenceCategory.addPreference(pref); in makeRadioPreference()
/packages/apps/Settings/src/com/android/settings/connecteddevice/usb/
DUsbDetailsPowerRoleController.java40 private PreferenceCategory mPreferenceCategory; field in UsbDetailsPowerRoleController
61 mPreferenceCategory = screen.findPreference(getPreferenceKey()); in displayPreference()
62 mSwitchPreference = new SwitchPreference(mPreferenceCategory.getContext()); in displayPreference()
65 mPreferenceCategory.addPreference(mSwitchPreference); in displayPreference()
72 mFragment.getPreferenceScreen().removePreference(mPreferenceCategory); in refresh()
74 mFragment.getPreferenceScreen().addPreference(mPreferenceCategory); in refresh()
78 mPreferenceCategory.setEnabled(true); in refresh()
81 mPreferenceCategory.setEnabled(true); in refresh()
83 mPreferenceCategory.setEnabled(false); in refresh()
DUsbDetailsDataRoleController.java39 private PreferenceCategory mPreferenceCategory; field in UsbDetailsDataRoleController
60 mPreferenceCategory = screen.findPreference(getPreferenceKey()); in displayPreference()
72 mPreferenceCategory.setEnabled(true); in refresh()
76 mPreferenceCategory.setEnabled(true); in refresh()
78 mPreferenceCategory.setEnabled(false); in refresh()
125 RadioButtonPreference pref = new RadioButtonPreference(mPreferenceCategory.getContext()); in makeRadioPreference()
129 mPreferenceCategory.addPreference(pref); in makeRadioPreference()
/packages/apps/Settings/src/com/android/settings/notification/zen/
DZenModeAddBypassingAppsPreferenceController.java59 @VisibleForTesting PreferenceCategory mPreferenceCategory; field in ZenModeAddBypassingAppsPreferenceController
129 if (mPreferenceCategory == null) { in updateAppList()
130 mPreferenceCategory = new PreferenceCategory(mPrefContext); in updateAppList()
131 mPreferenceCategory.setTitle(R.string.zen_mode_bypassing_apps_add_header); in updateAppList()
132 mPreferenceScreen.addPreference(mPreferenceCategory); in updateAppList()
144 Preference pref = mPreferenceCategory.findPreference(""); in updateAppList()
170 Preference pref = mPreferenceCategory.findPreference( in updateAppList()
177 mPreferenceCategory.addPreference(pref); in updateAppList()
181 appsWithNoBypassingDndNotificationChannels, mPreferenceCategory)) { in updateAppList()
182 mPreferenceCategory.removeAll(); in updateAppList()
[all …]
DZenModeAutomaticRulesPreferenceController.java39 protected PreferenceCategory mPreferenceCategory; field in ZenModeAutomaticRulesPreferenceController
59 mPreferenceCategory = screen.findPreference(getPreferenceKey()); in displayPreference()
60 mPreferenceCategory.setPersistent(false); in displayPreference()
67 final int currNumPreferences = mPreferenceCategory.getPreferenceCount(); in updateState()
70 ZenRulePreference pref = (ZenRulePreference) mPreferenceCategory.getPreference(i); in updateState()
89 mPreferenceCategory.removeAll(); in reloadAllRules()
92 mPreferenceCategory.addPreference(pref); in reloadAllRules()
98 return new ZenRulePreference(mPreferenceCategory.getContext(), in createZenRulePreference()
DZenModeAllBypassingAppsPreferenceController.java58 @VisibleForTesting PreferenceCategory mPreferenceCategory; field in ZenModeAllBypassingAppsPreferenceController
84 mPreferenceCategory = screen.findPreference(KEY); in displayPreference()
116 if (mPreferenceCategory == null || apps == null) { in updateAppList()
130 Preference pref = mPreferenceCategory.findPreference(key); in updateAppList()
162 Preference pref = mPreferenceCategory.findPreference(KEY_NO_APPS); in updateAppList()
171 if (hasAppListChanged(appsBypassingDnd, mPreferenceCategory)) { in updateAppList()
172 mPreferenceCategory.removeAll(); in updateAppList()
174 mPreferenceCategory.addPreference(prefToAdd); in updateAppList()
DZenModePriorityConversationsPreferenceController.java60 private PreferenceCategory mPreferenceCategory; field in ZenModePriorityConversationsPreferenceController
73 mPreferenceCategory = screen.findPreference(getPreferenceKey()); in displayPreference()
74 if (mPreferenceCategory.findPreference(KEY_ALL) == null) { in displayPreference()
178 updateState(mPreferenceCategory); in updateChannelCounts()
185 new RadioButtonPreferenceWithExtraWidget(mPreferenceCategory.getContext()); in makeRadioPreference()
195 mPreferenceCategory.addPreference(pref); in makeRadioPreference()
/packages/apps/Settings/src/com/android/settings/network/telephony/
DNetworkSelectSettings.java70 PreferenceCategory mPreferenceCategory; field in NetworkSelectSettings
100 mPreferenceCategory = findPreference(PREF_KEY_NETWORK_OPERATORS); in onCreate()
332 int numberOfPreferences = mPreferenceCategory.getPreferenceCount(); in updateAllPreferenceCategory()
337 mPreferenceCategory.removePreference( in updateAllPreferenceCategory()
338 mPreferenceCategory.getPreference(numberOfPreferences)); in updateAllPreferenceCategory()
347 (mPreferenceCategory.getPreference(index)); in updateAllPreferenceCategory()
358 final Preference rawPref = mPreferenceCategory.getPreference(index); in updateAllPreferenceCategory()
364 mPreferenceCategory.removePreference(rawPref); in updateAllPreferenceCategory()
372 mPreferenceCategory.addPreference(pref); in updateAllPreferenceCategory()
419 mPreferenceCategory.addPreference(pref); in forceUpdateConnectedPreferenceCategory()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/notification/
DZenModeAutomaticRulesPreferenceController.java39 protected PreferenceCategory mPreferenceCategory; field in ZenModeAutomaticRulesPreferenceController
59 mPreferenceCategory = screen.findPreference(getPreferenceKey()); in displayPreference()
60 mPreferenceCategory.setPersistent(false); in displayPreference()
67 final int currNumPreferences = mPreferenceCategory.getPreferenceCount(); in updateState()
70 ZenRulePreference pref = (ZenRulePreference) mPreferenceCategory.getPreference(i); in updateState()
89 mPreferenceCategory.removeAll(); in reloadAllRules()
92 mPreferenceCategory.addPreference(pref); in reloadAllRules()
98 return new ZenRulePreference(mPreferenceCategory.getContext(), in createZenRulePreference()
/packages/apps/Settings/src/com/android/settings/notification/
DRemoteVolumeGroupController.java55 private PreferenceCategory mPreferenceCategory; field in RemoteVolumeGroupController
81 mPreferenceCategory = screen.findPreference(getPreferenceKey()); in displayPreference()
102 mPreferenceCategory.removeAll(); in refreshPreference()
104 mPreferenceCategory.setVisible(false); in refreshPreference()
108 mPreferenceCategory.setVisible(true); in refreshPreference()
111 if (mPreferenceCategory.findPreference(info.getId()) != null) { in refreshPreference()
126 mPreferenceCategory.addPreference(seekBarPreference); in refreshPreference()
132 mPreferenceCategory.addPreference(preference); in refreshPreference()
171 if (mPreferenceCategory == null) { in onDeviceListUpdate()
/packages/apps/Settings/src/com/android/settings/notification/app/
DAppChannelsBypassingDndPreferenceController.java61 private PreferenceCategory mPreferenceCategory; field in AppChannelsBypassingDndPreferenceController
72 mPreferenceCategory = screen.findPreference(KEY); in displayPreference()
74 mAllNotificationsToggle = new RestrictedSwitchPreference(mPreferenceCategory.getContext()); in displayPreference()
94 for (int i = 1; i < mPreferenceCategory.getPreferenceCount(); i++) { in displayPreference()
96 (MasterSwitchPreference) mPreferenceCategory.getPreference(i); in displayPreference()
154 if (mPreferenceCategory == null) { in populateList()
158 mPreferenceCategory.removeAll(); in populateList()
159 mPreferenceCategory.addPreference(mAllNotificationsToggle); in populateList()
197 mPreferenceCategory.addPreference(channelPreference); in populateList()
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/
DWifiConnectionPreferenceControllerTest.java60 PreferenceCategory mPreferenceCategory; field in WifiConnectionPreferenceControllerTest
75 when(mScreen.findPreference(eq(KEY))).thenReturn(mPreferenceCategory); in setUp()
97 verify(mPreferenceCategory, never()).addPreference(any()); in displayPreference_noConnectedWifiEntry_noPreferenceAdded()
106 verify(mPreferenceCategory).addPreference(any(WifiEntryPreference.class)); in displayPreference_hasConnectedWifiEntry_preferenceAdded()
117 verify(mPreferenceCategory).addPreference(captor.capture()); in onConnectedChanged_wifiBecameDisconnected_preferenceRemoved()
126 verify(mPreferenceCategory).removePreference(pref); in onConnectedChanged_wifiBecameDisconnected_preferenceRemoved()
146 verify(mPreferenceCategory, times(2)).addPreference(captor.capture()); in onAccessPointsChanged_wifiBecameConnectedToDifferentAP_preferenceReplaced()
151 verify(mPreferenceCategory).removePreference(eq(pref1)); in onAccessPointsChanged_wifiBecameConnectedToDifferentAP_preferenceReplaced()
DMultiNetworkHeaderControllerTest.java59 private PreferenceCategory mPreferenceCategory; field in MultiNetworkHeaderControllerTest
79 when(mPreferenceScreen.findPreference(eq(KEY_HEADER))).thenReturn(mPreferenceCategory); in setUp()
80 when(mPreferenceCategory.getPreferenceCount()).thenReturn(3); in setUp()
104 verify(mPreferenceCategory, never()).setVisible(eq(!setVisibleExpectedValue)); in displayPreferenceTest()
105 verify(mPreferenceCategory, atLeastOnce()).setVisible(eq(setVisibleExpectedValue)); in displayPreferenceTest()
138 verify(mPreferenceCategory, atLeastOnce()).setVisible(captor.capture()); in onChildUpdated_subscriptionsBecameAvailable_categoryIsVisible()
145 EXPANDED_CHILDREN_COUNT + mPreferenceCategory.getPreferenceCount()); in onChildUpdated_subscriptionsBecameAvailable_categoryIsVisible()
158 verify(mPreferenceCategory, atLeastOnce()).setVisible(captor.capture()); in onChildUpdated_subscriptionsBecameUnavailable_categoryIsNotVisible()
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/telephony/
DNetworkSelectSettingsTest.java71 private PreferenceCategory mPreferenceCategory; field in NetworkSelectSettingsTest
92 mPreferenceCategory = spy(new PreferenceCategory(mContext)); in setUp()
93 doReturn(mPreferenceManager).when(mPreferenceCategory).getPreferenceManager(); in setUp()
101 mNetworkSelectSettings.mPreferenceCategory = mPreferenceCategory; in setUp()
109 assertThat(mPreferenceCategory.getPreferenceCount()).isEqualTo(2); in updateAllPreferenceCategory_correctOrderingPreference()
111 (NetworkOperatorPreference) mPreferenceCategory.getPreference(1); in updateAllPreferenceCategory_correctOrderingPreference()
/packages/apps/Settings/tests/robotests/src/com/android/settings/location/
DLocationFooterPreferenceControllerTest.java58 private PreferenceCategory mPreferenceCategory; field in LocationFooterPreferenceControllerTest
72 when(mPreferenceCategory.getContext()).thenReturn(context); in setUp()
77 doNothing().when(mPreferenceCategory).removeAll(); in setUp()
118 mController.updateState(mPreferenceCategory); in updateState_addPreferences()
120 verify(mPreferenceCategory).addPreference(pref.capture()); in updateState_addPreferences()
131 mController.updateState(mPreferenceCategory); in updateState_notSystemApp_ignore()
132 verify(mPreferenceCategory, never()).addPreference(any(Preference.class)); in updateState_notSystemApp_ignore()
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/savedaccesspoints2/
DSavedAccessPointsPreferenceController2Test.java56 private PreferenceCategory mPreferenceCategory; field in SavedAccessPointsPreferenceController2Test
71 .thenReturn(mPreferenceCategory); in setUp()
72 when(mPreferenceCategory.getContext()).thenReturn(mContext); in setUp()
100 verify(mPreferenceCategory).addPreference(captor.capture()); in displayPreference_oneAccessPoint_shouldListIt()
116 mPreferenceCategory.addPreference(preference); in displayPreference_noAccessPoint_shouldRemoveIt()
120 assertThat(mPreferenceCategory.getPreferenceCount()).isEqualTo(0); in displayPreference_noAccessPoint_shouldRemoveIt()
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/zen/
DZenModeAllBypassingAppsPreferenceControllerTest.java62 private PreferenceCategory mPreferenceCategory; field in ZenModeAllBypassingAppsPreferenceControllerTest
73 mController.mPreferenceCategory = mPreferenceCategory; in setup()
107 verify(mPreferenceCategory, times(2)).addPreference(any()); in testUpdateAppList()
113 verify(mPreferenceCategory, never()).addPreference(any()); in testUpdateAppList_nullApps()
123 verify(mPreferenceCategory).addPreference(prefCaptor.capture()); in testUpdateAppList_emptyAppList()
DZenModeAddBypassingAppsPreferenceControllerTest.java58 private PreferenceCategory mPreferenceCategory; field in ZenModeAddBypassingAppsPreferenceControllerTest
71 mController.mPreferenceCategory = mPreferenceCategory; in setup()
137 verify(mPreferenceCategory).addPreference(prefCaptor.capture()); in testUpdateAppList()
148 verify(mPreferenceCategory, never()).addPreference(any()); in testUpdateAppList_nullApps()
158 verify(mPreferenceCategory).addPreference(prefCaptor.capture()); in testUpdateAppList_emptyAppList()
/packages/apps/Settings/src/com/android/settings/network/
DMultiNetworkHeaderController.java40 private PreferenceCategory mPreferenceCategory; field in MultiNetworkHeaderController
72 mPreferenceCategory = screen.findPreference(mPreferenceKey); in displayPreference()
73 mPreferenceCategory.setVisible(isAvailable()); in displayPreference()
96 mOriginalExpandedChildrenCount + mPreferenceCategory.getPreferenceCount()); in onChildrenUpdated()
101 mPreferenceCategory.setVisible(available); in onChildrenUpdated()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/network/
DMultiNetworkHeaderController.java40 private PreferenceCategory mPreferenceCategory; field in MultiNetworkHeaderController
72 mPreferenceCategory = screen.findPreference(mPreferenceKey); in displayPreference()
73 mPreferenceCategory.setVisible(isAvailable()); in displayPreference()
96 mOriginalExpandedChildrenCount + mPreferenceCategory.getPreferenceCount()); in onChildrenUpdated()
101 mPreferenceCategory.setVisible(available); in onChildrenUpdated()
/packages/apps/Settings/src/com/android/settings/gestures/
DPreventRingingGesturePreferenceController.java58 PreferenceCategory mPreferenceCategory; field in PreventRingingGesturePreferenceController
81 mPreferenceCategory = screen.findPreference(getPreferenceKey()); in displayPreference()
85 if (mPreferenceCategory != null) { in displayPreference()
86 mSettingObserver = new SettingObserver(mPreferenceCategory); in displayPreference()
174 RadioButtonPreference pref = new RadioButtonPreference(mPreferenceCategory.getContext()); in makeRadioPreference()
178 mPreferenceCategory.addPreference(pref); in makeRadioPreference()
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/savedaccesspoints/
DSavedAccessPointsPreferenceControllerTest.java59 private PreferenceCategory mPreferenceCategory; field in SavedAccessPointsPreferenceControllerTest
76 .thenReturn(mPreferenceCategory); in setUp()
77 when(mPreferenceCategory.getContext()).thenReturn(mContext); in setUp()
107 verify(mPreferenceCategory).addPreference(captor.capture()); in displayPreference_oneAccessPoint_shouldListNonSubscribedAPs()
121 verify(mPreferenceCategory, never()).addPreference(any(AccessPointPreference.class)); in displayPreference_onePasspoint_shouldNotListSubscribedAPs()

12