/cts/tests/tests/content/src/android/content/cts/ |
D | SharedPreferencesTest.java | 55 SharedPreferences prefs = getPrefs(); in setUp() local 56 prefs.edit().clear().commit(); in setUp() 77 SharedPreferences prefs = getPrefs(); in testCommitCreatesFiles() local 79 prefs.edit().putString("foo", "bar").commit(); in testCommitCreatesFiles() 84 SharedPreferences prefs = getPrefs(); in testDefaults() local 86 assertFalse(prefs.contains(key)); in testDefaults() 87 assertEquals(0, prefs.getAll().size()); in testDefaults() 88 assertTrue(prefs.getAll().isEmpty()); in testDefaults() 89 assertEquals(false, prefs.getBoolean(key, false)); in testDefaults() 90 assertEquals(true, prefs.getBoolean(key, true)); in testDefaults() [all …]
|
/cts/hostsidetests/backup/KeyValueApp/src/android/cts/backup/keyvaluerestoreapp/ |
D | KeyValueBackupRestoreTest.java | 216 SharedPreferences prefs = mContext.getSharedPreferences(TEST_PREFS_1, MODE_PRIVATE); in saveSharedPreferencesValues() local 217 SharedPreferences.Editor editor = prefs.edit(); in saveSharedPreferencesValues() 222 prefs = mContext.getSharedPreferences(TEST_PREFS_2, MODE_PRIVATE); in saveSharedPreferencesValues() 223 editor = prefs.edit(); in saveSharedPreferencesValues() 243 SharedPreferences prefs = mContext.getSharedPreferences(TEST_PREFS_1, MODE_PRIVATE); in readSharedPrefValues() local 244 mIntValue = prefs.getInt(INT_PREF, DEFAULT_INT_VALUE); in readSharedPrefValues() 245 mBoolValue = prefs.getBoolean(BOOL_PREF, DEFAULT_BOOL_VALUE); in readSharedPrefValues() 247 prefs = mContext.getSharedPreferences(TEST_PREFS_2, MODE_PRIVATE); in readSharedPrefValues() 248 mFloatValue = prefs.getFloat(FLOAT_PREF, DEFAULT_FLOAT_VALUE); in readSharedPrefValues() 249 mLongValue = prefs.getLong(LONG_PREF, DEFAULT_LONG_VALUE); in readSharedPrefValues() [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/admin/ |
D | PolicySerializationTestActivity.java | 109 SharedPreferences prefs = getPreferences(MODE_PRIVATE); in loadPolicy() local 110 if (prefs.getBoolean(LOAD_EXPECTED_POLICY_PREFERENCE, false)) { in loadPolicy() 112 item.loadExpectedValue(prefs); in loadPolicy() 128 SharedPreferences prefs = getPreferences(MODE_PRIVATE); in generateRandomPolicy() local 129 SharedPreferences.Editor editor = prefs.edit(); in generateRandomPolicy() 161 SharedPreferences prefs = getPreferences(MODE_PRIVATE); in handleAddDeviceAdminResult() local 162 SharedPreferences.Editor editor = prefs.edit(); in handleAddDeviceAdminResult() 248 void loadExpectedValue(SharedPreferences prefs); in loadExpectedValue() argument 286 public final void loadExpectedValue(SharedPreferences prefs) { in loadExpectedValue() argument 287 mExpectedValue = getPreferencesValue(prefs); in loadExpectedValue() [all …]
|
/cts/hostsidetests/devicepolicy/app/IntentReceiver/src/com/android/cts/intent/receiver/ |
D | BroadcastIntentReceiver.java | 33 SharedPreferences prefs = c.getSharedPreferences(PREFERENCES_NAME, Context.MODE_PRIVATE); in onReceive() local 34 SharedPreferences.Editor editor = prefs.edit(); in onReceive()
|
/cts/hostsidetests/backup/RestoreAnyVersion/src/ |
D | RestoreAnyVersionTest.java | 104 SharedPreferences prefs = mContext.getSharedPreferences(TEST_PREFS_1, MODE_PRIVATE); in saveAppVersionCodeToSharedPreference() local 105 SharedPreferences.Editor editor = prefs.edit(); in saveAppVersionCodeToSharedPreference() 113 SharedPreferences prefs = mContext.getSharedPreferences(TEST_PREFS_1, MODE_PRIVATE); in getAppSharedPreference() local 114 int intValue = prefs.getInt(INT_PREF, DEFAULT_INT_VALUE); in getAppSharedPreference()
|
/cts/hostsidetests/appsecurity/test-apps/AppWithData/src/com/android/cts/appwithdata/ |
D | CreatePrivateDataTest.java | 108 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/ |
D | BlockChangeReceiver.java | 17 SharedPreferences prefs = context.getSharedPreferences( in onReceive() local 19 SharedPreferences.Editor editor = prefs.edit(); in onReceive()
|
D | NotificationListenerVerifierActivity.java | 275 SharedPreferences prefs = mContext.getSharedPreferences( in test() local 279 if (prefs.contains(mChannelId) && prefs.getBoolean(mChannelId, false)) { in test() 300 SharedPreferences prefs = mContext.getSharedPreferences( in tearDown() local 302 SharedPreferences.Editor editor = prefs.edit(); in tearDown() 354 SharedPreferences prefs = mContext.getSharedPreferences( in test() local 358 if (prefs.contains(mGroupId) && prefs.getBoolean(mGroupId, false)) { in test() 379 SharedPreferences prefs = mContext.getSharedPreferences( in tearDown() local 381 SharedPreferences.Editor editor = prefs.edit(); in tearDown() 422 SharedPreferences prefs = mContext.getSharedPreferences( in test() local 426 Log.d(TAG, "Got broadcast " + prefs.contains(mContext.getPackageName())); in test() [all …]
|
/cts/hostsidetests/net/app2/src/com/android/cts/net/hostside/app2/ |
D | MyBroadcastReceiver.java | 101 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/ |
D | DetermineFovActivity.java | 161 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/ |
D | SecurityLoggingTest.java | 312 final SharedPreferences prefs = in testVerifyLogIds() local 321 prefs.contains(prevBatchLastIdKey)); in testVerifyLogIds() 322 final long prevBatchLastId = prefs.getLong(prevBatchLastIdKey, 0); in testVerifyLogIds() 329 prefs.edit().putLong(currBatchLastIdKey, lastId).commit(); in testVerifyLogIds()
|