Home
last modified time | relevance | path

Searched refs:Settings (Results 1 – 25 of 188) sorted by relevance

12345678

/cts/tests/tests/provider/src/android/provider/cts/
DSettingsTest.java43 import android.provider.Settings;
80 Settings.System._ID, Settings.System.NAME, Settings.System.VALUE in testSystemTable()
85 String name = Settings.System.NEXT_ALARM_FORMATTED; in testSystemTable()
92 cr.acquireContentProviderClient(Settings.System.CONTENT_URI); in testSystemTable()
98 value.put(Settings.System.NAME, name); in testSystemTable()
99 value.put(Settings.System.VALUE, insertValue); in testSystemTable()
101 provider.insert(Settings.System.CONTENT_URI, value); in testSystemTable()
102 cursor = provider.query(Settings.System.CONTENT_URI, SYSTEM_PROJECTION, in testSystemTable()
103 Settings.System.NAME + "=\"" + name + "\"", null, null, null); in testSystemTable()
114 value.put(Settings.System.NAME, name); in testSystemTable()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/helpers/
DSensorFeaturesDeactivator.java25 import android.provider.Settings;
95 super(Settings.ACTION_AIRPLANE_MODE_SETTINGS, R.string.snsr_setting_airplane_mode); in AirplaneModeSettingContainer()
103 return Settings.System in getSettingMode()
104 .getInt(contentResolver, Settings.System.AIRPLANE_MODE_ON, defaultValue); in getSettingMode()
106 return Settings.Global in getSettingMode()
107 .getInt(contentResolver, Settings.Global.AIRPLANE_MODE_ON, defaultValue); in getSettingMode()
121 super(Settings.ACTION_DISPLAY_SETTINGS, R.string.snsr_setting_screen_brightness_mode); in ScreenBrightnessModeSettingContainer()
126 return Settings.System.getInt( in getSettingMode()
128 Settings.System.SCREEN_BRIGHTNESS_MODE, in getSettingMode()
135 super(Settings.ACTION_DISPLAY_SETTINGS, R.string.snsr_setting_ambient_display); in AmbientDisplaySettingContainer()
[all …]
/cts/hostsidetests/backup/OtherSoundsSettingsApp/src/android/cts/backup/othersoundssettingsapp/
DOtherSoundsSettingsTest.java28 import android.provider.Settings;
82 Settings.System.getInt( in testOtherSoundsSettings_dialPadTones()
83 mContentResolver, Settings.System.DTMF_TONE_WHEN_DIALING, -1); in testOtherSoundsSettings_dialPadTones()
89 Settings.System.putInt( in testOtherSoundsSettings_dialPadTones()
90 mContentResolver, Settings.System.DTMF_TONE_WHEN_DIALING, in testOtherSoundsSettings_dialPadTones()
97 Settings.System.getInt( in testOtherSoundsSettings_dialPadTones()
98 mContentResolver, Settings.System.DTMF_TONE_WHEN_DIALING, -1); in testOtherSoundsSettings_dialPadTones()
115 Settings.System.getInt( in testOtherSoundsSettings_touchSounds()
116 mContentResolver, Settings.System.SOUND_EFFECTS_ENABLED, -1); in testOtherSoundsSettings_touchSounds()
122 Settings.System.putInt( in testOtherSoundsSettings_touchSounds()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DIntentFiltersTestHelper.java40 import android.provider.Settings;
70 new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS),
71 new Intent(Settings.ACTION_CAPTIONING_SETTINGS),
72 new Intent(Settings.ACTION_DATE_SETTINGS),
73 new Intent(Settings.ACTION_DEVICE_INFO_SETTINGS),
74 new Intent(Settings.ACTION_DISPLAY_SETTINGS),
75 new Intent(Settings.ACTION_LOCALE_SETTINGS),
76 new Intent(Settings.ACTION_PRIVACY_SETTINGS),
77 new Intent(Settings.ACTION_SETTINGS),
78 new Intent(Settings.ACTION_WIRELESS_SETTINGS),
[all …]
DUserRestrictions.java23 import android.provider.Settings;
117 Settings.ACTION_SETTINGS,
118 Settings.ACTION_SOUND_SETTINGS,
119 Settings.ACTION_APPLICATION_SETTINGS,
120 Settings.ACTION_SETTINGS,
121 Settings.ACTION_SECURITY_SETTINGS,
122 Settings.ACTION_WIRELESS_SETTINGS,
123 Settings.ACTION_WIRELESS_SETTINGS,
124 Settings.ACTION_WIFI_SETTINGS,
125 Settings.ACTION_DEVICE_INFO_SETTINGS,
[all …]
DEnterprisePrivacyTestListActivity.java26 import android.provider.Settings;
111 new Intent(Settings.ACTION_ENTERPRISE_PRIVACY_SETTINGS))}); in buildCommandTest()
129 new Intent(Settings.ACTION_ENTERPRISE_PRIVACY_SETTINGS))}); in buildAdminGrantedPermissionTest()
136 new ButtonInfo(R.string.go_button_text, new Intent(Settings.ACTION_SETTINGS)))); in addTestsToAdapter()
163 new Intent(Settings.ACTION_ENTERPRISE_PRIVACY_SETTINGS))})); in addTestsToAdapter()
181 new Intent(Settings.ACTION_ENTERPRISE_PRIVACY_SETTINGS)), in addTestsToAdapter()
193 new Intent(Settings.ACTION_ENTERPRISE_PRIVACY_SETTINGS)), in addTestsToAdapter()
205 new Intent(Settings.ACTION_ENTERPRISE_PRIVACY_SETTINGS)), in addTestsToAdapter()
222 new Intent(Settings.ACTION_ENTERPRISE_PRIVACY_SETTINGS)), in addTestsToAdapter()
235 new Intent(Settings.ACTION_ENTERPRISE_PRIVACY_SETTINGS)), in addTestsToAdapter()
[all …]
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DRingtoneSyncTest.java19 import static android.provider.Settings.Secure.SYNC_PARENT_SOUNDS;
25 import android.provider.Settings;
54 String defaultRingtone = Settings.System.getString(mContentResolver, in testRingtoneSync()
55 Settings.System.RINGTONE); in testRingtoneSync()
56 String defaultNotification = Settings.System.getString(mContentResolver, in testRingtoneSync()
57 Settings.System.NOTIFICATION_SOUND); in testRingtoneSync()
58 String defaultAlarm = Settings.System.getString(mContentResolver, in testRingtoneSync()
59 Settings.System.ALARM_ALERT); in testRingtoneSync()
79 Settings.Secure.putInt(mContentResolver, SYNC_PARENT_SOUNDS, 1); in testSoundDisableSync()
84 assertTrue(Settings.System.canWrite(mContext)); in testSoundDisableSync()
[all …]
DSettingsIntentsTest.java21 import android.provider.Settings;
45 new Intent(Settings.ACTION_SETTINGS), 0 /* flags */)); in testSettings()
50 new Intent(Settings.ACTION_SYNC_SETTINGS), 0 /* flags */)); in testAccounts()
55 new Intent(Settings.ACTION_APPLICATION_SETTINGS), 0 /* flags */)); in testApps()
61 new Intent(Settings.ACTION_SECURITY_SETTINGS), 0 /* flags */)); in testSecurity()
67 new Intent(Settings.ACTION_NFC_SETTINGS), 0 /* flags */)); in testNfc()
73 new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS), 0 /* flags */)); in testLocation()
/cts/tests/tests/widget/src/android/widget/cts/
DTextClockTest.java28 import android.provider.Settings;
70 mDefaultTime1224 = Settings.System.getString(mActivity.getContentResolver(), in setup()
71 Settings.System.TIME_12_24); in setup()
76 Settings.System.putString(mActivity.getContentResolver(), Settings.System.TIME_12_24, in teardown()
109 final CountDownLatch changeDefault = registerForChanges(Settings.System.TIME_12_24); in testUpdate12_24()
111 Settings.System.putString(resolver, Settings.System.TIME_12_24, null); in testUpdate12_24()
117 final CountDownLatch change12 = registerForChanges(Settings.System.TIME_12_24); in testUpdate12_24()
119 Settings.System.putInt(resolver, Settings.System.TIME_12_24, 12); in testUpdate12_24()
138 final CountDownLatch change24 = registerForChanges(Settings.System.TIME_12_24); in testUpdate12_24()
140 Settings.System.putInt(resolver, Settings.System.TIME_12_24, 24); in testUpdate12_24()
[all …]
/cts/tests/tests/display/src/android/display/cts/
DBrightnessTest.java38 import android.provider.Settings;
96 int previousBrightness = getSystemSetting(Settings.System.SCREEN_BRIGHTNESS); in testBrightnessSliderTracking()
98 getSystemSetting(Settings.System.SCREEN_BRIGHTNESS_MODE); in testBrightnessSliderTracking()
100 setSystemSetting(Settings.System.SCREEN_BRIGHTNESS_MODE, in testBrightnessSliderTracking()
101 Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC); in testBrightnessSliderTracking()
102 int mode = getSystemSetting(Settings.System.SCREEN_BRIGHTNESS_MODE); in testBrightnessSliderTracking()
103 assertEquals(Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC, mode); in testBrightnessSliderTracking()
110 setSystemSetting(Settings.System.SCREEN_BRIGHTNESS, 20); in testBrightnessSliderTracking()
114 setSystemSetting(Settings.System.SCREEN_BRIGHTNESS, 60); in testBrightnessSliderTracking()
123 setSystemSetting(Settings.System.SCREEN_BRIGHTNESS, 200); in testBrightnessSliderTracking()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DSetSystemSettingTest.java20 import android.provider.Settings;
22 import static android.provider.Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC;
33 Settings.System.SCREEN_BRIGHTNESS, testBrightness); in testSetBrightnessWithValue()
34 assertEquals(testBrightness, Settings.System.getStringForUser( in testSetBrightnessWithValue()
35 mContext.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, in testSetBrightnessWithValue()
40 final int mode = Settings.System.getInt(mContext.getContentResolver(), in testSetBrightness()
41 Settings.System.SCREEN_BRIGHTNESS_MODE, SCREEN_BRIGHTNESS_MODE_AUTOMATIC); in testSetBrightness()
45 Settings.System.SCREEN_BRIGHTNESS_MODE, "0"); in testSetBrightness()
50 Settings.System.SCREEN_BRIGHTNESS_MODE, in testSetBrightness()
62 Settings.System.TEXT_AUTO_REPLACE, "0"); in testSetSystemSettingsFailsForNonWhitelistedSettings()
/cts/suite/audio_quality/lib/src/
DSettings.cpp20 Settings* Settings::mInstance = NULL;
22 Settings* Settings::Instance() in Instance()
25 mInstance = new Settings(); in Instance()
30 void Settings::Finalize() in Finalize()
37 void Settings::addSetting(SettingType type, const android::String8& setting) in addSetting()
41 const android::String8& Settings::getSetting(SettingType type) in getSetting()
DReport.cpp62 Settings::Instance()->addSetting(Settings::EREPORT_FILE, report); in init()
110 Settings::Instance()->getSetting(Settings::EREPORT_TIME).string()); in writeReport()
113 printf(" %s", Settings::Instance()->getSetting(Settings::EDEVICE_INFO).string()); in writeReport()
116 Settings::Instance()->getSetting(Settings::ETEST_XML).string()); in writeReport()
/cts/suite/audio_quality/executable/src/
Dmain.cpp42 Settings::Instance()->getSetting(Settings::EREPORT_FILE).getPathDir(); in ~CleanupStatics()
50 Settings::Finalize(); in ~CleanupStatics()
94 if (Settings::Instance() == NULL) { in main()
100 Settings::Instance()->addSetting(Settings::EADB, strSerial); in main()
120 if (!client->init(Settings::Instance()->getSetting(Settings::EADB))) { in main()
130 Settings::Instance()->addSetting(Settings::EDEVICE_INFO, deviceInfo); in main()
138 Settings::Instance()->addSetting(Settings::ETEST_XML, xmlFile); in main()
/cts/tests/tests/systemintents/src/android/systemintents/cts/
DTestSystemIntents.java26 import android.provider.Settings;
67 new IntentEntry(0, new Intent(Settings.ACTION_SETTINGS)),
68 new IntentEntry(0, new Intent(Settings.ACTION_WEBVIEW_SETTINGS)),
69 new IntentEntry(0, new Intent(Settings.ACTION_APPLICATION_DEVELOPMENT_SETTINGS)),
70 new IntentEntry(0, new Intent(Settings.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS)),
71 new IntentEntry(0, new Intent(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS)
73 … new IntentEntry(0, new Intent(Settings.ACTION_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS)
75 new IntentEntry(0, new Intent(Settings.ACTION_HOME_SETTINGS)),
77 new Intent(Settings.ACTION_APN_SETTINGS)),
79 new Intent(Settings.ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS)),
[all …]
/cts/tests/tests/provider/src/android/provider/cts/contacts/
DContacts_SettingsTest.java20 import android.provider.Contacts.Settings;
37 Settings.setSetting(mContentResolver, "account", key1, value1); in testAccessSetting()
38 Settings.setSetting(mContentResolver, "account", key2, value2); in testAccessSetting()
39 assertEquals(value1, Settings.getSetting(mContentResolver, "account", key1)); in testAccessSetting()
40 assertEquals(value2, Settings.getSetting(mContentResolver, "account", key2)); in testAccessSetting()
41 assertNull(Settings.getSetting(mContentResolver, "account", "key not exist")); in testAccessSetting()
43 Settings.setSetting(mContentResolver, "account", key1, value2); in testAccessSetting()
44 assertEquals(value2, Settings.getSetting(mContentResolver, "account", key1)); in testAccessSetting()
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DAirplaneModeRestrictionTest.java19 import static android.provider.Settings.Global.AIRPLANE_MODE_ON;
26 import android.provider.Settings;
27 import android.provider.Settings.SettingNotFoundException;
68 Settings.Global.putInt(mContext.getContentResolver(), AIRPLANE_MODE_ON, 1); in testAirplaneModeTurnedOffWhenRestrictionSet()
72 assertEquals(0, Settings.Global.getInt( in testAirplaneModeTurnedOffWhenRestrictionSet()
73 mContext.getContentResolver(), Settings.Global.AIRPLANE_MODE_ON)); in testAirplaneModeTurnedOffWhenRestrictionSet()
83 Settings.Global.putInt(mContext.getContentResolver(), AIRPLANE_MODE_ON, 1); in testAirplaneModeCannotBeTurnedOnWithRestrictionOn()
84 assertEquals(0, Settings.Global.getInt( in testAirplaneModeCannotBeTurnedOnWithRestrictionOn()
89 Settings.Global.putInt(mContext.getContentResolver(), AIRPLANE_MODE_ON, 1); in testAirplaneModeCanBeTurnedOnWithRestrictionOff()
90 assertEquals(1, Settings.Global.getInt( in testAirplaneModeCanBeTurnedOnWithRestrictionOff()
DSetTimeTest.java23 import android.provider.Settings;
80 mDevicePolicyManager.setGlobalSetting(getWho(), Settings.Global.AUTO_TIME, "0"); in testSetTime()
86 mDevicePolicyManager.setGlobalSetting(getWho(), Settings.Global.AUTO_TIME, "1"); in testSetTimeFailWithAutoTimeOn()
122 mDevicePolicyManager.setGlobalSetting(getWho(), Settings.Global.AUTO_TIME_ZONE, "0"); in testSetTimeZone()
134 mDevicePolicyManager.setGlobalSetting(getWho(), Settings.Global.AUTO_TIME_ZONE, "1"); in testSetTimeZone()
139 mDevicePolicyManager.setGlobalSetting(getWho(), Settings.Global.AUTO_TIME_ZONE, "1"); in testSetTimeZoneFailWithAutoTimezoneOn()
149 mDevicePolicyManager.setGlobalSetting(getWho(), Settings.Global.AUTO_TIME, "0"); in restoreTime()
155 mDevicePolicyManager.setGlobalSetting(getWho(), Settings.Global.AUTO_TIME, "1"); in restoreTime()
/cts/tests/tests/bluetooth/src/android/bluetooth/cts/
DTestUtils.java26 import android.provider.Settings;
70 return Settings.Secure.getInt(context.getContentResolver(), in getLocationMode()
71 Settings.Secure.LOCATION_MODE, Settings.Secure.LOCATION_MODE_OFF); in getLocationMode()
78 Settings.Secure.putInt(context.getContentResolver(), Settings.Secure.LOCATION_MODE, in setLocationMode()
86 return getLocationMode(context) != Settings.Secure.LOCATION_MODE_OFF; in isLocationOn()
93 setLocationMode(context, Settings.Secure.LOCATION_MODE_SENSORS_ONLY); in enableLocation()
100 setLocationMode(context, Settings.Secure.LOCATION_MODE_OFF); in disableLocation()
/cts/tests/tests/voicesettings/src/android/voicesettings/cts/
DAirplaneModeTest.java19 import static android.provider.Settings.ACTION_VOICE_CONTROL_AIRPLANE_MODE;
23 import android.provider.Settings;
60 } catch (Settings.SettingNotFoundException e) { in testAll()
90 Settings.Global.getUriFor(Settings.Global.AIRPLANE_MODE_ON), in runTest()
104 private int getMode() throws Settings.SettingNotFoundException { in getMode()
105 return Settings.Global.getInt(mContext.getContentResolver(), in getMode()
106 Settings.Global.AIRPLANE_MODE_ON); in getMode()
DZenModeTest.java19 import static android.provider.Settings.ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE;
20 import static android.provider.Settings.EXTRA_DO_NOT_DISTURB_MODE_ENABLED;
21 import static android.provider.Settings.EXTRA_DO_NOT_DISTURB_MODE_MINUTES;
25 import android.provider.Settings;
64 } catch (Settings.SettingNotFoundException e) { in testAll()
93 Settings.Global.getUriFor(ZEN_MODE), VOICE_SETTINGS_PACKAGE, in runTest()
115 private int getMode() throws Settings.SettingNotFoundException { in getMode()
116 return Settings.Global.getInt(mContext.getContentResolver(), ZEN_MODE); in getMode()
/cts/tests/tests/permission2/src/android/permission2/cts/
DNoWriteSecureSettingsPermissionTest.java21 import android.provider.Settings;
38 values.put(Settings.Secure.NAME, Settings.Secure.ACCESSIBILITY_ENABLED); in testWriteSecureSettings()
39 values.put(Settings.Secure.VALUE, Boolean.TRUE); in testWriteSecureSettings()
40 getContext().getContentResolver().insert(Settings.Secure.CONTENT_URI, values); in testWriteSecureSettings()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/
DGyroscopeTestActivity.java68 Settings settings = getSettings(stageIndex); in onCreate()
92 private Settings getSettings(int stageIndex) { in getSettings()
95 return new Settings(stageIndex, NUM_STAGES, 0, 0, 1, 2, true); in getSettings()
97 return new Settings(stageIndex, NUM_STAGES, 0, 0, -1, 2, false); in getSettings()
99 return new Settings(stageIndex, NUM_STAGES, 0, 1, 0, 1, true); in getSettings()
101 return new Settings(stageIndex, NUM_STAGES, 0, -1, 0, 1, false); in getSettings()
103 return new Settings(stageIndex, NUM_STAGES, 1, 0, 0, 0, true); in getSettings()
105 return new Settings(stageIndex, NUM_STAGES, -1, 0, 0, 0, false); in getSettings()
112 class Settings { class in GyroscopeTestActivity
121 Settings(int stageIndex, int totalStages, float rotateX, float rotateY, float rotateZ, in Settings() method in GyroscopeTestActivity.Settings
/cts/tests/tests/net/src/android/net/cts/
DTheaterModeTest.java22 import android.provider.Settings;
76 Settings.Global.putInt(resolver, Settings.Global.THEATER_MODE_ON, enabling ? 1 : 0); in setTheaterModeOn()
81 return Settings.Global.getInt(mContext.getContentResolver(), in isTheaterModeOn()
82 Settings.Global.THEATER_MODE_ON, 0) != 0; in isTheaterModeOn()
/cts/tests/tests/net/util/java/android/net/cts/util/
DCtsNetUtils.java54 import android.provider.Settings;
405 mOldPrivateDnsMode = Settings.Global.getString(mCR, Settings.Global.PRIVATE_DNS_MODE); in storePrivateDnsSetting()
406 mOldPrivateDnsSpecifier = Settings.Global.getString(mCR, in storePrivateDnsSetting()
407 Settings.Global.PRIVATE_DNS_SPECIFIER); in storePrivateDnsSetting()
413 Settings.Global.putString(mCR, in storePrivateDnsSetting()
414 Settings.Global.PRIVATE_DNS_SPECIFIER, mOldPrivateDnsSpecifier); in storePrivateDnsSetting()
415 Settings.Global.putString(mCR, Settings.Global.PRIVATE_DNS_MODE, mOldPrivateDnsMode); in storePrivateDnsSetting()
430 Settings.Global.putString(mCR, Settings.Global.PRIVATE_DNS_MODE, mOldPrivateDnsMode); in restorePrivateDnsSetting()
438 Settings.Global.putString(mCR, Settings.Global.PRIVATE_DNS_SPECIFIER, server); in setPrivateDnsStrictMode()
439 final String mode = Settings.Global.getString(mCR, Settings.Global.PRIVATE_DNS_MODE); in setPrivateDnsStrictMode()
[all …]

12345678