/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/ |
D | ExternalSourcesDetailsTest.java | 68 private RestrictedSwitchPreference mSwitchPref; field in ExternalSourcesDetailsTest 84 ReflectionHelpers.setField(mFragment, "mSwitchPref", mSwitchPref); in setUp() 152 assertThat(mSwitchPref.isDisabledByAdmin()).isFalse(); in refreshUi_hasApplicationInfo_shouldReturnTrue() 164 ReflectionHelpers.setField(fragment, "mSwitchPref", mSwitchPref); in refreshUi_userRestrictionsUnknownSources_disablesSwitchPreference() 168 ReflectionHelpers.setField(mSwitchPref, "mHelper", mHelper); in refreshUi_userRestrictionsUnknownSources_disablesSwitchPreference() 179 when(mSwitchPref.isDisabledByAdmin()).thenReturn(true); in refreshUi_userRestrictionsUnknownSources_disablesSwitchPreference() 181 }).when(mSwitchPref).checkRestrictionAndSetDisabled( in refreshUi_userRestrictionsUnknownSources_disablesSwitchPreference() 191 assertThat(mSwitchPref.isDisabledByAdmin()).isTrue(); in refreshUi_userRestrictionsUnknownSources_disablesSwitchPreference() 203 ReflectionHelpers.setField(fragment, "mSwitchPref", mSwitchPref); in refreshUi_userRestrictionsUnknownSourcesGlobally_disablesSwitchPreference() 207 ReflectionHelpers.setField(mSwitchPref, "mHelper", mHelper); in refreshUi_userRestrictionsUnknownSourcesGlobally_disablesSwitchPreference() [all …]
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/applications/appinfo/ |
D | ExternalSourcesDetails.java | 48 private RestrictedSwitchPreference mSwitchPref; field in ExternalSourcesDetails 61 mSwitchPref = (RestrictedSwitchPreference) findPreference(KEY_EXTERNAL_SOURCE_SWITCH); in onCreate() 62 mSwitchPref.setOnPreferenceChangeListener(this); in onCreate() 68 if (preference == mSwitchPref) { in onPreferenceChange() 115 mSwitchPref.setChecked(false); in refreshUi() 116 mSwitchPref.setSummary(R.string.disabled); in refreshUi() 117 mSwitchPref.setEnabled(false); in refreshUi() 120 mSwitchPref.checkRestrictionAndSetDisabled(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES); in refreshUi() 121 if (!mSwitchPref.isDisabledByAdmin()) { in refreshUi() 122 mSwitchPref.checkRestrictionAndSetDisabled( in refreshUi() [all …]
|
D | DrawOverlayDetails.java | 53 private SwitchPreference mSwitchPref; field in DrawOverlayDetails 71 mSwitchPref = findPreference(KEY_APP_OPS_SETTINGS_SWITCH); in onCreate() 74 mSwitchPref.setOnPreferenceChangeListener(this); in onCreate() 102 if (preference == mSwitchPref) { in onPreferenceChange() 143 mSwitchPref.setChecked(isAllowed); in refreshUi() 145 mSwitchPref.setEnabled(mOverlayState.permissionDeclared && mOverlayState.controlEnabled); in refreshUi()
|
D | WriteSettingsDetails.java | 56 private SwitchPreference mSwitchPref; field in WriteSettingsDetails 69 mSwitchPref = (SwitchPreference) findPreference(KEY_APP_OPS_SETTINGS_SWITCH); in onCreate() 71 mSwitchPref.setOnPreferenceChangeListener(this); in onCreate() 85 if (preference == mSwitchPref) { in onPreferenceChange() 126 mSwitchPref.setChecked(canWrite); in refreshUi() 128 mSwitchPref.setEnabled(mWriteSettingsState.permissionDeclared); in refreshUi()
|
/packages/apps/Settings/src/com/android/settings/applications/appinfo/ |
D | ExternalSourcesDetails.java | 51 private RestrictedSwitchPreference mSwitchPref; field in ExternalSourcesDetails 65 mSwitchPref = (RestrictedSwitchPreference) findPreference(KEY_EXTERNAL_SOURCE_SWITCH); in onCreate() 66 mSwitchPref.setOnPreferenceChangeListener(this); in onCreate() 72 if (preference == mSwitchPref) { in onPreferenceChange() 130 mSwitchPref.setChecked(false); in refreshUi() 131 mSwitchPref.setSummary(R.string.disabled); in refreshUi() 132 mSwitchPref.setEnabled(false); in refreshUi() 135 mSwitchPref.checkRestrictionAndSetDisabled(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES); in refreshUi() 136 if (!mSwitchPref.isDisabledByAdmin()) { in refreshUi() 137 mSwitchPref.checkRestrictionAndSetDisabled( in refreshUi() [all …]
|
D | DrawOverlayDetails.java | 53 private SwitchPreference mSwitchPref; field in DrawOverlayDetails 71 mSwitchPref = findPreference(KEY_APP_OPS_SETTINGS_SWITCH); in onCreate() 74 mSwitchPref.setOnPreferenceChangeListener(this); in onCreate() 102 if (preference == mSwitchPref) { in onPreferenceChange() 143 mSwitchPref.setChecked(isAllowed); in refreshUi() 145 mSwitchPref.setEnabled(mOverlayState.permissionDeclared && mOverlayState.controlEnabled); in refreshUi()
|
D | WriteSettingsDetails.java | 56 private SwitchPreference mSwitchPref; field in WriteSettingsDetails 69 mSwitchPref = (SwitchPreference) findPreference(KEY_APP_OPS_SETTINGS_SWITCH); in onCreate() 71 mSwitchPref.setOnPreferenceChangeListener(this); in onCreate() 85 if (preference == mSwitchPref) { in onPreferenceChange() 126 mSwitchPref.setChecked(canWrite); in refreshUi() 128 mSwitchPref.setEnabled(mWriteSettingsState.permissionDeclared); in refreshUi()
|
/packages/apps/Settings/src/com/android/settings/applications/ |
D | UsageAccessDetails.java | 52 private SwitchPreference mSwitchPref; field in UsageAccessDetails 68 mSwitchPref = (SwitchPreference) findPreference(KEY_APP_OPS_SETTINGS_SWITCH); in onCreate() 72 mSwitchPref.setTitle(R.string.permit_usage_access); in onCreate() 75 mSwitchPref.setOnPreferenceChangeListener(this); in onCreate() 89 if (preference == mSwitchPref) { in onPreferenceChange() 140 mSwitchPref.setChecked(hasAccess); in refreshUi() 141 mSwitchPref.setEnabled(mUsageState.permissionDeclared); in refreshUi() 151 mSwitchPref.setSummary( in refreshUi()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/applications/ |
D | UsageAccessDetails.java | 52 private SwitchPreference mSwitchPref; field in UsageAccessDetails 68 mSwitchPref = (SwitchPreference) findPreference(KEY_APP_OPS_SETTINGS_SWITCH); in onCreate() 72 mSwitchPref.setTitle(R.string.permit_usage_access); in onCreate() 75 mSwitchPref.setOnPreferenceChangeListener(this); in onCreate() 89 if (preference == mSwitchPref) { in onPreferenceChange() 140 mSwitchPref.setChecked(hasAccess); in refreshUi() 141 mSwitchPref.setEnabled(mUsageState.permissionDeclared); in refreshUi() 151 mSwitchPref.setSummary( in refreshUi()
|
/packages/apps/Settings/src/com/android/settings/wifi/ |
D | ChangeWifiStateDetails.java | 44 private SwitchPreference mSwitchPref; field in ChangeWifiStateDetails 56 mSwitchPref = (SwitchPreference) findPreference(KEY_APP_OPS_SETTINGS_SWITCH); in onCreate() 59 mSwitchPref.setTitle(R.string.change_wifi_state_app_detail_switch); in onCreate() 62 mSwitchPref.setOnPreferenceChangeListener(this); in onCreate() 77 if (preference == mSwitchPref) { in onPreferenceChange() 111 mSwitchPref.setChecked(canChange); in refreshUi() 113 mSwitchPref.setEnabled(mWifiSettingsState.permissionDeclared); in refreshUi()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/wifi/ |
D | ChangeWifiStateDetails.java | 44 private SwitchPreference mSwitchPref; field in ChangeWifiStateDetails 56 mSwitchPref = (SwitchPreference) findPreference(KEY_APP_OPS_SETTINGS_SWITCH); in onCreate() 59 mSwitchPref.setTitle(R.string.change_wifi_state_app_detail_switch); in onCreate() 62 mSwitchPref.setOnPreferenceChangeListener(this); in onCreate() 77 if (preference == mSwitchPref) { in onPreferenceChange() 111 mSwitchPref.setChecked(canChange); in refreshUi() 113 mSwitchPref.setEnabled(mWifiSettingsState.permissionDeclared); in refreshUi()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/applications/specialaccess/pictureinpicture/ |
D | PictureInPictureDetails.java | 44 private SwitchPreference mSwitchPref; field in PictureInPictureDetails 52 mSwitchPref = (SwitchPreference) findPreference(KEY_APP_OPS_SETTINGS_SWITCH); in onCreate() 55 mSwitchPref.setTitle(R.string.picture_in_picture_app_detail_switch); in onCreate() 58 mSwitchPref.setOnPreferenceChangeListener(this); in onCreate() 63 if (preference == mSwitchPref) { in onPreferenceChange() 76 mSwitchPref.setChecked(isAllowed); in refreshUi()
|
/packages/apps/Settings/src/com/android/settings/applications/specialaccess/pictureinpicture/ |
D | PictureInPictureDetails.java | 44 private SwitchPreference mSwitchPref; field in PictureInPictureDetails 52 mSwitchPref = (SwitchPreference) findPreference(KEY_APP_OPS_SETTINGS_SWITCH); in onCreate() 55 mSwitchPref.setTitle(R.string.picture_in_picture_app_detail_switch); in onCreate() 58 mSwitchPref.setOnPreferenceChangeListener(this); in onCreate() 63 if (preference == mSwitchPref) { in onPreferenceChange() 76 mSwitchPref.setChecked(isAllowed); in refreshUi()
|