Home
last modified time | relevance | path

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

12345678910>>...36

/packages/apps/StorageManager/robotests/src/com/android/storagemanager/deletionhelper/
DAppDeletionPreferenceTest.java60 AppDeletionPreference preference = new AppDeletionPreference(mContext, app); in testPreferenceSummary() local
61 preference.updateSummary(); in testPreferenceSummary()
63 assertThat(preference.getPackageName()).isEqualTo(TEST_PACKAGE_NAME); in testPreferenceSummary()
64 assertThat(preference.getTitle()).isEqualTo(TEST_PACKAGE_LABEL); in testPreferenceSummary()
65 assertThat(preference.getSummary().toString()).isEqualTo("30 days ago"); in testPreferenceSummary()
66 assertThat(preference.getItemSize()).isEqualTo(KB_STRING); in testPreferenceSummary()
79 AppDeletionPreference preference = new AppDeletionPreference(mContext, app); in testTwoDayPreferenceSummary() local
80 preference.updateSummary(); in testTwoDayPreferenceSummary()
82 assertThat(preference.getPackageName()).isEqualTo(TEST_PACKAGE_NAME); in testTwoDayPreferenceSummary()
83 assertThat(preference.getTitle()).isEqualTo(TEST_PACKAGE_LABEL); in testTwoDayPreferenceSummary()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/widget/
DMasterSwitchPreferenceTest.java20 import android.support.v7.preference.Preference.OnPreferenceChangeListener;
21 import android.support.v7.preference.PreferenceViewHolder;
55 final MasterSwitchPreference preference = new MasterSwitchPreference(mContext); in createNewPreference_shouldSetLayout() local
57 assertThat(preference.getWidgetLayoutResource()) in createNewPreference_shouldSetLayout()
63 final MasterSwitchPreference preference = new MasterSwitchPreference(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 MasterSwitchPreference preference = new MasterSwitchPreference(mContext); in setSwitchEnabled_shouldUpdateButtonEnabledState() local
84 preference.onBindViewHolder(holder); in setSwitchEnabled_shouldUpdateButtonEnabledState()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/
DDashboardFeatureProviderImplTest.java28 import android.support.v7.preference.Preference;
97 final Preference preference = new Preference( in bindPreference_shouldBindAllData() local
107 preference, tile, "123", Preference.DEFAULT_ORDER); in bindPreference_shouldBindAllData()
109 assertThat(preference.getTitle()).isEqualTo(tile.title); in bindPreference_shouldBindAllData()
110 assertThat(preference.getSummary()).isEqualTo(tile.summary); in bindPreference_shouldBindAllData()
111 assertThat(preference.getIcon()).isNotNull(); in bindPreference_shouldBindAllData()
112 assertThat(preference.getFragment()) in bindPreference_shouldBindAllData()
114 assertThat(preference.getOrder()).isEqualTo(-tile.priority); in bindPreference_shouldBindAllData()
119 final Preference preference = new Preference( in bindPreference_noFragmentMetadata_shouldBindIntent() local
128 preference, tile, "123", Preference.DEFAULT_ORDER); in bindPreference_noFragmentMetadata_shouldBindIntent()
[all …]
/packages/apps/PackageInstaller/src/com/android/packageinstaller/permission/ui/wear/
DReviewPermissionsWearFragment.java26 import android.preference.Preference;
27 import android.preference.PreferenceCategory;
28 import android.preference.PreferenceFragment;
29 import android.preference.PreferenceGroup;
30 import android.preference.PreferenceScreen;
31 import android.preference.SwitchPreference;
32 import android.preference.TwoStatePreference;
149 final SwitchPreference preference; in loadPreferences() local
153 preference = (SwitchPreference) cachedPreference; in loadPreferences()
155 preference = new SwitchPreference(getActivity()); in loadPreferences()
[all …]
/packages/apps/PackageInstaller/src/com/android/packageinstaller/permission/ui/handheld/
DAppPermissionsFragment.java34 import android.preference.Preference;
35 import android.preference.Preference.OnPreferenceChangeListener;
36 import android.preference.Preference.OnPreferenceClickListener;
37 import android.preference.PreferenceScreen;
38 import android.preference.SwitchPreference;
215 RestrictedSwitchPreference preference = new RestrictedSwitchPreference(context); in loadPreferences() local
216 preference.setChecked(group.areRuntimePermissionsGranted()); in loadPreferences()
220 preference.setOnPreferenceClickListener((pref) -> { in loadPreferences()
225 preference.setSwitchOnClickListener(v -> { in loadPreferences()
227 onPreferenceChange(preference, switchView.isChecked()); in loadPreferences()
[all …]
/packages/apps/PackageInstaller/src/com/android/packageinstaller/permission/ui/
DReviewPermissionsActivity.java30 import android.preference.Preference;
31 import android.preference.PreferenceCategory;
32 import android.preference.PreferenceFragment;
33 import android.preference.PreferenceGroup;
34 import android.preference.PreferenceScreen;
35 import android.preference.SwitchPreference;
36 import android.preference.TwoStatePreference;
206 public boolean onPreferenceChange(Preference preference, Object newValue) { in onPreferenceChange() argument
210 if (preference instanceof SwitchPreference) { in onPreferenceChange()
211 SwitchPreference switchPreference = (SwitchPreference) preference; in onPreferenceChange()
[all …]
/packages/apps/Settings/src/com/android/settings/users/
DAppRestrictionsFragment.java39 import android.support.v14.preference.MultiSelectListPreference;
40 import android.support.v14.preference.SwitchPreference;
41 import android.support.v7.preference.ListPreference;
42 import android.support.v7.preference.Preference;
43 import android.support.v7.preference.Preference.OnPreferenceChangeListener;
44 import android.support.v7.preference.Preference.OnPreferenceClickListener;
45 import android.support.v7.preference.PreferenceGroup;
46 import android.support.v7.preference.PreferenceViewHolder;
523 public boolean onPreferenceChange(Preference preference, Object newValue) { in onPreferenceChange() argument
524 String key = preference.getKey(); in onPreferenceChange()
[all …]
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/system/development/
DDevelopmentFragment.java50 import android.support.v14.preference.SwitchPreference;
51 import android.support.v17.preference.LeanbackPreferenceFragment;
52 import android.support.v7.preference.ListPreference;
53 import android.support.v7.preference.Preference;
54 import android.support.v7.preference.PreferenceGroup;
55 import android.support.v7.preference.PreferenceScreen;
421 final Preference preference = findPreference(key); in removePreference() local
422 if (preference != null) { in removePreference()
423 getPreferenceScreen().removePreference(preference); in removePreference()
462 private boolean removePreferenceForProduction(Preference preference) { in removePreferenceForProduction() argument
[all …]
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/
DMainFragment.java38 import android.support.v17.preference.LeanbackPreferenceFragment;
39 import android.support.v7.preference.Preference;
40 import android.support.v7.preference.PreferenceGroup;
188 private void hideIfIntentUnhandled(Preference preference) { in hideIfIntentUnhandled() argument
189 if (preference == null) { in hideIfIntentUnhandled()
192 preference.setVisible(systemIntentIsHandled(getContext(), preference.getIntent()) != null); in hideIfIntentUnhandled()
257 Preference preference = findPreference(key); in updateAccounts() local
258 if (preference == null) { in updateAccounts()
259 preference = new Preference(themedContext); in updateAccounts()
261 preference.setTitle(authTitle != null ? authTitle : account.name); in updateAccounts()
[all …]
/packages/apps/Camera2/src/com/android/camera/settings/
DCameraSettingsActivity.java26 import android.preference.ListPreference;
27 import android.preference.Preference;
28 import android.preference.Preference.OnPreferenceClickListener;
29 import android.preference.PreferenceFragment;
30 import android.preference.PreferenceGroup;
31 import android.preference.PreferenceScreen;
197 public void fill(List<Size> sizes, ListPreference preference) { in onResume()
198 setEntriesForSelection(sizes, preference); in onResume()
223 public boolean onPreferenceClick(Preference preference) { in onResume()
322 private boolean recursiveDelete(PreferenceGroup group, Preference preference) { in recursiveDelete() argument
[all …]
/packages/apps/Settings/src/com/android/settings/print/
DPrintSettingsFragment.java40 import android.support.v7.preference.Preference;
41 import android.support.v7.preference.PreferenceCategory;
200 Preference preference = new Preference(context); in onLoadFinished() local
203 preference.setTitle(title); in onLoadFinished()
206 preference.setKey(componentName.flattenToString()); in onLoadFinished()
208 preference.setFragment(PrintServiceSettingsFragment.class.getName()); in onLoadFinished()
209 preference.setPersistent(false); in onLoadFinished()
212 preference.setSummary(getString(R.string.print_feature_state_on)); in onLoadFinished()
214 preference.setSummary(getString(R.string.print_feature_state_off)); in onLoadFinished()
219 preference.setIcon(drawable); in onLoadFinished()
[all …]
/packages/apps/Settings/src/com/android/settings/accounts/
DAccountPreferenceController.java33 import android.support.v7.preference.Preference;
34 import android.support.v7.preference.Preference.OnPreferenceClickListener;
35 import android.support.v7.preference.PreferenceGroup;
36 import android.support.v7.preference.PreferenceScreen;
229 public boolean onPreferenceClick(Preference preference) { in onPreferenceClick() argument
234 if (preference == profileData.addAccountPreference) { in onPreferenceClick()
241 if (preference == profileData.removeWorkProfilePreference) { in onPreferenceClick()
247 if (preference == profileData.managedProfilePreference) { in onPreferenceClick()
353 DimmableIconPreference preference = in newAddAccountPreference() local
355 preference.setTitle(R.string.add_account_label); in newAddAccountPreference()
[all …]
/packages/apps/Settings/src/com/android/settings/
DTrustAgentSettings.java29 import android.support.v14.preference.SwitchPreference;
30 import android.support.v7.preference.Preference;
31 import android.support.v7.preference.PreferenceGroup;
60 SwitchPreference preference; field in TrustAgentSettings.AgentInfo
117 final RestrictedSwitchPreference preference = in updateAgents() local
119 preference.useAdminDisabledSummary(true); in updateAgents()
120 agent.preference = preference; in updateAgents()
121 preference.setPersistent(false); in updateAgents()
122 preference.setTitle(agent.label); in updateAgents()
123 preference.setIcon(agent.icon); in updateAgents()
[all …]
DSettingsPreferenceFragment.java31 import android.support.v7.preference.Preference;
32 import android.support.v7.preference.PreferenceGroup;
33 import android.support.v7.preference.PreferenceGroupAdapter;
34 import android.support.v7.preference.PreferenceScreen;
35 import android.support.v7.preference.PreferenceViewHolder;
303 private void addPreferenceToTop(LayoutPreference preference) { in addPreferenceToTop() argument
304 preference.setOrder(ORDER_FIRST); in addPreferenceToTop()
306 getPreferenceScreen().addPreference(preference); in addPreferenceToTop()
423 final Preference preference = adapter.getItem(n); in findListPositionFromKey() local
424 final String preferenceKey = preference.getKey(); in findListPositionFromKey()
[all …]
/packages/services/Telephony/src/com/android/phone/
DTimeConsumingPreferenceActivity.java9 import android.preference.Preference;
10 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
150 public void onStarted(Preference preference, boolean reading) { in onStarted() argument
152 if (DBG) Log.d(LOG_TAG, "onStarted, preference=" + preference.getKey() in onStarted()
154 mBusyList.add(preference.getKey()); in onStarted()
167 public void onFinished(Preference preference, boolean reading) { in onFinished() argument
[all …]
/packages/apps/Settings/src/com/android/settings/bluetooth/
DDeviceListPreferenceFragment.java22 import android.support.v7.preference.Preference;
23 import android.support.v7.preference.PreferenceCategory;
24 import android.support.v7.preference.PreferenceGroup;
138 public boolean onPreferenceTreeClick(Preference preference) { in onPreferenceTreeClick() argument
139 if (KEY_BT_SCAN.equals(preference.getKey())) { in onPreferenceTreeClick()
144 if (preference instanceof BluetoothDevicePreference) { in onPreferenceTreeClick()
145 BluetoothDevicePreference btPreference = (BluetoothDevicePreference) preference; in onPreferenceTreeClick()
152 return super.onPreferenceTreeClick(preference); in onPreferenceTreeClick()
180 BluetoothDevicePreference preference = (BluetoothDevicePreference) getCachedPreference(key); in createDevicePreference() local
182 if (preference == null) { in createDevicePreference()
[all …]
/packages/apps/Settings/src/com/android/settings/development/
DDevelopmentSettings.java63 import android.support.v14.preference.SwitchPreference;
64 import android.support.v7.preference.ListPreference;
65 import android.support.v7.preference.Preference;
66 import android.support.v7.preference.Preference.OnPreferenceChangeListener;
67 import android.support.v7.preference.PreferenceGroup;
68 import android.support.v7.preference.PreferenceScreen;
585 for (Preference preference : tilePrefs) { in addDashboardCategoryPreferences()
586 screen.addPreference(preference); in addDashboardCategoryPreferences()
630 private boolean removePreferenceForProduction(Preference preference) { in removePreferenceForProduction() argument
632 removePreference(preference); in removePreferenceForProduction()
[all …]
/packages/apps/StorageManager/src/com/android/storagemanager/deletionhelper/
DAppDeletionPreferenceGroup.java21 import android.support.v7.preference.Preference;
22 import android.support.v7.preference.PreferenceScreen;
64 AppDeletionPreference preference = in onAppRebuild() local
66 if (preference == null) { in onAppRebuild()
67 preference = new AppDeletionPreference(getContext(), app); in onAppRebuild()
68 preference.setKey(packageName); in onAppRebuild()
69 preference.setOnPreferenceChangeListener(this); in onAppRebuild()
71 addThresholdDependentPreference(preference, isNoThreshold()); in onAppRebuild()
72 preference.setChecked(mBackend.isChecked(packageName)); in onAppRebuild()
73 preference.setOrder(i); in onAppRebuild()
[all …]
/packages/services/Telephony/sip/src/com/android/services/telephony/sip/
DSipEditor.java26 import android.preference.CheckBoxPreference;
27 import android.preference.EditTextPreference;
28 import android.preference.ListPreference;
29 import android.preference.Preference;
30 import android.preference.PreferenceActivity;
31 import android.preference.PreferenceGroup;
120 Preference preference; field in SipEditor.PreferenceKey
135 if (preference instanceof EditTextPreference) { in getValue()
136 return ((EditTextPreference) preference).getText(); in getValue()
137 } else if (preference instanceof ListPreference) { in getValue()
[all …]
/packages/apps/Settings/src/com/android/settings/accessibility/
DAccessibilitySettings.java33 import android.support.v14.preference.SwitchPreference;
35 import android.support.v7.preference.ListPreference;
36 import android.support.v7.preference.Preference;
37 import android.support.v7.preference.PreferenceCategory;
38 import android.support.v7.preference.PreferenceScreen;
258 public boolean onPreferenceChange(Preference preference, Object newValue) { in onPreferenceChange() argument
259 if (mSelectLongPressTimeoutPreference == preference) { in onPreferenceChange()
262 } else if (mToggleInversionPreference == preference) { in onPreferenceChange()
282 public boolean onPreferenceTreeClick(Preference preference) { in onPreferenceTreeClick() argument
283 if (mToggleHighTextContrastPreference == preference) { in onPreferenceTreeClick()
[all …]
/packages/apps/PackageInstaller/src/com/android/packageinstaller/permission/ui/television/
DManagePermissionsFragment.java25 import android.support.v7.preference.Preference;
26 import android.support.v7.preference.Preference.OnPreferenceClickListener;
27 import android.support.v7.preference.PreferenceScreen;
82 public boolean onPreferenceClick(Preference preference) { in onPreferenceClick() argument
83 String key = preference.getKey(); in onPreferenceClick()
135 Preference preference = findPreference(group.getName()); in updatePermissionsUi() local
136 if (preference == null && mExtraScreen != null) { in updatePermissionsUi()
137 preference = mExtraScreen.findPreference(group.getName()); in updatePermissionsUi()
139 if (preference == null) { in updatePermissionsUi()
140 preference = new Preference(context); in updatePermissionsUi()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/accounts/
DAddUserWhenLockedPreferenceControllerTest.java22 import android.support.v7.preference.Preference;
23 import android.support.v7.preference.PreferenceScreen;
72 final RestrictedSwitchPreference preference = mock(RestrictedSwitchPreference.class); in displayPref_NotAdmin_shouldNotDisplay() local
74 when(mScreen.getPreference(0)).thenReturn(preference); in displayPref_NotAdmin_shouldNotDisplay()
75 when(preference.getKey()).thenReturn(mController.getPreferenceKey()); in displayPref_NotAdmin_shouldNotDisplay()
84 final RestrictedSwitchPreference preference = mock(RestrictedSwitchPreference.class); in updateState_preferenceSetCheckedWhenSettingIsOn() local
87 mController.updateState(preference); in updateState_preferenceSetCheckedWhenSettingIsOn()
89 verify(preference).setChecked(true); in updateState_preferenceSetCheckedWhenSettingIsOn()
94 final RestrictedSwitchPreference preference = mock(RestrictedSwitchPreference.class); in updateState_preferenceSetUncheckedWhenSettingIsOff() local
97 mController.updateState(preference); in updateState_preferenceSetUncheckedWhenSettingIsOff()
[all …]
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/users/
DAppRestrictionsFragment.java43 import android.support.v14.preference.MultiSelectListPreference;
44 import android.support.v14.preference.SwitchPreference;
45 import android.support.v17.preference.LeanbackPreferenceFragment;
47 import android.support.v7.preference.ListPreference;
48 import android.support.v7.preference.Preference;
49 import android.support.v7.preference.PreferenceGroup;
50 import android.support.v7.preference.PreferenceScreen;
51 import android.support.v7.preference.PreferenceViewHolder;
552 public boolean onPreferenceTreeClick(Preference preference) { in onPreferenceTreeClick() argument
553 if (preference instanceof AppRestrictionsPreference) { in onPreferenceTreeClick()
[all …]
/packages/apps/Settings/src/com/android/settings/applications/
DManageDomainUrls.java26 import android.support.v14.preference.SwitchPreference;
27 import android.support.v7.preference.Preference;
28 import android.support.v7.preference.Preference.OnPreferenceChangeListener;
29 import android.support.v7.preference.Preference.OnPreferenceClickListener;
30 import android.support.v7.preference.PreferenceCategory;
31 import android.support.v7.preference.PreferenceGroup;
32 import android.support.v7.preference.PreferenceViewHolder;
162 public boolean onPreferenceChange(Preference preference, Object newValue) { in onPreferenceChange() argument
163 if (preference == mWebAction) { in onPreferenceChange()
187 DomainAppPreference preference = (DomainAppPreference) getCachedPreference(key); in rebuildAppList() local
[all …]
/packages/apps/Settings/src/com/android/settings/dashboard/
DProgressiveDisclosureMixin.java22 import android.support.v14.preference.PreferenceFragment;
23 import android.support.v7.preference.Preference;
24 import android.support.v7.preference.PreferenceGroup;
25 import android.support.v7.preference.PreferenceScreen;
82 public boolean onPreferenceClick(Preference preference) { in onPreferenceClick() argument
83 if (preference instanceof ExpandPreference) { in onPreferenceClick()
86 screen.removePreference(preference); in onPreferenceClick()
139 final Preference preference = screen.getPreference(i); in collapse() local
140 addToCollapsedList(preference); in collapse()
141 screen.removePreference(preference); in collapse()
[all …]

12345678910>>...36