Home
last modified time | relevance | path

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

12345678910

/cts/tests/tests/provider/src/android/provider/cts/settings/
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/hostsidetests/appsecurity/test-apps/ReadSettingsFieldsApp/src/com/android/cts/readsettingsfieldsapp/
DReadSettingsFieldsTest.java20 import android.provider.Settings;
35 testNonHiddenSettingsKeysAreReadable(Settings.Secure.class); in testSecureNonHiddenSettingsKeysAreReadable()
39 testNonHiddenSettingsKeysAreReadable(Settings.System.class); in testSystemNonHiddenSettingsKeysAreReadable()
43 testNonHiddenSettingsKeysAreReadable(Settings.Global.class); in testGlobalNonHiddenSettingsKeysAreReadable()
46 private <T extends Settings.NameValueTable> void testNonHiddenSettingsKeysAreReadable( in testNonHiddenSettingsKeysAreReadable()
66 private <T extends Settings.NameValueTable> void callGetStringMethod(Class<T> settingsClass, in callGetStringMethod()
103 final ArraySet<String> publicSettingsKeys = getNonHiddenSettingsKeys(Settings.Secure.class); in testSecureSomeHiddenSettingsKeysAreReadable()
106 testHiddenSettingsKeysReadable(Settings.Secure.class, publicSettingsKeys, in testSecureSomeHiddenSettingsKeysAreReadable()
111 final ArraySet<String> publicSettingsKeys = getNonHiddenSettingsKeys(Settings.System.class); in testSystemSomeHiddenSettingsKeysAreReadable()
114 testHiddenSettingsKeysReadable(Settings.System.class, publicSettingsKeys, in testSystemSomeHiddenSettingsKeysAreReadable()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/helpers/
DSensorFeaturesDeactivator.java25 import android.provider.Settings;
100 super(Settings.ACTION_AIRPLANE_MODE_SETTINGS, R.string.snsr_setting_airplane_mode); in AirplaneModeSettingContainer()
108 return Settings.System in getSettingMode()
109 .getInt(contentResolver, Settings.System.AIRPLANE_MODE_ON, defaultValue); in getSettingMode()
111 return Settings.Global in getSettingMode()
112 .getInt(contentResolver, Settings.Global.AIRPLANE_MODE_ON, defaultValue); in getSettingMode()
126 super(Settings.ACTION_DISPLAY_SETTINGS, R.string.snsr_setting_screen_brightness_mode); in ScreenBrightnessModeSettingContainer()
131 return Settings.System.getInt( in getSettingMode()
133 Settings.System.SCREEN_BRIGHTNESS_MODE, in getSettingMode()
140 super(Settings.ACTION_DISPLAY_SETTINGS, R.string.snsr_setting_ambient_display); in AmbientDisplaySettingContainer()
[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/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.java24 import android.provider.Settings;
121 Settings.ACTION_SETTINGS,
122 Settings.ACTION_SOUND_SETTINGS,
123 Settings.ACTION_APPLICATION_SETTINGS,
124 Settings.ACTION_SETTINGS,
125 Settings.ACTION_SECURITY_SETTINGS,
126 Settings.ACTION_WIRELESS_SETTINGS,
127 Settings.ACTION_WIRELESS_SETTINGS,
128 Settings.ACTION_WIFI_SETTINGS,
129 Settings.ACTION_DEVICE_INFO_SETTINGS,
[all …]
/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/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 testSetSystemSettingsFailsForNotAllowedSettings()
/cts/hostsidetests/backup/PreservedSettingsApp/src/android/cts/backup/preservedsettingsapp/
DPreservedSettingsRestoreTest.java28 import android.provider.Settings;
52 Settings.Secure.ACCESSIBILITY_CAPTIONING_WINDOW_COLOR;
54 Settings.Secure.ACCESSIBILITY_CAPTIONING_FONT_SCALE;
88 assertThat(Settings.Secure.getString(mContentResolver, OVERRIDEABLE_SETTING)).isEqualTo( in testOnlyOverrideableSettingsAreOverridden()
91 assertThat(Settings.Secure.getString(mContentResolver, NON_OVERRIDEABLE_SETTING)).isEqualTo( in testOnlyOverrideableSettingsAreOverridden()
97 Settings.Secure.putString(mContentResolver, OVERRIDEABLE_SETTING, in modifySettings()
99 Settings.Secure.putString(mContentResolver, NON_OVERRIDEABLE_SETTING, in modifySettings()
105 setOriginalSettingValue(OVERRIDEABLE_SETTING, Settings.Secure.getString(mContentResolver, in setupDevice()
108 Settings.Secure.getString(mContentResolver, NON_OVERRIDEABLE_SETTING)); in setupDevice()
114 Settings.Global.putString(mContentResolver, in setupDevice()
[all …]
/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.java40 import android.provider.Settings;
98 int previousBrightness = getSystemSetting(Settings.System.SCREEN_BRIGHTNESS); in testBrightnessSliderTracking()
100 getSystemSetting(Settings.System.SCREEN_BRIGHTNESS_MODE); in testBrightnessSliderTracking()
102 setSystemSetting(Settings.System.SCREEN_BRIGHTNESS_MODE, in testBrightnessSliderTracking()
103 Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC); in testBrightnessSliderTracking()
104 int mode = getSystemSetting(Settings.System.SCREEN_BRIGHTNESS_MODE); in testBrightnessSliderTracking()
105 assertEquals(Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC, mode); in testBrightnessSliderTracking()
112 setSystemSetting(Settings.System.SCREEN_BRIGHTNESS, 20); in testBrightnessSliderTracking()
116 setSystemSetting(Settings.System.SCREEN_BRIGHTNESS, 60); in testBrightnessSliderTracking()
125 setSystemSetting(Settings.System.SCREEN_BRIGHTNESS, 200); in testBrightnessSliderTracking()
[all …]
/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/contactsprovider/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/backup/OtherSoundsSettingsApp/src/android/cts/backup/othersoundssettingsapp/
DOtherSoundsSettingsTest.java32 import android.provider.Settings;
100 int originalValue = prepareSystemSetting(Settings.System.DTMF_TONE_WHEN_DIALING); in testOtherSoundsSettings_dialPadTones()
105 boolean ret = setSystemSetting(Settings.System.DTMF_TONE_WHEN_DIALING, in testOtherSoundsSettings_dialPadTones()
112 Settings.System.getInt( in testOtherSoundsSettings_dialPadTones()
113 mContentResolver, Settings.System.DTMF_TONE_WHEN_DIALING, -1); in testOtherSoundsSettings_dialPadTones()
129 int originalValue = prepareSystemSetting(Settings.System.SOUND_EFFECTS_ENABLED); in testOtherSoundsSettings_touchSounds()
134 boolean ret = setSystemSetting(Settings.System.SOUND_EFFECTS_ENABLED, in testOtherSoundsSettings_touchSounds()
141 Settings.System.getInt( in testOtherSoundsSettings_touchSounds()
142 mContentResolver, Settings.System.SOUND_EFFECTS_ENABLED, -1); in testOtherSoundsSettings_touchSounds()
166 int originalValue = prepareSystemSetting(Settings.System.HAPTIC_FEEDBACK_ENABLED); in testOtherSoundsSettings_touchVibration()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DDevicePolicyLoggingTest.java19 import static android.provider.Settings.Global.AUTO_TIME;
20 import static android.provider.Settings.Global.AUTO_TIME_ZONE;
21 import static android.provider.Settings.Global.DATA_ROAMING;
22 import static android.provider.Settings.Global.USB_MASS_STORAGE_ENABLED;
24 import android.provider.Settings;
44 Settings.Global.getString(mContext.getContentResolver(), AUTO_TIME); in testSetGlobalSettingLogged()
46 Settings.Global.getString(mContext.getContentResolver(), AUTO_TIME_ZONE); in testSetGlobalSettingLogged()
48 Settings.Global.getString(mContext.getContentResolver(), DATA_ROAMING); in testSetGlobalSettingLogged()
50 Settings.Global.getString(mContext.getContentResolver(), USB_MASS_STORAGE_ENABLED); in testSetGlobalSettingLogged()
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()
/cts/tests/framework/base/windowmanager/src/android/server/wm/
DUnsupportedErrorDialogTests.java27 import android.provider.Settings;
67 secureIntSession(Settings.Secure.ANR_SHOW_BACKGROUND); in testDevSettingOverride()
69 globalIntSession(Settings.Global.SHOW_FIRST_CRASH_DIALOG); in testDevSettingOverride()
71 secureIntSession(Settings.Secure.SHOW_FIRST_CRASH_DIALOG_DEV_OPTION)) { in testDevSettingOverride()
100 secureIntSession(Settings.Secure.ANR_SHOW_BACKGROUND); in testDevSettingPrecedence()
102 globalIntSession(Settings.Global.HIDE_ERROR_DIALOGS); in testDevSettingPrecedence()
104 globalIntSession(Settings.Global.SHOW_FIRST_CRASH_DIALOG) in testDevSettingPrecedence()
120 secureIntSession(Settings.Secure.ANR_SHOW_BACKGROUND); in testFirstCrashDialogNotShown()
122 globalIntSession(Settings.Global.SHOW_FIRST_CRASH_DIALOG)) { in testFirstCrashDialogNotShown()
138 secureIntSession(Settings.Secure.ANR_SHOW_BACKGROUND); in testRepeatedCrashDialogNotShown()
[all …]
/cts/tests/tests/systemintents/src/android/systemintents/cts/
DTestSystemIntents.java27 import android.provider.Settings;
75 new IntentEntry(0, new Intent(Settings.ACTION_SETTINGS)),
76 new IntentEntry(0, new Intent(Settings.ACTION_APPLICATION_DEVELOPMENT_SETTINGS)),
77 new IntentEntry(0, new Intent(Settings.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS)),
78 new IntentEntry(0, new Intent(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS)
80 … new IntentEntry(0, new Intent(Settings.ACTION_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS)
82 new IntentEntry(0, new Intent(Settings.ACTION_HOME_SETTINGS)),
84 new Intent(Settings.ACTION_APN_SETTINGS)),
86 new Intent(Settings.ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS)),
88 new Intent(Settings.ACTION_INPUT_METHOD_SETTINGS))
/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/tests/tests/uirendering/src/android/uirendering/cts/runner/
DUiRenderingRunner.java21 import android.provider.Settings;
35 super(Settings.Secure.getUriFor( in ImmersiveConfirmationSetting()
36 Settings.Secure.IMMERSIVE_MODE_CONFIRMATIONS), in ImmersiveConfirmationSetting()
37 Settings.Secure::getString, Settings.Secure::putString); in ImmersiveConfirmationSetting()

12345678910