Home
last modified time | relevance | path

Searched refs:preference (Results 1 – 25 of 3055) sorted by relevance

12345678910>>...123

/packages/apps/StorageManager/robotests/src/com/android/storagemanager/deletionhelper/
DAppDeletionPreferenceTest.java57 AppDeletionPreference preference = new AppDeletionPreference(mContext, app); in testPreferenceSummary() local
58 preference.updateSummary(); in testPreferenceSummary()
60 assertThat(preference.getPackageName()).isEqualTo(TEST_PACKAGE_NAME); in testPreferenceSummary()
61 assertThat(preference.getTitle()).isEqualTo(TEST_PACKAGE_LABEL); in testPreferenceSummary()
62 assertThat(preference.getSummary().toString()).isEqualTo("30 days ago"); in testPreferenceSummary()
63 assertThat(preference.getItemSize()).isEqualTo(KB_STRING); in testPreferenceSummary()
76 AppDeletionPreference preference = new AppDeletionPreference(mContext, app); in testTwoDayPreferenceSummary() local
77 preference.updateSummary(); in testTwoDayPreferenceSummary()
79 assertThat(preference.getPackageName()).isEqualTo(TEST_PACKAGE_NAME); in testTwoDayPreferenceSummary()
80 assertThat(preference.getTitle()).isEqualTo(TEST_PACKAGE_LABEL); in testTwoDayPreferenceSummary()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/development/graphicsdriver/
DGraphicsDriverAppPreferenceControllerTest.java37 import androidx.preference.ListPreference;
38 import androidx.preference.PreferenceCategory;
39 import androidx.preference.PreferenceGroup;
40 import androidx.preference.PreferenceManager;
41 import androidx.preference.PreferenceScreen;
181 final ListPreference preference = in createPreference_configDefault_shouldSetDefaultAttributes() local
184 assertThat(preference.getKey()).isEqualTo(TEST_PKG_NAME); in createPreference_configDefault_shouldSetDefaultAttributes()
185 assertThat(preference.getTitle()).isEqualTo(TEST_APP_NAME); in createPreference_configDefault_shouldSetDefaultAttributes()
186 assertThat(preference.getDialogTitle()).isEqualTo(mDialogTitle); in createPreference_configDefault_shouldSetDefaultAttributes()
187 assertThat(preference.getEntries()).isEqualTo(mValueList); in createPreference_configDefault_shouldSetDefaultAttributes()
[all …]
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/enterprise/
DBaseEnterprisePreferenceControllerTestCase.java31 import androidx.preference.Preference;
32 import androidx.preference.PreferenceGroup;
49 protected static final void assertPreferenceSummary(Preference preference, String summary) { in assertPreferenceSummary() argument
50 assertWithMessage("(preference %s).getSummary()", preference).that(preference.getSummary()) in assertPreferenceSummary()
60 protected static final void verifyPreferenceVisibleSet(Preference preference, boolean visible) { in verifyPreferenceVisibleSet() argument
61 verify(preference).setVisible(visible); in verifyPreferenceVisibleSet()
64 protected static final void verifyPreferenceTitleSet(Preference preference, in verifyPreferenceTitleSet() argument
66 verify(preference).setTitle(title); in verifyPreferenceTitleSet()
69 protected static final void verifyPreferenceTitleNeverSet(Preference preference) { in verifyPreferenceTitleNeverSet() argument
70 verify(preference, never()).setTitle(any()); in verifyPreferenceTitleNeverSet()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/app/
DImportancePreferenceTest.java37 import androidx.preference.PreferenceViewHolder;
60 final ImportancePreference preference = new ImportancePreference(mContext); in createNewPreference_shouldSetLayout() local
61 assertThat(preference.getLayoutResource()).isEqualTo( in createNewPreference_shouldSetLayout()
67 final ImportancePreference preference = new ImportancePreference(mContext); in onBindViewHolder_nonConfigurable() local
73 preference.selectedBackground = selected; in onBindViewHolder_nonConfigurable()
74 preference.unselectedBackground = unselected; in onBindViewHolder_nonConfigurable()
76 preference.setConfigurable(false); in onBindViewHolder_nonConfigurable()
77 preference.setImportance(IMPORTANCE_DEFAULT); in onBindViewHolder_nonConfigurable()
78 preference.onBindViewHolder(holder); in onBindViewHolder_nonConfigurable()
88 preference.setImportance(IMPORTANCE_LOW); in onBindViewHolder_nonConfigurable()
[all …]
DConversationPriorityPreferenceTest.java34 import androidx.preference.PreferenceViewHolder;
57 final ConversationPriorityPreference preference = in createNewPreference_shouldSetLayout() local
59 assertThat(preference.getLayoutResource()).isEqualTo( in createNewPreference_shouldSetLayout()
65 final ConversationPriorityPreference preference = in onBindViewHolder_nonConfigurable() local
69 inflater.inflate(preference.getLayoutResource(), null)); in onBindViewHolder_nonConfigurable()
71 preference.setConfigurable(false); in onBindViewHolder_nonConfigurable()
72 preference.setImportance(IMPORTANCE_DEFAULT); in onBindViewHolder_nonConfigurable()
73 preference.setPriorityConversation(true); in onBindViewHolder_nonConfigurable()
74 preference.onBindViewHolder(holder); in onBindViewHolder_nonConfigurable()
83 final ConversationPriorityPreference preference = in onBindViewHolder_selectButtonAndText() local
[all …]
/packages/apps/EmergencyInfo/tests/unit/src/com/android/emergency/preferences/
DEmergencyListPreferenceTest.java26 import androidx.preference.PreferenceManager;
62 EmergencyListPreference preference = in testSummary_organDonor() local
64 String summary = (String) preference.getSummary(); in testSummary_organDonor()
74 EmergencyListPreference preference = in testSummary_bloodType() local
76 String summary = preference.getSummary().toString(); in testSummary_bloodType()
86 EmergencyListPreference preference = in testTitle_organDonor() local
88 String title = (String) preference.getTitle(); in testTitle_organDonor()
97 EmergencyListPreference preference = in testTitle_bloodType() local
99 String title = preference.getTitle().toString(); in testTitle_bloodType()
108 EmergencyListPreference preference = in testProperties_organDonor() local
[all …]
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/ui/
DDefaultAppListChildFragment.java34 import androidx.preference.Preference;
35 import androidx.preference.PreferenceCategory;
36 import androidx.preference.PreferenceFragmentCompat;
37 import androidx.preference.PreferenceGroup;
38 import androidx.preference.PreferenceManager;
39 import androidx.preference.PreferenceScreen;
182 Preference preference = preferenceGroup.getPreference(i); in clearPreferences() local
184 preferenceGroup.removePreference(preference); in clearPreferences()
185 preference.setOrder(Preference.DEFAULT_ORDER); in clearPreferences()
186 oldPreferences.put(preference.getKey(), preference); in clearPreferences() local
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/users/
DAddUserWhenLockedPreferenceControllerTest.java28 import androidx.preference.PreferenceScreen;
72 final RestrictedSwitchPreference preference = mock(RestrictedSwitchPreference.class); in displayPref_NotAdmin_shouldNotDisplay() local
73 when(preference.getKey()).thenReturn(mController.getPreferenceKey()); in displayPref_NotAdmin_shouldNotDisplay()
74 when(mScreen.findPreference(preference.getKey())).thenReturn(preference); in displayPref_NotAdmin_shouldNotDisplay()
78 verify(preference).setVisible(false); in displayPref_NotAdmin_shouldNotDisplay()
84 final RestrictedSwitchPreference preference = mock(RestrictedSwitchPreference.class); in updateState_NotAdmin_shouldNotDisplayPreference() local
86 mController.updateState(preference); in updateState_NotAdmin_shouldNotDisplayPreference()
88 verify(preference).setVisible(false); in updateState_NotAdmin_shouldNotDisplayPreference()
98 final RestrictedSwitchPreference preference = mock(RestrictedSwitchPreference.class); in updateState_Admin_shouldDisplayPreference() local
100 controller.updateState(preference); in updateState_Admin_shouldDisplayPreference()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/
DDashboardFeatureProviderImplTest.java64 import androidx.preference.Preference;
65 import androidx.preference.SwitchPreference;
171 final Preference preference = new Preference(mApplication); in bindPreference_shouldBindAllData() local
178 preference, tile, "123", Preference.DEFAULT_ORDER); in bindPreference_shouldBindAllData()
180 assertThat(preference.getTitle()).isEqualTo(mContext.getText(R.string.settings_label)); in bindPreference_shouldBindAllData()
181 assertThat(preference.getSummary()) in bindPreference_shouldBindAllData()
183 assertThat(preference.getIcon()).isNotNull(); in bindPreference_shouldBindAllData()
184 assertThat(preference.getFragment()).isEqualTo( in bindPreference_shouldBindAllData()
186 assertThat(preference.getOrder()).isEqualTo(tile.getOrder()); in bindPreference_shouldBindAllData()
191 final Preference preference = new SwitchPreference(mApplication); in bindPreference_shouldBindAllSwitchData() local
[all …]
/packages/apps/Settings/src/com/android/settings/accessibility/
DRestrictedPreferenceHelper.java94 RestrictedPreference preference = new AccessibilityServicePreference( in createAccessibilityServicePreferenceList() local
97 setRestrictedPreferenceEnabled(preference, permittedServices, serviceEnabled); in createAccessibilityServicePreferenceList()
98 preferenceList.add(preference); in createAccessibilityServicePreferenceList()
128 AccessibilityActivityPreference preference = new AccessibilityActivityPreference( in createAccessibilityActivityPreferenceList() local
131 setRestrictedPreferenceEnabled(preference, permittedServices, serviceEnabled); in createAccessibilityActivityPreferenceList()
132 preferenceList.add(preference); in createAccessibilityActivityPreferenceList()
152 private void setRestrictedPreferenceEnabled(RestrictedPreference preference, in setRestrictedPreferenceEnabled() argument
156 preference.getPackageName()); in setRestrictedPreferenceEnabled()
160 preference.checkEcmRestrictionAndSetDisabled( in setRestrictedPreferenceEnabled()
162 preference.getPackageName()); in setRestrictedPreferenceEnabled()
[all …]
/packages/apps/Settings/src/com/android/settings/fuelgauge/
DAllowBackgroundPreferenceController.java22 import androidx.preference.Preference;
44 private void setChecked(Preference preference, boolean checked) { in setChecked() argument
45 if (preference instanceof PrimarySwitchPreference) { in setChecked()
46 ((PrimarySwitchPreference) preference).setChecked(checked); in setChecked()
47 } else if (preference instanceof MainSwitchPreference) { in setChecked()
48 ((MainSwitchPreference) preference).setChecked(checked); in setChecked()
52 private void setEnabled(Preference preference, boolean enabled) { in setEnabled() argument
53 if (preference instanceof PrimarySwitchPreference) { in setEnabled()
54 ((PrimarySwitchPreference) preference).setEnabled(enabled); in setEnabled()
55 ((PrimarySwitchPreference) preference).setSwitchEnabled(enabled); in setEnabled()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/
DWifiWakeupPreferenceControllerTest.java33 import androidx.preference.SwitchPreference;
122 final SwitchPreference preference = new SwitchPreference(mContext); in updateState_wifiWakeupEnableScanningDisable_wifiWakeupDisabled() local
127 mController.updateState(preference); in updateState_wifiWakeupEnableScanningDisable_wifiWakeupDisabled()
129 assertThat(preference.isChecked()).isFalse(); in updateState_wifiWakeupEnableScanningDisable_wifiWakeupDisabled()
130 assertThat(preference.getSummary()) in updateState_wifiWakeupEnableScanningDisable_wifiWakeupDisabled()
136 final SwitchPreference preference = new SwitchPreference(mContext); in updateState_preferenceSetCheckedWhenWakeupSettingEnabled() local
141 mController.updateState(preference); in updateState_preferenceSetCheckedWhenWakeupSettingEnabled()
143 assertThat(preference.isChecked()).isTrue(); in updateState_preferenceSetCheckedWhenWakeupSettingEnabled()
144 assertThat(preference.getSummary()) in updateState_preferenceSetCheckedWhenWakeupSettingEnabled()
150 final SwitchPreference preference = new SwitchPreference(mContext); in updateState_preferenceSetUncheckedWhenWakeupSettingDisabled() local
[all …]
/packages/apps/Settings/src/com/android/settings/core/
DTogglePreferenceController.java18 import androidx.preference.Preference;
19 import androidx.preference.PreferenceScreen;
20 import androidx.preference.TwoStatePreference;
60 Preference preference = screen.findPreference(getPreferenceKey()); in displayPreference() local
61 if (preference instanceof MainSwitchPreference) { in displayPreference()
62 ((MainSwitchPreference) preference).addOnSwitchChangeListener((switchView, isChecked) -> in displayPreference()
68 public void updateState(Preference preference) { in updateState() argument
69 if (preference instanceof TwoStatePreference) { in updateState()
70 ((TwoStatePreference) preference).setChecked(isChecked()); in updateState()
71 } else if (preference instanceof PrimarySwitchPreference) { in updateState()
[all …]
/packages/apps/Dialer/java/com/android/voicemail/impl/configui/
DConfigOverrideFragment.java23 import android.preference.EditTextPreference;
24 import android.preference.Preference;
25 import android.preference.Preference.OnPreferenceChangeListener;
26 import android.preference.PreferenceFragment;
27 import android.preference.PreferenceManager;
28 import android.preference.PreferenceScreen;
29 import android.preference.SwitchPreference;
63 Preference preference = getPreferenceScreen().getPreference(i); in onCreate() local
64 preference.setOnPreferenceChangeListener(this); in onCreate()
65 updatePreference(preference); in onCreate()
[all …]
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/common/
DPreferenceUtilTest.java23 import androidx.preference.ListPreference;
24 import androidx.preference.Preference;
25 import androidx.preference.SwitchPreference;
26 import androidx.preference.TwoStatePreference;
38 Preference preference = new SwitchPreference(RuntimeEnvironment.application); in testCheckPreferenceType_true() local
39 assertThat(PreferenceUtil.checkPreferenceType(preference, SwitchPreference.class)).isTrue(); in testCheckPreferenceType_true()
44 Preference preference = new SwitchPreference(RuntimeEnvironment.application); in testCheckPreferenceType_superclass_true() local
46 PreferenceUtil.checkPreferenceType(preference, TwoStatePreference.class)).isTrue(); in testCheckPreferenceType_superclass_true()
51 Preference preference = new ListPreference(RuntimeEnvironment.application); in testCheckPreferenceType_false() local
53 PreferenceUtil.checkPreferenceType(preference, TwoStatePreference.class)).isFalse(); in testCheckPreferenceType_false()
[all …]
/packages/apps/Car/Settings/src/com/android/car/settings/common/
DExtraSettingsPreferenceController.java44 import androidx.preference.Preference;
45 import androidx.preference.PreferenceGroup;
121 Preference preference = getPreference().getPreference(i); in onApplyUxRestrictions() local
123 && !preference.getExtras().getBoolean(META_DATA_DISTRACTION_OPTIMIZED) in onApplyUxRestrictions()
127 preference.setEnabled(getAvailabilityStatus() != AVAILABLE_FOR_VIEWING); in onApplyUxRestrictions()
128 restrictPreference(preference, restricted); in onApplyUxRestrictions()
133 protected void updateState(PreferenceGroup preference) { in updateState() argument
135 preference.getIntent()); in updateState()
140 preference.setVisible(preference.getPreferenceCount() > 0); in updateState()
181 protected void getDynamicData(Preference preference, Bundle metaData) { in getDynamicData() argument
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/modes/
DZenModeOtherPreferenceControllerTest.java33 import androidx.preference.TwoStatePreference;
63 TwoStatePreference preference = mock(TwoStatePreference.class); in testUpdateState_alarms() local
74 controller.updateZenMode(preference, zenMode); in testUpdateState_alarms()
76 verify(preference).setChecked(true); in testUpdateState_alarms()
81 TwoStatePreference preference = mock(TwoStatePreference.class); in testOnPreferenceChange_alarms() local
92 controller.updateZenMode(preference, zenMode); in testOnPreferenceChange_alarms()
94 controller.onPreferenceChange(preference, true); in testOnPreferenceChange_alarms()
106 TwoStatePreference preference = mock(TwoStatePreference.class); in testUpdateState_media() local
117 controller.updateZenMode(preference, zenMode); in testUpdateState_media()
119 verify(preference).setChecked(true); in testUpdateState_media()
[all …]
/packages/apps/EmergencyInfo/src/com/android/emergency/edit/
DEditMedicalInfoFragment.java22 import androidx.preference.Preference;
23 import androidx.preference.PreferenceFragment;
54 Preference preference = findPreference(preferenceKey); in onCreatePreferences() local
55 preference.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() { in onCreatePreferences()
57 public boolean onPreferenceChange(Preference preference, Object value) { in onCreatePreferences()
63 preference.getContext(), in onCreatePreferences()
70 if (Preference.OnPreferenceChangeListener.class.isInstance(preference)) { in onCreatePreferences()
71 return ((Preference.OnPreferenceChangeListener) preference) in onCreatePreferences()
72 .onPreferenceChange(preference, value); in onCreatePreferences()
91 public void onDisplayPreferenceDialog(Preference preference) { in onDisplayPreferenceDialog() argument
[all …]
DEditInfoFragment.java29 import androidx.preference.Preference;
30 import androidx.preference.Preference.OnPreferenceChangeListener;
31 import androidx.preference.PreferenceFragment;
32 import androidx.preference.PreferenceGroup;
69 Preference preference = findPreference(preferenceKey); in onCreatePreferences() local
70 mMedicalInfoPreferences.put(preferenceKey, preference); in onCreatePreferences()
72 preference.setOnPreferenceChangeListener(new PreferenceChangeListener(getActivity())); in onCreatePreferences()
74 if (((ReloadablePreferenceInterface) preference).isNotSet()) { in onCreatePreferences()
75 getMedicalInfoParent().removePreference(preference); in onCreatePreferences()
86 addEmergencyContact.setOnPreferenceClickListener(preference -> { in onCreatePreferences()
[all …]
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/customization/
DPartnerPreferencesMerger.java23 import androidx.preference.Preference;
24 import androidx.preference.PreferenceGroup;
25 import androidx.preference.PreferenceScreen;
102 final Preference preference = preferenceGroup.getPreference(index); in clonePreferencesInPreferenceGroup() local
103 if (preference instanceof PreferenceGroup) { in clonePreferencesInPreferenceGroup()
105 clonePreferencesInPreferenceGroup((PreferenceGroup) preference); in clonePreferencesInPreferenceGroup()
111 ((PreferenceGroup) preference).removeAll(); in clonePreferencesInPreferenceGroup()
112 preferences.add(preference); in clonePreferencesInPreferenceGroup()
115 preferences.add(preference); in clonePreferencesInPreferenceGroup()
132 final Preference preference = findPreference(preferenceKey, tvSettingsPreferences); in addPreferences() local
[all …]
/packages/services/Telephony/src/com/android/phone/
DTimeConsumingPreferenceActivity.java7 import android.preference.Preference;
8 import android.preference.PreferenceActivity;
17 public void onStarted(Preference preference, boolean reading); in onStarted() argument
18 public void onFinished(Preference preference, boolean reading); in onFinished() argument
19 public void onError(Preference preference, int error); in onError() argument
20 public void onException(Preference preference, CommandException exception); in onException() argument
156 public void onStarted(Preference preference, boolean reading) { in onStarted() argument
158 Log.i(LOG_TAG, "onStarted, preference=" + preference.getKey() + ", reading=" + reading); in onStarted()
159 mBusyList.add(preference.getKey()); in onStarted()
172 public void onFinished(Preference preference, boolean reading) { in onFinished() argument
[all …]
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/sound/
DVolumeSettingsPreferenceControllerTest.java52 import androidx.preference.PreferenceGroup;
53 import androidx.preference.PreferenceManager;
54 import androidx.preference.PreferenceScreen;
282 SeekBarPreference preference = (SeekBarPreference) mPreferenceGroup.getPreference(0); in testRefreshUi_createdPreferenceHasMinMax() local
283 assertThat(preference.getMin()).isEqualTo(TEST_MIN_VOLUME); in testRefreshUi_createdPreferenceHasMinMax()
284 assertThat(preference.getValue()).isEqualTo(TEST_DEFAULT_VOLUME); in testRefreshUi_createdPreferenceHasMinMax()
285 assertThat(preference.getMax()).isEqualTo(TEST_MAX_VOLUME); in testRefreshUi_createdPreferenceHasMinMax()
292 SeekBarPreference preference = (SeekBarPreference) mPreferenceGroup.getPreference(0); in testOnPreferenceChange_noDynamicAudio_ringtonePlays() local
293 preference.getOnPreferenceChangeListener().onPreferenceChange(preference, TEST_NEW_VOLUME); in testOnPreferenceChange_noDynamicAudio_ringtonePlays()
307 SeekBarPreference preference = (SeekBarPreference) mPreferenceGroup.getPreference(0); in testOnPreferenceChange_dynamicAudio_playbackActive_ringtoneDoesNotPlay() local
[all …]
/packages/apps/Settings/src/com/android/settings/connecteddevice/
DPreviouslyConnectedDevicePreferenceController.java29 import androidx.preference.Preference;
30 import androidx.preference.PreferenceGroup;
31 import androidx.preference.PreferenceScreen;
138 public void onDeviceAdded(Preference preference) { in onDeviceAdded() argument
139 if (preference instanceof BluetoothDevicePreference) { in onDeviceAdded()
141 ((BluetoothDevicePreference) preference).getBluetoothDevice().getDevice(), in onDeviceAdded()
142 preference); in onDeviceAdded() local
144 mDockDevicesList.add(preference); in onDeviceAdded()
147 Log.d(TAG, "onDeviceAdded() " + preference.getTitle()); in onDeviceAdded()
152 private void addPreference(int index, Preference preference) { in addPreference() argument
[all …]
/packages/apps/Car/Settings/src/com/android/car/settings/bluetooth/
DBluetoothBondedDevicesPreferenceController.java30 import androidx.preference.PreferenceGroup;
153 public void updateToggleButtonState(BluetoothDevicePreference preference) { in updateToggleButtonState() argument
154 updateActionAvailability(preference); in updateToggleButtonState()
159 BluetoothDevicePreference preference = in updateActionAvailability() local
161 updateActionAvailability(preference); in updateActionAvailability()
165 private void updateActionAvailability(BluetoothDevicePreference preference) { in updateActionAvailability() argument
168 setButtonsCheckedAndListeners(preference); in updateActionAvailability()
170 updatePhoneActionItemAvailability(preference, /* isAvailable= */ false); in updateActionAvailability()
171 updateMediaActionItemAvailability(preference, /* isAvailable= */ false); in updateActionAvailability()
184 private void setButtonsCheckedAndListeners(BluetoothDevicePreference preference) { in setButtonsCheckedAndListeners() argument
[all …]
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/ui/specialappaccess/
DSpecialAppAccessListChildFragment.java30 import androidx.preference.Preference;
31 import androidx.preference.PreferenceFragmentCompat;
32 import androidx.preference.PreferenceManager;
33 import androidx.preference.PreferenceScreen;
92 Preference preference = preferenceScreen.getPreference(i); in onRoleListChanged() local
94 preferenceScreen.removePreference(preference); in onRoleListChanged()
95 preference.setOrder(Preference.DEFAULT_ORDER); in onRoleListChanged()
96 oldPreferences.put(preference.getKey(), preference); in onRoleListChanged() local
106 Preference preference; in onRoleListChanged() local
109 preference = rolePreference.asPreference(); in onRoleListChanged()
[all …]

12345678910>>...123