Home
last modified time | relevance | path

Searched refs:Preference (Results 1 – 25 of 1379) sorted by relevance

12345678910>>...56

/packages/apps/StorageManager/robotests/src/com/android/storagemanager/utils/
DPreferenceListCacheTest.java20 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/
DDashboardFeatureProviderImplTest.java61 import androidx.preference.Preference;
156 final Preference preference = new Preference(RuntimeEnvironment.application); in bindPreference_shouldBindAllData()
163 MetricsEvent.SETTINGS_GESTURES, preference, tile, "123", Preference.DEFAULT_ORDER); in bindPreference_shouldBindAllData()
176 final Preference preference = new SwitchPreference(RuntimeEnvironment.application); in bindPreference_shouldBindAllSwitchData()
184 null /* key*/, Preference.DEFAULT_ORDER); in bindPreference_shouldBindAllSwitchData()
197 final Preference preference = new Preference(RuntimeEnvironment.application); in bindPreference_noFragmentMetadata_shouldBindIntent()
202 MetricsEvent.SETTINGS_GESTURES, preference, tile, "123", Preference.DEFAULT_ORDER); in bindPreference_noFragmentMetadata_shouldBindIntent()
211 final Preference preference = new Preference(RuntimeEnvironment.application); in bindPreference_noFragmentMetadata_shouldBindToProfileSelector()
218 MetricsEvent.SETTINGS_GESTURES, preference, tile, "123", Preference.DEFAULT_ORDER); in bindPreference_noFragmentMetadata_shouldBindToProfileSelector()
226 final Preference preference = new Preference(RuntimeEnvironment.application); in bindPreference_noFragmentMetadataSingleUser_shouldBindToDirectLaunchIntent()
[all …]
/packages/apps/Settings/src/com/android/settings/applications/
DAppStorageSizesController.java24 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/
DLanguageBasePreferenceControllerTest.java29 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/libs/car-ui-lib/car-ui-lib/src/main/java/com/android/car/ui/preference/
DPreferenceFragment.java35 import androidx.preference.Preference;
167 public void onDisplayPreferenceDialog(Preference preference) { in onDisplayPreferenceDialog()
237 Map<Preference, String> dependencies = new HashMap<>(); in setPreferenceScreen()
238 List<Preference> children = new ArrayList<>(); in setPreferenceScreen()
241 Deque<Preference> stack = new ArrayDeque<>(); in setPreferenceScreen()
245 Preference preference = stack.removeFirst(); in setPreferenceScreen()
257 for (Preference child : children) { in setPreferenceScreen()
258 Preference replacement = getReplacementFor(child); in setPreferenceScreen()
272 for (Map.Entry<Preference, String> entry : dependencies.entrySet()) { in setPreferenceScreen()
280 private static final List<Pair<Class<? extends Preference>, Class<? extends Preference>>>
[all …]
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/common/
DFakePreferenceController.java22 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 …]
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/common/
DFakePreferenceController.java22 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 …]
DExtraSettingsLoaderTest.java32 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/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/
DMainFragmentTest.java34 import androidx.preference.Preference;
65 final Preference networkPref = mock(Preference.class); in testUpdateConnectivity_NoNetwork()
82 final Preference networkPref = mock(Preference.class); in testUpdateConnectivity_hasEthernet()
99 final Preference networkPref = mock(Preference.class); in testUpdateConnectivity_hasEthernetConnected()
116 final Preference networkPref = mock(Preference.class); in testUpdateConnectivity_wifiSignal()
165 final Preference networkPref = mock(Preference.class); in testUpdateConnectivity_notConnected()
182 final Preference networkPref = mock(Preference.class); in testUpdateConnectivity_cellSignal()
229 final Preference accountsPref = mock(Preference.class); in testUpdateAccountPrefInfo_hasOneAccount()
245 final Preference accountsPref = mock(Preference.class); in testUpdateAccountPrefInfo_hasNoAccount()
260 final Preference accountsPref = mock(Preference.class); in testUpdateAccountPrefInfo_hasMoreThanOneAccount()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/accounts/
DAccountTypePreferenceLoaderTest.java33 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/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/ui/
DDefaultAppListChildFragment.java33 import androidx.preference.Preference;
58 implements Preference.OnPreferenceClickListener {
109 ArrayMap<String, Preference> oldPreferences = new ArrayMap<>(); in onRoleListChanged()
111 ArrayMap<String, Preference> oldWorkPreferences = new ArrayMap<>(); in onRoleListChanged()
121 oldWorkPreferenceCategory.setOrder(Preference.DEFAULT_ORDER); in onRoleListChanged()
146 @NonNull ArrayMap<String, Preference> oldPreferences) { in clearPreferences()
148 Preference preference = preferenceGroup.getPreference(i); in clearPreferences()
151 preference.setOrder(Preference.DEFAULT_ORDER); in clearPreferences()
157 @NonNull List<RoleItem> roleItems, @NonNull ArrayMap<String, Preference> oldPreferences, in addPreferences()
158 @NonNull Preference.OnPreferenceClickListener listener, @NonNull UserHandle user, in addPreferences()
[all …]
/packages/apps/EmergencyInfo/src/com/android/emergency/edit/
DEditInfoFragment.java26 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/TvSettings/Settings/src/com/android/tv/settings/privacy/
DPrivacyFragment.java29 import androidx.preference.Preference;
69 Preference assistantSlicePreference = findPreference(KEY_ASSISTANT); in onCreatePreferences()
70 Preference purchasesSlicePreference = findPreference(KEY_PURCHASES); in onCreatePreferences()
71 Preference adsPreference = findPreference(KEY_ADS); in onCreatePreferences()
72 final Preference securityPreference = findPreference(KEY_SECURITY); in onCreatePreferences()
73 final Preference overlaySecuritySlicePreference = findPreference(KEY_OVERLAY_SECURITY); in onCreatePreferences()
74 final Preference updateSlicePreference = findPreference(KEY_UPDATE); in onCreatePreferences()
129 @Nullable Preference overlaySecuritySlicePreference) { in isOverlaySecuritySlicePreferenceEnabled()
136 @Nullable Preference overlaySecuritySlicePreference, in showOverlaySecuritySlicePreference()
137 @Nullable Preference securityPreference) { in showOverlaySecuritySlicePreference()
[all …]
DSensorFragment.java28 import androidx.preference.Preference;
54 private List<Preference> mAllRecentAppPrefs;
118 Preference toggleInfo = new Preference(themedContext); in addSensorToggleWithInfo()
144 Preference pref = new Preference(themedContext); in addRecentAppsGroup()
158 Preference showAllRecent = new Preference(themedContext); in addRecentAppsGroup()
171 Preference banner = new Preference(themedContext); in addRecentAppsGroup()
182 Preference openPermissionController = new Preference(themedContext); in addPermissionControllerPreference()
198 public boolean onPreferenceTreeClick(Preference preference) { in onPreferenceTreeClick()
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/
DMobileNetworkListControllerTest.java43 import androidx.preference.Preference;
76 private Preference mAddMorePreference;
87 mAddMorePreference = new Preference(mContext); in setUp()
136 final ArgumentCaptor<Preference> preferenceCaptor = ArgumentCaptor.forClass( in displayPreference_twoSubscriptions_correctlySetup()
137 Preference.class); in displayPreference_twoSubscriptions_correctlySetup()
139 final Preference pref1 = preferenceCaptor.getAllValues().get(0); in displayPreference_twoSubscriptions_correctlySetup()
140 final Preference pref2 = preferenceCaptor.getAllValues().get(1); in displayPreference_twoSubscriptions_correctlySetup()
172 final ArgumentCaptor<Preference> preferenceCaptor = ArgumentCaptor.forClass( in displayPreference_oneActiveESimOneInactivePSim_correctlySetup()
173 Preference.class); in displayPreference_oneActiveESimOneInactivePSim_correctlySetup()
175 Preference pref1 = preferenceCaptor.getAllValues().get(0); in displayPreference_oneActiveESimOneInactivePSim_correctlySetup()
[all …]
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/device/
DDevicePrefFragmentTest.java37 import androidx.preference.Preference;
72 final Preference developerPref = mock(Preference.class); in testUpdateDeveloperOptions_developerDisabled()
86 final Preference developerPref = mock(Preference.class); in testUpdateDeveloperOptions_notAdmin()
98 final Preference developerPref = mock(Preference.class); in testUpdateDeveloperOptions_developerEnabled()
108 final Preference castPref = mock(Preference.class); in testUpdateCastSettings()
144 final Preference autofillPref = mock(Preference.class); in testUpdateAutofillSettings_noCandiate()
159 final Preference autofillPref = mock(Preference.class); in testUpdateAutofillSettings_selected()
182 final Preference autofillPref = mock(Preference.class); in testUpdateAutofillSettings_selectedNone()
/packages/apps/CellBroadcastReceiver/legacy/src/com/android/cellbroadcastreceiver/
DLegacyCellBroadcastContentProvider.java31 CellBroadcasts.Preference.ENABLE_CMAS_AMBER_PREF,
32 CellBroadcasts.Preference.ENABLE_AREA_UPDATE_INFO_PREF,
33 CellBroadcasts.Preference.ENABLE_TEST_ALERT_PREF,
34 CellBroadcasts.Preference.ENABLE_STATE_LOCAL_TEST_PREF,
35 CellBroadcasts.Preference.ENABLE_PUBLIC_SAFETY_PREF,
36 CellBroadcasts.Preference.ENABLE_CMAS_SEVERE_THREAT_PREF,
37 CellBroadcasts.Preference.ENABLE_CMAS_EXTREME_THREAT_PREF,
38 CellBroadcasts.Preference.ENABLE_CMAS_PRESIDENTIAL_PREF,
39 CellBroadcasts.Preference.ENABLE_EMERGENCY_PERF,
40 CellBroadcasts.Preference.ENABLE_ALERT_VIBRATION_PREF,
[all …]
/packages/apps/Car/Settings/src/com/android/car/settings/inputmethod/
DEnabledKeyboardPreferenceController.java30 import androidx.preference.Preference;
52 private final Map<String, Preference> mPreferences = new ArrayMap<>();
72 List<Preference> preferencesToDisplay = new ArrayList<>(); in updateState()
81 Preference preference = createPreference(inputMethodInfo); in updateState()
83 Preference displayedPreference = mPreferences.get(preference.getKey()); in updateState()
97 PreferenceGroup preferenceGroup, List<Preference> preferencesToDisplay, in updatePreferenceGroup()
100 (Preference a) -> a.getTitle().toString()) in updatePreferenceGroup()
101 .thenComparing((Preference a) -> a.getSummary().toString())); in updatePreferenceGroup()
109 Preference pref = preferencesToDisplay.get(i); in updatePreferenceGroup()
119 private Preference createPreference(InputMethodInfo inputMethodInfo) { in createPreference()
[all …]
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/apps/
DAppsFragment.java30 import androidx.preference.Preference;
70 final Preference permissionPreference = findPreference(KEY_PERMISSIONS); in onCreatePreferences()
79 final Preference securityPreference = findPreference(KEY_SECURITY); in onCreatePreferences()
80 final Preference overlaySecuritySlicePreference = findPreference(KEY_OVERLAY_SECURITY); in onCreatePreferences()
81 final Preference updateSlicePreference = findPreference(KEY_UPDATE); in onCreatePreferences()
103 @Nullable Preference overlaySecuritySlicePreference) { in isOverlaySecuritySlicePreferenceEnabled()
110 @Nullable Preference overlaySecuritySlicePreference, in showOverlaySecuritySlicePreference()
111 @Nullable Preference securityPreference) { in showOverlaySecuritySlicePreference()
121 @Nullable Preference securityPreference, in showSecurityPreference()
122 @Nullable Preference overlaySecuritySlicePreference) { in showSecurityPreference()
[all …]
/packages/apps/Traceur/src/com/android/traceur/
DMainFragment.java36 import androidx.preference.Preference;
100 mTracingOn.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { in onCreate()
102 public boolean onPreferenceClick(Preference preference) { in onCreate()
109 mTags.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() { in onCreate()
111 public boolean onPreferenceChange(Preference preference, Object newValue) { in onCreate()
131 new Preference.OnPreferenceClickListener() { in onCreate()
133 public boolean onPreferenceClick(Preference preference) { in onCreate()
144 new Preference.OnPreferenceClickListener() { in onCreate()
146 public boolean onPreferenceClick(Preference preference) { in onCreate()
153 new Preference.OnPreferenceClickListener() { in onCreate()
[all …]
/packages/apps/Settings/src/com/android/settings/wifi/
DWifiAPITest.java29 import androidx.preference.Preference;
39 Preference.OnPreferenceClickListener {
52 private Preference mWifiDisconnect;
53 private Preference mWifiDisableNetwork;
54 private Preference mWifiEnableNetwork;
76 mWifiDisconnect = (Preference) preferenceScreen.findPreference(KEY_DISCONNECT); in onCreatePreferences()
79 mWifiDisableNetwork = (Preference) preferenceScreen.findPreference(KEY_DISABLE_NETWORK); in onCreatePreferences()
82 mWifiEnableNetwork = (Preference) preferenceScreen.findPreference(KEY_ENABLE_NETWORK); in onCreatePreferences()
97 public boolean onPreferenceTreeClick(Preference preference) { in onPreferenceTreeClick()
105 public boolean onPreferenceClick(Preference pref) { in onPreferenceClick()
/packages/apps/Settings/src/com/android/settings/notification/zen/
DZenCustomRuleConfigSettings.java25 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/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/settings/
DAccountsSettingsFragment.java31 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/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/device/displaysound/
DAdvancedVolumeFragmentTest.java35 import androidx.preference.Preference;
73 Preference preference = fragment.findPreference(KEY_SURROUND_SOUND_AUTO); in testOnPreferenceChange_withAuto_storesAutoInSettings()
85 Preference preference = fragment.findPreference(KEY_SURROUND_SOUND_MANUAL); in testOnPreferenceChange_withManual_storesManualInSettings()
97 Preference preference = fragment.findPreference(KEY_SURROUND_SOUND_NONE); in testOnPreferenceChange_withNever_storesNeverInSettings()
118 Preference preference = fragment.findPreference(KEY_SURROUND_SOUND_MANUAL); in testOnPreferenceTreeClick_withFormatDisabled_disablesFormatInAudioManager()
146 Preference preference = fragment.findPreference(KEY_SURROUND_SOUND_MANUAL); in testOnPreferenceTreeClick_withFormatEnabled_enablesFormatInAudioManager()
171 Preference preference = fragment.findPreference(KEY_SURROUND_SOUND_MANUAL); in testGetPreferenceScreen_whenManual_returnsFormatsInCorrectPreferenceGroup()
176 Preference supportedFormatPreference = in testGetPreferenceScreen_whenManual_returnsFormatsInCorrectPreferenceGroup()
183 Preference unsupportedFormatPreference = in testGetPreferenceScreen_whenManual_returnsFormatsInCorrectPreferenceGroup()
200 Preference preference = fragment.findPreference(KEY_SURROUND_SOUND_AUTO); in testGetPreferenceScreen_whenAuto_showsFormatInfoPreference()
[all …]
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/television/
DAllAppPermissionsFragment.java39 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 …]

12345678910>>...56