Home
last modified time | relevance | path

Searched refs:prefs (Results 1 – 12 of 12) sorted by relevance

/cts/tests/tests/content/src/android/content/cts/
DSharedPreferencesTest.java57 SharedPreferences prefs = getPrefs(); in setUp() local
58 prefs.edit().clear().commit(); in setUp()
79 SharedPreferences prefs = getPrefs(); in testCommitCreatesFiles() local
81 prefs.edit().putString("foo", "bar").commit(); in testCommitCreatesFiles()
86 SharedPreferences prefs = getPrefs(); in testDefaults() local
88 assertFalse(prefs.contains(key)); in testDefaults()
89 assertEquals(0, prefs.getAll().size()); in testDefaults()
90 assertTrue(prefs.getAll().isEmpty()); in testDefaults()
91 assertEquals(false, prefs.getBoolean(key, false)); in testDefaults()
92 assertEquals(true, prefs.getBoolean(key, true)); in testDefaults()
[all …]
/cts/hostsidetests/backup/KeyValueApp/src/android/cts/backup/keyvaluerestoreapp/
DKeyValueBackupRestoreTest.java220 SharedPreferences prefs = mContext.getSharedPreferences(TEST_PREFS_1, MODE_PRIVATE); in saveSharedPreferencesValues() local
221 SharedPreferences.Editor editor = prefs.edit(); in saveSharedPreferencesValues()
226 prefs = mContext.getSharedPreferences(TEST_PREFS_2, MODE_PRIVATE); in saveSharedPreferencesValues()
227 editor = prefs.edit(); in saveSharedPreferencesValues()
247 SharedPreferences prefs = mContext.getSharedPreferences(TEST_PREFS_1, MODE_PRIVATE); in readSharedPrefValues() local
248 mIntValue = prefs.getInt(INT_PREF, DEFAULT_INT_VALUE); in readSharedPrefValues()
249 mBoolValue = prefs.getBoolean(BOOL_PREF, DEFAULT_BOOL_VALUE); in readSharedPrefValues()
251 prefs = mContext.getSharedPreferences(TEST_PREFS_2, MODE_PRIVATE); in readSharedPrefValues()
252 mFloatValue = prefs.getFloat(FLOAT_PREF, DEFAULT_FLOAT_VALUE); in readSharedPrefValues()
253 mLongValue = prefs.getLong(LONG_PREF, DEFAULT_LONG_VALUE); in readSharedPrefValues()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/admin/
DPolicySerializationTestActivity.java111 SharedPreferences prefs = getPreferences(MODE_PRIVATE); in loadPolicy() local
112 if (prefs.getBoolean(LOAD_EXPECTED_POLICY_PREFERENCE, false)) { in loadPolicy()
114 item.loadExpectedValue(prefs); in loadPolicy()
130 SharedPreferences prefs = getPreferences(MODE_PRIVATE); in generateRandomPolicy() local
131 SharedPreferences.Editor editor = prefs.edit(); in generateRandomPolicy()
163 SharedPreferences prefs = getPreferences(MODE_PRIVATE); in handleAddDeviceAdminResult() local
164 SharedPreferences.Editor editor = prefs.edit(); in handleAddDeviceAdminResult()
250 void loadExpectedValue(SharedPreferences prefs); in loadExpectedValue() argument
288 public final void loadExpectedValue(SharedPreferences prefs) { in loadExpectedValue() argument
289 mExpectedValue = getPreferencesValue(prefs); in loadExpectedValue()
[all …]
/cts/hostsidetests/backup/RestoreAnyVersion/src/
DRestoreAnyVersionTest.java102 SharedPreferences prefs = mContext.getSharedPreferences(TEST_PREFS_1, MODE_PRIVATE); in saveAppVersionCodeToSharedPreference() local
103 SharedPreferences.Editor editor = prefs.edit(); in saveAppVersionCodeToSharedPreference()
111 SharedPreferences prefs = mContext.getSharedPreferences(TEST_PREFS_1, MODE_PRIVATE); in getAppSharedPreference() local
112 int intValue = prefs.getInt(INT_PREF, DEFAULT_INT_VALUE); in getAppSharedPreference()
/cts/hostsidetests/appsecurity/test-apps/AppWithData/src/com/android/cts/appwithdata/
DCreatePrivateDataTest.java108 SharedPreferences prefs = mContext.getSharedPreferences(PREFERENCES_FILE_NAME, 0); in writeToPreferences() local
109 SharedPreferences.Editor editor = prefs.edit(); in writeToPreferences()
112 assertEquals(PREFERENCE_VALUE, prefs.getString(PREFERENCE_KEY, null)); in writeToPreferences()
149 SharedPreferences prefs = mContext.getSharedPreferences(PREFERENCES_FILE_NAME, 0); in assertPreferencesDataDoesNotExist() local
150 assertNull(prefs.getString(PREFERENCE_KEY, null)); in assertPreferencesDataDoesNotExist()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/notifications/
DNotificationListenerVerifierActivity.java310 SharedPreferences prefs = mContext.getSharedPreferences( in test() local
314 if (prefs.contains(mChannelId) && prefs.getBoolean(mChannelId, false)) { in test()
335 SharedPreferences prefs = mContext.getSharedPreferences( in tearDown() local
337 SharedPreferences.Editor editor = prefs.edit(); in tearDown()
389 SharedPreferences prefs = mContext.getSharedPreferences( in test() local
393 if (prefs.contains(mGroupId) && prefs.getBoolean(mGroupId, false)) { in test()
414 SharedPreferences prefs = mContext.getSharedPreferences( in tearDown() local
416 SharedPreferences.Editor editor = prefs.edit(); in tearDown()
457 SharedPreferences prefs = mContext.getSharedPreferences( in test() local
461 Log.d(TAG, "Got broadcast " + prefs.contains(mContext.getPackageName())); in test()
[all …]
DBlockChangeReceiver.java17 SharedPreferences prefs = context.getSharedPreferences( in onReceive() local
19 SharedPreferences.Editor editor = prefs.edit(); in onReceive()
/cts/hostsidetests/devicepolicy/app/IntentReceiver/src/com/android/cts/intent/receiver/
DBroadcastIntentReceiver.java33 SharedPreferences prefs = c.getSharedPreferences(PREFERENCES_NAME, Context.MODE_PRIVATE); in onReceive() local
34 SharedPreferences.Editor editor = prefs.edit(); in onReceive()
/cts/hostsidetests/net/app2/src/com/android/cts/net/hostside/app2/
DMyBroadcastReceiver.java101 final SharedPreferences prefs = context.getApplicationContext() in increaseCounter() local
103 final int value = prefs.getInt(action, 0) + 1; in increaseCounter()
105 prefs.edit().putInt(action, value).apply(); in increaseCounter()
109 final SharedPreferences prefs = context.getSharedPreferences(receiverName, in getCounter() local
111 final int value = prefs.getInt(action, 0); in getCounter()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/camera/fov/
DDetermineFovActivity.java161 SharedPreferences prefs = in getMarkerDistance() local
163 return Float.parseFloat(prefs.getString( in getMarkerDistance()
170 SharedPreferences prefs = in getTargetDistance() local
172 return Float.parseFloat(prefs.getString( in getTargetDistance()
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DSecurityLoggingTest.java318 final SharedPreferences prefs = in testVerifyLogIds() local
327 prefs.contains(prevBatchLastIdKey)); in testVerifyLogIds()
328 final long prevBatchLastId = prefs.getLong(prevBatchLastIdKey, 0); in testVerifyLogIds()
335 prefs.edit().putLong(currBatchLastIdKey, lastId).commit(); in testVerifyLogIds()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DByodFlowTestActivity.java882 final SharedPreferences prefs = getProvisioningPreferences(context); in markProvisioningCompleteBroadcastWithStatus() local
883 final SharedPreferences.Editor editor = prefs.edit(); in markProvisioningCompleteBroadcastWithStatus()