/packages/apps/StorageManager/robotests/src/com/android/storagemanager/utils/ |
D | PreferenceListCacheTest.java | 20 import androidx.preference.Preference; 53 setupMockPreferenceGroup(new Preference[0]); in testEmptyPreferenceGroup() 58 verify(mGroup, never()).removePreference(any(Preference.class)); in testEmptyPreferenceGroup() 63 Preference first = createPreference("first"); in testCacheAndRestoreAllPreferences() 64 Preference second = createPreference("second"); in testCacheAndRestoreAllPreferences() 65 Preference third = createPreference("third"); in testCacheAndRestoreAllPreferences() 66 Preference[] preferences = new Preference[] {first, second, third}; in testCacheAndRestoreAllPreferences() 75 verify(mGroup, never()).removePreference(any(Preference.class)); in testCacheAndRestoreAllPreferences() 80 Preference first = createPreference("first"); in testRestoreSomePreferences() 81 Preference second = createPreference("second"); in testRestoreSomePreferences() [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() 136 preference, tile, "123", Preference.DEFAULT_ORDER); in bindPreference_shouldBindAllData() 149 final Preference preference = new Preference(RuntimeEnvironment.application); in bindPreference_noFragmentMetadata_shouldBindIntent() 154 preference, tile, "123", Preference.DEFAULT_ORDER); in bindPreference_noFragmentMetadata_shouldBindIntent() 163 final Preference preference = new Preference(RuntimeEnvironment.application); in bindPreference_noFragmentMetadata_shouldBindToProfileSelector() 170 preference, tile, "123", Preference.DEFAULT_ORDER); in bindPreference_noFragmentMetadata_shouldBindToProfileSelector() 178 final Preference preference = new Preference(RuntimeEnvironment.application); in bindPreference_noFragmentMetadataSingleUser_shouldBindToDirectLaunchIntent() 187 preference, tile, "123", Preference.DEFAULT_ORDER); in bindPreference_noFragmentMetadataSingleUser_shouldBindToDirectLaunchIntent() 200 final Preference preference = new Preference(RuntimeEnvironment.application); in bindPreference_toInternalSettingActivity_shouldBindToDirectLaunchIntentAndNotLog() [all …]
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/applications/ |
D | AppStorageSizesController.java | 24 import androidx.preference.Preference; 33 private final Preference mTotalSize; 34 private final Preference mAppSize; 35 private final Preference mDataSize; 36 private final Preference mCacheSize; 50 private AppStorageSizesController(Preference total, Preference app, in AppStorageSizesController() 51 Preference data, Preference cache, @StringRes int computing, @StringRes int error) { in AppStorageSizesController() 137 private Preference mTotalSize; 138 private Preference mAppSize; 139 private Preference mDataSize; [all …]
|
/packages/apps/Settings/src/com/android/settings/applications/ |
D | AppStorageSizesController.java | 24 import androidx.preference.Preference; 33 private final Preference mTotalSize; 34 private final Preference mAppSize; 35 private final Preference mDataSize; 36 private final Preference mCacheSize; 50 private AppStorageSizesController(Preference total, Preference app, in AppStorageSizesController() 51 Preference data, Preference cache, @StringRes int computing, @StringRes int error) { in AppStorageSizesController() 137 private Preference mTotalSize; 138 private Preference mAppSize; 139 private Preference mDataSize; [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/language/ |
D | LanguageBasePreferenceControllerTest.java | 29 import androidx.preference.Preference; 128 assertThat(mController.onPreferenceClick(new Preference(mContext))).isFalse(); in testOnPreferenceClick_noLocale_returnsFalse() 134 Preference preference = new Preference(mContext); in testOnPreferenceClick_hasMultipleChildLocales_returnsTrue() 142 Preference preference = new Preference(mContext); in testOnPreferenceClick_hasMultipleChildLocales_localeNotUpdated() 151 Preference preference = new Preference(mContext); in testOnPreferenceClick_hasMultipleChildLocales_neverCallsGoBack() 160 Preference preference = new Preference(mContext); in testOnPreferenceClick_hasSingleChildLocale_returnsTrue() 168 Preference preference = new Preference(mContext); in testOnPreferenceClick_hasSingleChildLocale_localeUpdated() 177 Preference preference = new Preference(mContext); in testOnPreferenceClick_hasSingleChildLocale_callsGoBack() 186 Preference preference = new Preference(mContext); in testOnPreferenceClick_noChildLocale_returnsTrue() 194 Preference preference = new Preference(mContext); in testOnPreferenceClick_noChildLocale_localeUpdated() [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/common/ |
D | FakePreferenceController.java | 22 import androidx.preference.Preference; 30 public class FakePreferenceController extends PreferenceController<Preference> { 42 private Preference mUpdateStateArg; 44 private Preference mHandlePreferenceChangedPreferenceArg; 47 private Preference mHandlePreferenceClickedArg; 58 protected Class<Preference> getPreferenceType() { in getPreferenceType() 59 return Preference.class; in getPreferenceType() 136 protected void updateState(Preference preference) { in updateState() 141 Preference getUpdateStateArg() { in getUpdateStateArg() 150 protected boolean handlePreferenceChanged(Preference preference, Object newValue) { in handlePreferenceChanged() [all …]
|
D | ExtraSettingsLoaderTest.java | 32 import androidx.preference.Preference; 92 Map<Preference, Bundle> preferenceToBundleMap = mExtraSettingsLoader.loadPreferences( in testLoadPreference_stringResources_shouldLoadResources() 97 for (Preference p : preferenceToBundleMap.keySet()) { in testLoadPreference_stringResources_shouldLoadResources() 126 Map<Preference, Bundle> preferenceToBundleMap = mExtraSettingsLoader.loadPreferences( in testLoadPreference_metadataBundleIsValue() 131 for (Preference p : preferenceToBundleMap.keySet()) { in testLoadPreference_metadataBundleIsValue() 166 Map<Preference, Bundle> preferenceToBundleMap = mExtraSettingsLoader.loadPreferences( in testLoadPreference_integerResources_shouldLoadResources() 171 for (Preference p : preferenceToBundleMap.keySet()) { in testLoadPreference_integerResources_shouldLoadResources() 197 Map<Preference, Bundle> preferenceToBundleMap = mExtraSettingsLoader.loadPreferences( in testLoadPreference_noDefaultSummary() 200 for (Preference p : preferenceToBundleMap.keySet()) { in testLoadPreference_noDefaultSummary() 225 Map<Preference, Bundle> preferenceToBundleMap = mExtraSettingsLoader.loadPreferences( in testLoadPreference_noCategory_shouldSetToDeviceCategory() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/accounts/ |
D | AccountTypePreferenceLoaderTest.java | 33 import androidx.preference.Preference; 97 Preference pref1 = mock(Preference.class); in updatePreferenceIntents_shouldRunRecursively() 100 Preference pref3 = mock(Preference.class); in updatePreferenceIntents_shouldRunRecursively() 109 Preference pref21 = mock(Preference.class); in updatePreferenceIntents_shouldRunRecursively() 110 Preference pref22 = mock(Preference.class); in updatePreferenceIntents_shouldRunRecursively() 115 Preference pref42 = mock(Preference.class); in updatePreferenceIntents_shouldRunRecursively() 120 Preference pref411 = mock(Preference.class); in updatePreferenceIntents_shouldRunRecursively() 121 Preference pref412 = mock(Preference.class); in updatePreferenceIntents_shouldRunRecursively()
|
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/ |
D | MainFragmentTest.java | 36 import androidx.preference.Preference; 73 final Preference networkPref = mock(Preference.class); in testUpdateWifi_NoNetwork() 90 final Preference networkPref = mock(Preference.class); in testUpdateWifi_hasEthernet() 107 final Preference networkPref = mock(Preference.class); in testUpdateWifi_hasEthernetConnected() 124 final Preference networkPref = mock(Preference.class); in testUpdateWifi_wifiSignal() 173 final Preference networkPref = mock(Preference.class); in testUpdateWifi_notConnected() 190 final Preference networkPref = mock(Preference.class); in testUpdateWifi_cellSignal() 237 final Preference accountsPref = mock(Preference.class); in testUpdateAccountPref_hasOneAccount() 253 final Preference accountsPref = mock(Preference.class); in testUpdateAccountPref_hasNoAccount() 268 final Preference accountsPref = mock(Preference.class); in testUpdateAccountPref_hasMoreThanOneAccount() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/ |
D | MobileNetworkListControllerTest.java | 54 import androidx.preference.Preference; 74 private Preference mAddMorePreference; 85 mAddMorePreference = new Preference(mContext); in setUp() 130 final ArgumentCaptor<Preference> preferenceCaptor = ArgumentCaptor.forClass( in displayPreference_twoSubscriptions_correctlySetup() 131 Preference.class); in displayPreference_twoSubscriptions_correctlySetup() 133 final Preference pref1 = preferenceCaptor.getAllValues().get(0); in displayPreference_twoSubscriptions_correctlySetup() 134 final Preference pref2 = preferenceCaptor.getAllValues().get(1); in displayPreference_twoSubscriptions_correctlySetup() 164 final ArgumentCaptor<Preference> preferenceCaptor = ArgumentCaptor.forClass( in displayPreference_oneActiveESimOneInactivePSim_correctlySetup() 165 Preference.class); in displayPreference_oneActiveESimOneInactivePSim_correctlySetup() 167 final Preference pref1 = preferenceCaptor.getAllValues().get(0); in displayPreference_oneActiveESimOneInactivePSim_correctlySetup() [all …]
|
/packages/apps/Car/Settings/src/com/android/car/settings/security/ |
D | TrustedDeviceListPreferenceController.java | 30 import androidx.preference.Preference; 121 List<Preference> updatedList = createTrustDevicePreferenceList(); in updateState() 124 for (Preference trustedDevice : updatedList) { in updateState() 155 private boolean isEqual(PreferenceGroup preferenceGroup, List<Preference> trustedDeviceList) { in isEqual() 159 for (Preference p : trustedDeviceList) { in isEqual() 167 private List<Preference> createTrustDevicePreferenceList() { in createTrustDevicePreferenceList() 168 List<Preference> trustedDevicesList = new ArrayList<>(); in createTrustDevicePreferenceList() 179 private Preference createTrustedDevicePreference(String deviceName, long handle) { in createTrustedDevicePreference() 180 Preference preference = new Preference(getContext()); in createTrustedDevicePreference() 184 preference.setOnPreferenceClickListener((Preference pref) -> { in createTrustedDevicePreference() [all …]
|
/packages/apps/EmergencyInfo/src/com/android/emergency/edit/ |
D | EditInfoFragment.java | 26 import androidx.preference.Preference.OnPreferenceChangeListener; 28 import androidx.preference.Preference; 55 private final Map<String, Preference> mMedicalInfoPreferences = 56 new HashMap<String, Preference>(); 68 Preference preference = findPreference(preferenceKey); in onCreatePreferences() 85 Preference addEmergencyContact = findPreference(PreferenceKeys.KEY_ADD_EMERGENCY_CONTACT); in onCreatePreferences() 86 addEmergencyContact.setOnPreferenceClickListener(new Preference in onCreatePreferences() 89 public boolean onPreferenceClick(Preference preference) { in onCreatePreferences() 118 for (Preference preference : mMedicalInfoPreferences.values()) { in reloadFromPreference() 133 public void onDisplayPreferenceDialog(Preference preference) { in onDisplayPreferenceDialog() [all …]
|
/packages/apps/Car/Settings/src/com/android/car/settings/inputmethod/ |
D | EnabledKeyboardPreferenceController.java | 29 import androidx.preference.Preference; 50 private final Map<String, Preference> mPreferences = new ArrayMap<>(); 72 List<Preference> preferencesToDisplay = new ArrayList<>(); in updateState() 86 Preference preference = createPreference(inputMethodInfo); in updateState() 88 Preference displayedPreference = mPreferences.get(preference.getKey()); in updateState() 102 PreferenceGroup preferenceGroup, List<Preference> preferencesToDisplay, in updatePreferenceGroup() 105 (Preference a) -> a.getTitle().toString()) in updatePreferenceGroup() 106 .thenComparing((Preference a) -> a.getSummary().toString())); in updatePreferenceGroup() 114 Preference pref = preferencesToDisplay.get(i); in updatePreferenceGroup() 124 private Preference createPreference(InputMethodInfo inputMethodInfo) { in createPreference() [all …]
|
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/device/ |
D | DevicePrefFragmentTest.java | 37 import androidx.preference.Preference; 74 final Preference developerPref = mock(Preference.class); in testUpdateDeveloperOptions_developerDisabled() 88 final Preference developerPref = mock(Preference.class); in testUpdateDeveloperOptions_notAdmin() 100 final Preference developerPref = mock(Preference.class); in testUpdateDeveloperOptions_developerEnabled() 110 final Preference castPref = mock(Preference.class); in testUpdateCastSettings() 147 final Preference autofillPref = mock(Preference.class); in testUpdateAutofillSettings_noCandiate() 163 final Preference autofillPref = mock(Preference.class); in testUpdateAutofillSettings_selected() 187 final Preference autofillPref = mock(Preference.class); in testUpdateAutofillSettings_selectedNone()
|
/packages/apps/PermissionController/src/com/android/packageinstaller/role/ui/ |
D | DefaultAppListChildFragment.java | 33 import androidx.preference.Preference; 56 implements Preference.OnPreferenceClickListener { 108 ArrayMap<String, Preference> oldPreferences = new ArrayMap<>(); in onRoleListChanged() 110 ArrayMap<String, Preference> oldWorkPreferences = new ArrayMap<>(); in onRoleListChanged() 120 oldWorkPreferenceCategory.setOrder(Preference.DEFAULT_ORDER); in onRoleListChanged() 145 @NonNull ArrayMap<String, Preference> oldPreferences) { in clearPreferences() 147 Preference preference = preferenceGroup.getPreference(i); in clearPreferences() 150 preference.setOrder(Preference.DEFAULT_ORDER); in clearPreferences() 156 @NonNull List<RoleItem> roleItems, @NonNull ArrayMap<String, Preference> oldPreferences, in addPreferences() 157 @NonNull Preference.OnPreferenceClickListener listener, @NonNull UserHandle user, in addPreferences() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/deviceinfo/storage/ |
D | UserProfileControllerTest.java | 35 import androidx.preference.Preference; 79 final ArgumentCaptor<Preference> argumentCaptor = ArgumentCaptor.forClass(Preference.class); in controllerAddsPrimaryProfilePreference() 81 final Preference preference = argumentCaptor.getValue(); in controllerAddsPrimaryProfilePreference() 90 final ArgumentCaptor<Preference> argumentCaptor = ArgumentCaptor.forClass(Preference.class); in tappingProfilePreferenceSendsToStorageProfileFragment() 92 final Preference preference = argumentCaptor.getValue(); in tappingProfilePreferenceSendsToStorageProfileFragment() 117 final ArgumentCaptor<Preference> argumentCaptor = ArgumentCaptor.forClass(Preference.class); in acceptingResultUpdatesPreferenceSize() 119 final Preference preference = argumentCaptor.getValue(); in acceptingResultUpdatesPreferenceSize() 133 final ArgumentCaptor<Preference> argumentCaptor = ArgumentCaptor.forClass(Preference.class); in iconCallbackChangesPreferenceIcon() 135 final Preference preference = argumentCaptor.getValue(); in iconCallbackChangesPreferenceIcon()
|
D | SecondaryUserControllerTest.java | 34 import androidx.preference.Preference; 88 final ArgumentCaptor<Preference> argumentCaptor = ArgumentCaptor.forClass(Preference.class); in controllerAddsSecondaryUser() 90 final Preference preference = argumentCaptor.getValue(); in controllerAddsSecondaryUser() 99 final ArgumentCaptor<Preference> argumentCaptor = ArgumentCaptor.forClass(Preference.class); in controllerUpdatesSummaryOfNewPreference() 103 final Preference preference = argumentCaptor.getValue(); in controllerUpdatesSummaryOfNewPreference() 173 final ArgumentCaptor<Preference> argumentCaptor = ArgumentCaptor.forClass(Preference.class); in controllerUpdatesPreferenceOnAcceptingResult() 175 final Preference preference = argumentCaptor.getValue(); in controllerUpdatesPreferenceOnAcceptingResult() 211 final ArgumentCaptor<Preference> argumentCaptor = ArgumentCaptor.forClass(Preference.class); in iconCallbackChangesPreferenceIcon() 213 final Preference preference = argumentCaptor.getValue(); in iconCallbackChangesPreferenceIcon()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/ |
D | ZenModeButtonPreferenceControllerTest.java | 37 import androidx.preference.Preference; 62 private Preference mockPref; 96 final Preference mockPref = mock(Preference.class); in updateState_TotalSilence() 106 final Preference mockPref = mock(Preference.class); in updateState_AlarmsOnly() 116 final Preference mockPref = mock(Preference.class); in updateState_Priority() 126 final Preference mockPref = mock(Preference.class); in updateState_ZenOff() 135 final Preference mockPref = mock(Preference.class); in updateState_otherUserChangedZen()
|
/packages/apps/TvSettings/QuickSettings/src/com/android/tv/quicksettings/ |
D | QuickSettingsPreferenceFragment.java | 28 import androidx.preference.Preference; 34 SharedPreferences.OnSharedPreferenceChangeListener, Preference.OnPreferenceClickListener { 37 private Preference mBacklightPref; 38 private Preference mContrastPref; 39 private Preference mBrightnessPref; 40 private Preference mSharpnessPref; 41 private Preference mColorPref; 42 private Preference mTintPref; 78 final Preference resetPreference = findPreference("reset"); in onCreatePreferences() 141 public boolean onPreferenceClick(Preference preference) { in onPreferenceClick() [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/settings/ |
D | AccountsSettingsFragment.java | 31 import android.preference.Preference; 32 import android.preference.Preference.OnPreferenceClickListener; 69 private final Preference.OnPreferenceClickListener mSyncNowListener = 74 private final Preference.OnPreferenceClickListener mDeleteSyncDataListener = 80 private final Preference.OnPreferenceClickListener mEnableSyncClickListener = 91 private Preference mSyncNowPreference; 96 private Preference mClearSyncDataPreference; 101 private Preference mAccountSwitcher; 124 final Preference enableMetricsLogging = in onCreate() 192 public boolean onPreferenceClick(final Preference preference) { in enableSyncPreferences() [all …]
|
/packages/apps/Settings/src/com/android/settings/wifi/ |
D | WifiAPITest.java | 29 import androidx.preference.Preference; 40 Preference.OnPreferenceClickListener { 53 private Preference mWifiDisconnect; 54 private Preference mWifiDisableNetwork; 55 private Preference mWifiEnableNetwork; 77 mWifiDisconnect = (Preference) preferenceScreen.findPreference(KEY_DISCONNECT); in onCreatePreferences() 80 mWifiDisableNetwork = (Preference) preferenceScreen.findPreference(KEY_DISABLE_NETWORK); in onCreatePreferences() 83 mWifiEnableNetwork = (Preference) preferenceScreen.findPreference(KEY_ENABLE_NETWORK); in onCreatePreferences() 98 public boolean onPreferenceTreeClick(Preference preference) { in onPreferenceTreeClick() 106 public boolean onPreferenceClick(Preference pref) { in onPreferenceClick()
|
/packages/apps/PermissionController/src/com/android/packageinstaller/permission/ui/television/ |
D | AllAppPermissionsFragment.java | 39 import androidx.preference.Preference; 40 import androidx.preference.Preference.OnPreferenceChangeListener; 41 import androidx.preference.Preference.OnPreferenceClickListener; 131 ArrayList<Preference> prefs = new ArrayList<>(); // Used for sorting. in updateUi() 187 Collections.sort(prefs, new Comparator<Preference>() { in updateUi() 189 public int compare(Preference lhs, Preference rhs) { in updateUi() 217 ArrayList<Preference> prefs) { in findOrCreate() 230 private Preference getPreference(final PermissionInfo perm, final PermissionGroupInfo group) { in getPreference() 238 private Preference getMutablePreference(final PermissionInfo perm, PermissionGroupInfo group) { in getMutablePreference() 252 public boolean onPreferenceChange(Preference preference, Object value) { in getMutablePreference() [all …]
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/wifi/ |
D | WifiAPITest.java | 29 import androidx.preference.Preference; 40 Preference.OnPreferenceClickListener { 53 private Preference mWifiDisconnect; 54 private Preference mWifiDisableNetwork; 55 private Preference mWifiEnableNetwork; 77 mWifiDisconnect = (Preference) preferenceScreen.findPreference(KEY_DISCONNECT); in onCreatePreferences() 80 mWifiDisableNetwork = (Preference) preferenceScreen.findPreference(KEY_DISABLE_NETWORK); in onCreatePreferences() 83 mWifiEnableNetwork = (Preference) preferenceScreen.findPreference(KEY_ENABLE_NETWORK); in onCreatePreferences() 98 public boolean onPreferenceTreeClick(Preference preference) { in onPreferenceTreeClick() 106 public boolean onPreferenceClick(Preference pref) { in onPreferenceClick()
|
/packages/apps/Settings/src/com/android/settings/notification/ |
D | ZenCustomRuleConfigSettings.java | 25 import androidx.preference.Preference; 45 private Preference mCallsPreference; 46 private Preference mMessagesPreference; 47 private Preference mNotificationsPreference; 57 new Preference.OnPreferenceClickListener() { in onCreate() 59 public boolean onPreferenceClick(Preference preference) { in onCreate() 71 new Preference.OnPreferenceClickListener() { in onCreate() 73 public boolean onPreferenceClick(Preference preference) { in onCreate() 85 new Preference.OnPreferenceClickListener() { in onCreate() 87 public boolean onPreferenceClick(Preference preference) { in onCreate()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/notification/ |
D | ZenCustomRuleConfigSettings.java | 25 import androidx.preference.Preference; 45 private Preference mCallsPreference; 46 private Preference mMessagesPreference; 47 private Preference mNotificationsPreference; 57 new Preference.OnPreferenceClickListener() { in onCreate() 59 public boolean onPreferenceClick(Preference preference) { in onCreate() 71 new Preference.OnPreferenceClickListener() { in onCreate() 73 public boolean onPreferenceClick(Preference preference) { in onCreate() 85 new Preference.OnPreferenceClickListener() { in onCreate() 87 public boolean onPreferenceClick(Preference preference) { in onCreate()
|