Home
last modified time | relevance | path

Searched refs:switchPref (Results 1 – 14 of 14) sorted by relevance

/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/settings/
DTwoStatePreferenceHelper.java67 final SwitchPreference switchPref = new SwitchPreference(checkBox.getContext()); in addSwitchPreferenceBasedOnCheckBoxPreference() local
68 switchPref.setTitle(checkBox.getTitle()); in addSwitchPreferenceBasedOnCheckBoxPreference()
69 switchPref.setKey(checkBox.getKey()); in addSwitchPreferenceBasedOnCheckBoxPreference()
70 switchPref.setOrder(checkBox.getOrder()); in addSwitchPreferenceBasedOnCheckBoxPreference()
71 switchPref.setPersistent(checkBox.isPersistent()); in addSwitchPreferenceBasedOnCheckBoxPreference()
72 switchPref.setEnabled(checkBox.isEnabled()); in addSwitchPreferenceBasedOnCheckBoxPreference()
73 switchPref.setChecked(checkBox.isChecked()); in addSwitchPreferenceBasedOnCheckBoxPreference()
74 switchPref.setSummary(checkBox.getSummary()); in addSwitchPreferenceBasedOnCheckBoxPreference()
75 switchPref.setSummaryOn(checkBox.getSummaryOn()); in addSwitchPreferenceBasedOnCheckBoxPreference()
76 switchPref.setSummaryOff(checkBox.getSummaryOff()); in addSwitchPreferenceBasedOnCheckBoxPreference()
[all …]
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/apps/specialaccess/
DHighPower.java90 final TwoStatePreference switchPref = (SwitchPreference) preference; in bindPreference() local
91 switchPref.setTitle(entry.label); in bindPreference()
92 switchPref.setKey(entry.info.packageName); in bindPreference()
93 switchPref.setIcon(entry.icon); in bindPreference()
95 switchPref.setChecked(false); in bindPreference()
96 switchPref.setEnabled(false); in bindPreference()
98 switchPref.setEnabled(true); in bindPreference()
99 switchPref.setChecked(!(Boolean) entry.extraInfo); in bindPreference()
100 switchPref.setOnPreferenceChangeListener((pref, newValue) -> { in bindPreference()
111 updateSummary(switchPref); in bindPreference()
[all …]
DExternalSources.java79 final TwoStatePreference switchPref = (SwitchPreference) preference; in bindPreference() local
80 switchPref.setTitle(entry.label); in bindPreference()
81 switchPref.setKey(entry.info.packageName); in bindPreference()
82 switchPref.setIcon(entry.icon); in bindPreference()
83 switchPref.setOnPreferenceChangeListener((pref, newValue) -> { in bindPreference()
89 switchPref.setChecked(state.isAllowed()); in bindPreference()
90 switchPref.setSummary(getPreferenceSummary(entry)); in bindPreference()
91 switchPref.setEnabled(canChange(entry)); in bindPreference()
92 return switchPref; in bindPreference()
DWriteSettings.java72 final TwoStatePreference switchPref = (SwitchPreference) preference; in bindPreference() local
73 switchPref.setTitle(entry.label); in bindPreference()
74 switchPref.setKey(entry.info.packageName); in bindPreference()
75 switchPref.setIcon(entry.icon); in bindPreference()
76 switchPref.setOnPreferenceChangeListener((pref, newValue) -> { in bindPreference()
81 switchPref.setSummary(getPreferenceSummary(entry)); in bindPreference()
82 switchPref.setChecked(((PermissionState) entry.extraInfo).isAllowed()); in bindPreference()
84 return switchPref; in bindPreference()
DAppUsageAccess.java68 final TwoStatePreference switchPref = (SwitchPreference) preference; in bindPreference() local
69 switchPref.setTitle(entry.label); in bindPreference()
70 switchPref.setKey(entry.info.packageName); in bindPreference()
71 switchPref.setIcon(entry.icon); in bindPreference()
72 switchPref.setOnPreferenceChangeListener((pref, newValue) -> { in bindPreference()
77 switchPref.setSummary(getPreferenceSummary(entry)); in bindPreference()
78 switchPref.setChecked(((PermissionState) entry.extraInfo).isAllowed()); in bindPreference()
80 return switchPref; in bindPreference()
DSystemAlertWindow.java72 final TwoStatePreference switchPref = (SwitchPreference) preference; in bindPreference() local
73 switchPref.setTitle(entry.label); in bindPreference()
74 switchPref.setKey(entry.info.packageName); in bindPreference()
75 switchPref.setIcon(entry.icon); in bindPreference()
76 switchPref.setOnPreferenceChangeListener((pref, newValue) -> { in bindPreference()
81 switchPref.setSummary(getPreferenceSummary(entry)); in bindPreference()
82 switchPref.setChecked(((PermissionState) entry.extraInfo).isAllowed()); in bindPreference()
84 return switchPref; in bindPreference()
DPictureInPicture.java113 final TwoStatePreference switchPref = (SwitchPreference) preference; in bindPreference() local
114 switchPref.setTitle(entry.label); in bindPreference()
115 switchPref.setKey(entry.info.packageName); in bindPreference()
116 switchPref.setIcon(entry.icon); in bindPreference()
117 switchPref.setChecked((Boolean) entry.extraInfo); in bindPreference()
118 switchPref.setOnPreferenceChangeListener((pref, newValue) -> { in bindPreference()
125 switchPref.setSummary((Boolean) entry.extraInfo in bindPreference()
128 return switchPref; in bindPreference()
/packages/apps/Settings/tests/unit/src/com/android/settings/applications/
DAppOpsSettingsTest.java123 final UiObject2 switchPref = mUiDevice.wait(Until.findObject(switchSelector), in findAndVerifySwitchState() local
125 assertNotNull("Switch not shown", switchPref); in findAndVerifySwitchState()
126 assertTrue("Switch in invalid state", switchPref.isChecked() == checked); in findAndVerifySwitchState()
127 return switchPref; in findAndVerifySwitchState()
191 final UiObject2 switchPref = findAndVerifySwitchState(initialState); in testSwitchToggle() local
192 switchPref.click(); in testSwitchToggle()
/packages/apps/Settings/src/com/android/settings/inputmethod/
DKeyboardLayoutPickerController.java107 final SwitchPreference switchPref = (SwitchPreference) preference; in handlePreferenceTreeClick() local
108 final KeyboardLayout layout = mPreferenceMap.get(switchPref); in handlePreferenceTreeClick()
110 final boolean checked = switchPref.isChecked(); in handlePreferenceTreeClick()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/inputmethod/
DKeyboardLayoutPickerController.java107 final SwitchPreference switchPref = (SwitchPreference) preference; in handlePreferenceTreeClick() local
108 final KeyboardLayout layout = mPreferenceMap.get(switchPref); in handlePreferenceTreeClick()
110 final boolean checked = switchPref.isChecked(); in handlePreferenceTreeClick()
/packages/apps/Settings/src/com/android/settings/network/telephony/
DContactDiscoveryPreferenceController.java122 SwitchPreference switchPref = (SwitchPreference) preference; in registerUceObserver()
123 switchPref.setChecked(isChecked()); in registerUceObserver()
/packages/apps/PermissionController/src/com/android/packageinstaller/permission/ui/television/
DAppPermissionsFragment.java347 SwitchPreference switchPref = (SwitchPreference) preference; in setPreferencesCheckedState() local
348 AppPermissionGroup group = mAppPermissions.getPermissionGroup(switchPref.getKey()); in setPreferencesCheckedState()
350 switchPref.setChecked(group.areRuntimePermissionsGranted()); in setPreferencesCheckedState()
/packages/apps/Dialer/java/com/android/dialer/assisteddialing/ui/
DAssistedDialingSettingFragment.java74 SwitchPreference switchPref = in onCreate() local
86 switchPref.setOnPreferenceChangeListener(this::logIfUserDisabledFeature); in onCreate()
/packages/apps/Car/Settings/src/com/android/car/settings/inputmethod/
DKeyboardManagementPreferenceController.java194 switchPreference.setOnPreferenceChangeListener((switchPref, newValue) -> { in createSwitchPreference() argument