/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/network/telephony/ |
D | EnabledNetworkModePreferenceController.java | 28 import androidx.preference.ListPreference; 29 import androidx.preference.Preference; 82 public void updateState(Preference preference) { in updateState() argument 83 super.updateState(preference); in updateState() 84 final ListPreference listPreference = (ListPreference) preference; in updateState() 91 public boolean onPreferenceChange(Preference preference, Object object) { in onPreferenceChange() argument 98 updatePreferenceValueAndSummary((ListPreference) preference, settingsMode); in onPreferenceChange() 124 private void updatePreferenceEntries(ListPreference preference) { in updatePreferenceEntries() argument 138 preference.setEntries( in updatePreferenceEntries() 140 preference.setEntryValues( in updatePreferenceEntries() [all …]
|
/packages/apps/Settings/src/com/android/settings/network/telephony/ |
D | EnabledNetworkModePreferenceController.java | 39 import androidx.preference.ListPreference; 40 import androidx.preference.Preference; 41 import androidx.preference.PreferenceScreen; 125 public void updateState(Preference preference) { in updateState() argument 126 super.updateState(preference); in updateState() 127 final ListPreference listPreference = (ListPreference) preference; in updateState() 134 public boolean onPreferenceChange(Preference preference, Object object) { in onPreferenceChange() argument 141 updatePreferenceValueAndSummary((ListPreference) preference, settingsMode); in onPreferenceChange() 174 private void updatePreferenceEntries(ListPreference preference) { in updatePreferenceEntries() argument 188 preference.setEntries( in updatePreferenceEntries() [all …]
|
/packages/apps/StorageManager/robotests/src/com/android/storagemanager/deletionhelper/ |
D | AppDeletionPreferenceTest.java | 57 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/PermissionController/src/com/android/packageinstaller/role/ui/ |
D | DefaultAppListChildFragment.java | 33 import androidx.preference.Preference; 34 import androidx.preference.PreferenceCategory; 35 import androidx.preference.PreferenceFragmentCompat; 36 import androidx.preference.PreferenceGroup; 37 import androidx.preference.PreferenceManager; 38 import androidx.preference.PreferenceScreen; 147 Preference preference = preferenceGroup.getPreference(i); in clearPreferences() local 149 preferenceGroup.removePreference(preference); in clearPreferences() 150 preference.setOrder(Preference.DEFAULT_ORDER); in clearPreferences() 151 oldPreferences.put(preference.getKey(), preference); in clearPreferences() local [all …]
|
D | SpecialAppAccessChildFragment.java | 32 import androidx.preference.Preference; 33 import androidx.preference.PreferenceFragmentCompat; 34 import androidx.preference.PreferenceManager; 35 import androidx.preference.PreferenceScreen; 36 import androidx.preference.TwoStatePreference; 124 Preference preference = preferenceScreen.getPreference(i); in onRoleChanged() local 126 preferenceScreen.removePreference(preference); in onRoleChanged() 127 preference.setOrder(Preference.DEFAULT_ORDER); in onRoleChanged() 128 oldPreferences.put(preference.getKey(), preference); in onRoleChanged() local 140 TwoStatePreference preference = (TwoStatePreference) oldPreferences.get(key); in onRoleChanged() local [all …]
|
D | SpecialAppAccessListChildFragment.java | 30 import androidx.preference.Preference; 31 import androidx.preference.PreferenceFragmentCompat; 32 import androidx.preference.PreferenceManager; 33 import androidx.preference.PreferenceScreen; 86 Preference preference = preferenceScreen.getPreference(i); in onRoleListChanged() local 88 preferenceScreen.removePreference(preference); in onRoleListChanged() 89 preference.setOrder(Preference.DEFAULT_ORDER); in onRoleListChanged() 90 oldPreferences.put(preference.getKey(), preference); in onRoleListChanged() local 99 TwoTargetPreference preference = (TwoTargetPreference) oldPreferences.get( in onRoleListChanged() local 101 if (preference == null) { in onRoleListChanged() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/development/gamedriver/ |
D | GameDriverAppPreferenceControllerTest.java | 36 import androidx.preference.ListPreference; 37 import androidx.preference.PreferenceCategory; 38 import androidx.preference.PreferenceGroup; 39 import androidx.preference.PreferenceManager; 40 import androidx.preference.PreferenceScreen; 172 final ListPreference preference = in createPreference_configDefault_shouldSetDefaultAttributes() local 175 assertThat(preference.getKey()).isEqualTo(TEST_PKG_NAME); in createPreference_configDefault_shouldSetDefaultAttributes() 176 assertThat(preference.getTitle()).isEqualTo(TEST_APP_NAME); in createPreference_configDefault_shouldSetDefaultAttributes() 177 assertThat(preference.getDialogTitle()).isEqualTo(mDialogTitle); in createPreference_configDefault_shouldSetDefaultAttributes() 178 assertThat(preference.getEntries()).isEqualTo(mValueList); in createPreference_configDefault_shouldSetDefaultAttributes() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/ |
D | ImportancePreferenceTest.java | 47 import androidx.preference.PreferenceViewHolder; 61 final ImportancePreference preference = new ImportancePreference(mContext); in createNewPreference_shouldSetLayout() local 62 assertThat(preference.getLayoutResource()).isEqualTo( in createNewPreference_shouldSetLayout() 68 final ImportancePreference preference = new ImportancePreference(mContext); in onBindViewHolder_nonConfigurable() local 74 preference.selectedBackground = selected; in onBindViewHolder_nonConfigurable() 75 preference.unselectedBackground = unselected; in onBindViewHolder_nonConfigurable() 77 preference.setConfigurable(false); in onBindViewHolder_nonConfigurable() 78 preference.setImportance(IMPORTANCE_DEFAULT); in onBindViewHolder_nonConfigurable() 79 preference.onBindViewHolder(holder); in onBindViewHolder_nonConfigurable() 89 preference.setImportance(IMPORTANCE_LOW); in onBindViewHolder_nonConfigurable() [all …]
|
D | NotificationAppPreferenceTest.java | 30 import androidx.preference.Preference; 31 import androidx.preference.PreferenceViewHolder; 54 final NotificationAppPreference preference = new NotificationAppPreference(mContext); in createNewPreference_shouldSetLayout() local 55 assertThat(preference.getWidgetLayoutResource()).isEqualTo( in createNewPreference_shouldSetLayout() 61 final NotificationAppPreference preference = new NotificationAppPreference(mContext); in setChecked_shouldUpdateButtonCheckedState() local 68 preference.onBindViewHolder(holder); in setChecked_shouldUpdateButtonCheckedState() 70 preference.setChecked(true); in setChecked_shouldUpdateButtonCheckedState() 73 preference.setChecked(false); in setChecked_shouldUpdateButtonCheckedState() 79 final NotificationAppPreference preference = new NotificationAppPreference(mContext); in setSwitchEnabled_shouldUpdateButtonEnabledState() local 86 preference.onBindViewHolder(holder); in setSwitchEnabled_shouldUpdateButtonEnabledState() [all …]
|
/packages/apps/EmergencyInfo/tests/unit/src/com/android/emergency/preferences/ |
D | EmergencyListPreferenceTest.java | 26 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/apps/Settings/tests/robotests/src/com/android/settings/widget/ |
D | MasterSwitchPreferenceTest.java | 30 import androidx.preference.Preference.OnPreferenceChangeListener; 31 import androidx.preference.PreferenceViewHolder; 54 final MasterSwitchPreference preference = new MasterSwitchPreference(mContext); in createNewPreference_shouldSetLayout() local 56 assertThat(preference.getWidgetLayoutResource()) in createNewPreference_shouldSetLayout() 62 final MasterSwitchPreference preference = new MasterSwitchPreference(mContext); in setChecked_shouldUpdateButtonCheckedState() local 67 preference.onBindViewHolder(holder); in setChecked_shouldUpdateButtonCheckedState() 69 preference.setChecked(true); in setChecked_shouldUpdateButtonCheckedState() 72 preference.setChecked(false); in setChecked_shouldUpdateButtonCheckedState() 78 final MasterSwitchPreference preference = new MasterSwitchPreference(mContext); in setSwitchEnabled_shouldUpdateButtonEnabledState() local 83 preference.onBindViewHolder(holder); in setSwitchEnabled_shouldUpdateButtonEnabledState() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/ |
D | DashboardFeatureProviderImplTest.java | 54 import androidx.preference.Preference; 129 final Preference preference = new Preference(RuntimeEnvironment.application); in bindPreference_shouldBindAllData() local 136 preference, tile, "123", Preference.DEFAULT_ORDER); in bindPreference_shouldBindAllData() 138 assertThat(preference.getTitle()).isEqualTo(mContext.getText(R.string.settings_label)); in bindPreference_shouldBindAllData() 139 assertThat(preference.getSummary()) in bindPreference_shouldBindAllData() 141 assertThat(preference.getIcon()).isNotNull(); in bindPreference_shouldBindAllData() 142 assertThat(preference.getFragment()).isEqualTo( in bindPreference_shouldBindAllData() 144 assertThat(preference.getOrder()).isEqualTo(tile.getOrder()); in bindPreference_shouldBindAllData() 149 final Preference preference = new Preference(RuntimeEnvironment.application); in bindPreference_noFragmentMetadata_shouldBindIntent() local 154 preference, tile, "123", Preference.DEFAULT_ORDER); in bindPreference_noFragmentMetadata_shouldBindIntent() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/users/ |
D | AddUserWhenLockedPreferenceControllerTest.java | 28 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/Car/Settings/tests/robotests/src/com/android/car/settings/language/ |
D | LanguageBasePreferenceControllerTest.java | 29 import androidx.preference.Preference; 30 import androidx.preference.PreferenceGroup; 134 Preference preference = new Preference(mContext); in testOnPreferenceClick_hasMultipleChildLocales_returnsTrue() local 135 LocaleUtil.setLocaleArgument(preference, localeInfo); in testOnPreferenceClick_hasMultipleChildLocales_returnsTrue() 136 assertThat(mController.onPreferenceClick(preference)).isTrue(); in testOnPreferenceClick_hasMultipleChildLocales_returnsTrue() 142 Preference preference = new Preference(mContext); in testOnPreferenceClick_hasMultipleChildLocales_localeNotUpdated() local 143 LocaleUtil.setLocaleArgument(preference, localeInfo); in testOnPreferenceClick_hasMultipleChildLocales_localeNotUpdated() 144 mController.onPreferenceClick(preference); in testOnPreferenceClick_hasMultipleChildLocales_localeNotUpdated() 151 Preference preference = new Preference(mContext); in testOnPreferenceClick_hasMultipleChildLocales_neverCallsGoBack() local 152 LocaleUtil.setLocaleArgument(preference, localeInfo); in testOnPreferenceClick_hasMultipleChildLocales_neverCallsGoBack() [all …]
|
/packages/apps/Dialer/java/com/android/voicemail/impl/configui/ |
D | ConfigOverrideFragment.java | 23 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/PermissionController/src/com/android/packageinstaller/permission/ui/wear/ |
D | ReviewPermissionsWearFragment.java | 31 import androidx.preference.Preference; 32 import androidx.preference.PreferenceCategory; 33 import androidx.preference.PreferenceFragmentCompat; 34 import androidx.preference.PreferenceGroup; 35 import androidx.preference.PreferenceScreen; 36 import androidx.preference.SwitchPreference; 37 import androidx.preference.TwoStatePreference; 143 final SwitchPreference preference; in loadPreferences() local 147 preference = (SwitchPreference) cachedPreference; in loadPreferences() 149 preference = new SwitchPreference(getActivity()); in loadPreferences() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/ |
D | WifiWakeupPreferenceControllerTest.java | 32 import androidx.preference.Preference; 33 import androidx.preference.SwitchPreference; 114 final SwitchPreference preference = new SwitchPreference(mContext); in updateState_preferenceSetCheckedWhenWakeupSettingEnabled() local 118 mController.updateState(preference); in updateState_preferenceSetCheckedWhenWakeupSettingEnabled() 120 assertThat(preference.isChecked()).isTrue(); in updateState_preferenceSetCheckedWhenWakeupSettingEnabled() 121 assertThat(preference.getSummary()) in updateState_preferenceSetCheckedWhenWakeupSettingEnabled() 127 final SwitchPreference preference = new SwitchPreference(mContext); in updateState_preferenceSetUncheckedWhenWakeupSettingDisabled() local 130 mController.updateState(preference); in updateState_preferenceSetUncheckedWhenWakeupSettingDisabled() 132 assertThat(preference.isChecked()).isFalse(); in updateState_preferenceSetUncheckedWhenWakeupSettingDisabled() 133 assertThat(preference.getSummary()) in updateState_preferenceSetUncheckedWhenWakeupSettingDisabled() [all …]
|
/packages/services/Telephony/src/com/android/phone/ |
D | TimeConsumingPreferenceActivity.java | 7 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/TvSettings/Settings/src/com/android/tv/settings/inputmethod/ |
D | KeyboardFragment.java | 30 import androidx.preference.ListPreference; 31 import androidx.preference.Preference; 32 import androidx.preference.PreferenceCategory; 33 import androidx.preference.PreferenceScreen; 92 (preference, newValue) -> { in onCreatePreferences() 163 Preference preference = preferenceScreen.findPreference(key); in updateKeyboardsSettings() local 164 if (preference == null) { in updateKeyboardsSettings() 165 preference = new Preference(preferenceContext); in updateKeyboardsSettings() 166 preference.setOrder(INPUT_METHOD_PREFERENCE_ORDER); in updateKeyboardsSettings() 167 preferenceScreen.addPreference(preference); in updateKeyboardsSettings() [all …]
|
/packages/apps/Car/libs/car-ui-lib/src/com/android/car/ui/preference/ |
D | PreferenceFragment.java | 17 package com.android.car.ui.preference; 30 import androidx.preference.DialogPreference; 31 import androidx.preference.DropDownPreference; 32 import androidx.preference.EditTextPreference; 33 import androidx.preference.ListPreference; 34 import androidx.preference.MultiSelectListPreference; 35 import androidx.preference.Preference; 36 import androidx.preference.PreferenceFragmentCompat; 37 import androidx.preference.PreferenceGroup; 38 import androidx.preference.PreferenceScreen; [all …]
|
/packages/apps/EmergencyInfo/src/com/android/emergency/edit/ |
D | EditMedicalInfoFragment.java | 22 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 …]
|
D | EditInfoFragment.java | 26 import androidx.preference.Preference.OnPreferenceChangeListener; 27 import androidx.preference.PreferenceFragment; 28 import androidx.preference.Preference; 29 import androidx.preference.PreferenceGroup; 68 Preference preference = findPreference(preferenceKey); in onCreatePreferences() local 69 mMedicalInfoPreferences.put(preferenceKey, preference); in onCreatePreferences() 71 preference.setOnPreferenceChangeListener(new PreferenceChangeListener(getActivity())); in onCreatePreferences() 73 if (((ReloadablePreferenceInterface) preference).isNotSet()) { in onCreatePreferences() 74 getMedicalInfoParent().removePreference(preference); in onCreatePreferences() 89 public boolean onPreferenceClick(Preference preference) { in onCreatePreferences() [all …]
|
/packages/apps/Settings/src/com/android/settings/print/ |
D | PrintSettingsFragment.java | 52 import androidx.preference.Preference; 53 import androidx.preference.PreferenceCategory; 196 AppPreference preference = new AppPreference(context); in onLoadFinished() local 199 preference.setTitle(title); in onLoadFinished() 202 preference.setKey(componentName.flattenToString()); in onLoadFinished() 204 preference.setFragment(PrintServiceSettingsFragment.class.getName()); in onLoadFinished() 205 preference.setPersistent(false); in onLoadFinished() 208 preference.setSummary(getString(R.string.print_feature_state_on)); in onLoadFinished() 210 preference.setSummary(getString(R.string.print_feature_state_off)); in onLoadFinished() 215 preference.setIcon(drawable); in onLoadFinished() [all …]
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/print/ |
D | PrintSettingsFragment.java | 52 import androidx.preference.Preference; 53 import androidx.preference.PreferenceCategory; 196 AppPreference preference = new AppPreference(context); in onLoadFinished() local 199 preference.setTitle(title); in onLoadFinished() 202 preference.setKey(componentName.flattenToString()); in onLoadFinished() 204 preference.setFragment(PrintServiceSettingsFragment.class.getName()); in onLoadFinished() 205 preference.setPersistent(false); in onLoadFinished() 208 preference.setSummary(getString(R.string.print_feature_state_on)); in onLoadFinished() 210 preference.setSummary(getString(R.string.print_feature_state_off)); in onLoadFinished() 215 preference.setIcon(drawable); in onLoadFinished() [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/common/ |
D | PreferenceUtilTest.java | 23 import androidx.preference.ListPreference; 24 import androidx.preference.Preference; 25 import androidx.preference.SwitchPreference; 26 import androidx.preference.TwoStatePreference; 39 Preference preference = new SwitchPreference(RuntimeEnvironment.application); in testCheckPreferenceType_true() local 40 assertThat(PreferenceUtil.checkPreferenceType(preference, SwitchPreference.class)).isTrue(); in testCheckPreferenceType_true() 45 Preference preference = new SwitchPreference(RuntimeEnvironment.application); in testCheckPreferenceType_superclass_true() local 47 PreferenceUtil.checkPreferenceType(preference, TwoStatePreference.class)).isTrue(); in testCheckPreferenceType_superclass_true() 52 Preference preference = new ListPreference(RuntimeEnvironment.application); in testCheckPreferenceType_false() local 54 PreferenceUtil.checkPreferenceType(preference, TwoStatePreference.class)).isFalse(); in testCheckPreferenceType_false() [all …]
|