Home
last modified time | relevance | path

Searched refs:getSharedPreferences (Results 1 – 25 of 29) sorted by relevance

12

/cts/hostsidetests/backup/SuccessNotificationApp/src/android/cts/backup/successnotificationapp/
DSuccessNotificationTest.java37 getTargetContext().getSharedPreferences(PREFS_FILE, Context.MODE_PRIVATE).edit().clear() in clearBackupSuccessNotificationsReceived()
43 assertTrue(getTargetContext().getSharedPreferences(PREFS_FILE, Context.MODE_PRIVATE) in verifyBackupSuccessNotificationReceivedForKeyValueApp()
49 assertTrue(getTargetContext().getSharedPreferences(PREFS_FILE, Context.MODE_PRIVATE) in verifyBackupSuccessNotificationReceivedForFullBackupApp()
DSuccessNotificationReceiver.java36 context.getSharedPreferences(SuccessNotificationTest.PREFS_FILE, Context.MODE_PRIVATE) in onReceive()
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DProvisioningTest.java114 assertTrue(getSharedPreferences(mContext).getBoolean(KEY_PROVISIONING_SUCCESSFUL_RECEIVED, in testVerifySuccessfulIntentWasReceived()
162 getSharedPreferences(context).edit() in saveBundle()
168 SharedPreferences pref = getSharedPreferences(context); in loadBundle()
175 public static SharedPreferences getSharedPreferences(Context context) { in getSharedPreferences() method in ProvisioningTest
176 return context.getSharedPreferences(SHARED_PREFERENCE_FILE_NAME, 0); in getSharedPreferences()
DProvisioningSuccessActivity.java25 ProvisioningTest.getSharedPreferences(this).edit() in onCreate()
/cts/tests/tests/content/src/android/content/cts/
DContextTest.java118 mContext.getSharedPreferences("test", Context.MODE_PRIVATE).edit().putInt("answer", 42) in testMoveSharedPreferencesFrom()
123 assertEquals(0, mContext.getSharedPreferences("test", Context.MODE_PRIVATE) in testMoveSharedPreferencesFrom()
125 assertEquals(42, deviceContext.getSharedPreferences("test", Context.MODE_PRIVATE) in testMoveSharedPreferencesFrom()
130 assertEquals(0, mContext.getSharedPreferences("test", Context.MODE_PRIVATE) in testMoveSharedPreferencesFrom()
132 assertEquals(42, deviceContext.getSharedPreferences("test", Context.MODE_PRIVATE) in testMoveSharedPreferencesFrom()
136 deviceContext.getSharedPreferences("test", Context.MODE_PRIVATE).edit() in testMoveSharedPreferencesFrom()
140 assertEquals(42, mContext.getSharedPreferences("test", Context.MODE_PRIVATE) in testMoveSharedPreferencesFrom()
142 assertEquals(24, mContext.getSharedPreferences("test", Context.MODE_PRIVATE) in testMoveSharedPreferencesFrom()
144 assertEquals(0, deviceContext.getSharedPreferences("test", Context.MODE_PRIVATE) in testMoveSharedPreferencesFrom()
146 assertEquals(0, deviceContext.getSharedPreferences("test", Context.MODE_PRIVATE) in testMoveSharedPreferencesFrom()
DSharedPreferencesTest.java246 SharedPreferences prefs = mContext.getSharedPreferences("torture", Context.MODE_PRIVATE); in testTorture()
250 prefs = mContext.getSharedPreferences("torture", Context.MODE_PRIVATE); in testTorture()
287 … SharedPreferences prefs = mContext.getSharedPreferences(prefsName, Context.MODE_PRIVATE); in testTorture2()
320 SharedPreferences clonePrefs = mContext.getSharedPreferences( in testTorture2()
331 mContext.getSharedPreferences("multiprocessTest", 0); in testModeMultiProcess()
342 mContext.getSharedPreferences("multiprocessTest", 0); in testModeMultiProcess()
347 mContext.getSharedPreferences("multiprocessTest", Context.MODE_MULTI_PROCESS); in testModeMultiProcess()
/cts/tests/tests/preference2/src/android/preference2/cts/
DPreferenceDataStoreTest.java90 mSharedPref = mManager.getSharedPreferences(); in setup()
95 mManager.getSharedPreferences().edit().remove(KEY).commit(); in setup()
104 assertNotNull(preference.getSharedPreferences()); in testThatDataStoreIsNullByDefault()
107 assertNotNull(mManager.getSharedPreferences()); in testThatDataStoreIsNullByDefault()
116 assertNull(preference.getSharedPreferences()); in testSetGetOnPreference()
124 assertNull(mManager.getSharedPreferences()); in testSetGetOnPreferenceManager()
134 assertNull(preference.getSharedPreferences()); in testSetOnPreferenceManagerGetOnPreference()
463 assertNotNull(mPreference.getSharedPreferences()); in testSharedPrefNotNullIfNoDS()
473 assertNotNull(mManager.getSharedPreferences()); in testSharedPrefNotNullIfNoDSMgr()
484 assertNull(mPreference.getSharedPreferences()); in testSharedPrefNullIfWithDS()
[all …]
DPreferenceTest.java136 assertNotNull(mPreference.getSharedPreferences()); in testGetSharedPreferences()
/cts/hostsidetests/appsecurity/test-apps/InstantUpgradeApp/src/com/android/cts/instantupgradeapp/
DClientTest.java52 InstrumentationRegistry.getContext().getSharedPreferences("preferences", 0); in testInstantApplicationWritePreferences()
60 InstrumentationRegistry.getContext().getSharedPreferences("preferences", 0); in testFullApplicationReadPreferences()
/cts/hostsidetests/devicepolicy/app/IntentReceiver/src/com/android/cts/intent/receiver/
DBroadcastIntentReceiver.java33 SharedPreferences prefs = c.getSharedPreferences(PREFERENCES_NAME, Context.MODE_PRIVATE); in onReceive()
DClearApplicationDataTest.java45 mSharedPrefs = mContext.getSharedPreferences(SHARED_PREFERENCE_NAME, Context.MODE_PRIVATE); in setUp()
DOwnerChangedBroadcastTest.java38 mPreferences = context.getSharedPreferences( in setUp()
/cts/hostsidetests/backup/RestoreAnyVersion/src/
DRestoreAnyVersionTest.java104 SharedPreferences prefs = mContext.getSharedPreferences(TEST_PREFS_1, MODE_PRIVATE); in saveAppVersionCodeToSharedPreference()
113 SharedPreferences prefs = mContext.getSharedPreferences(TEST_PREFS_1, MODE_PRIVATE); in getAppSharedPreference()
/cts/hostsidetests/backup/KeyValueApp/src/android/cts/backup/keyvaluerestoreapp/
DKeyValueBackupRestoreTest.java216 SharedPreferences prefs = mContext.getSharedPreferences(TEST_PREFS_1, MODE_PRIVATE); in saveSharedPreferencesValues()
222 prefs = mContext.getSharedPreferences(TEST_PREFS_2, MODE_PRIVATE); in saveSharedPreferencesValues()
243 SharedPreferences prefs = mContext.getSharedPreferences(TEST_PREFS_1, MODE_PRIVATE); in readSharedPrefValues()
247 prefs = mContext.getSharedPreferences(TEST_PREFS_2, MODE_PRIVATE); in readSharedPrefValues()
/cts/hostsidetests/appsecurity/test-apps/AppWithData/src/com/android/cts/appwithdata/
DCreatePrivateDataTest.java108 SharedPreferences prefs = mContext.getSharedPreferences(PREFERENCES_FILE_NAME, 0); in writeToPreferences()
149 SharedPreferences prefs = mContext.getSharedPreferences(PREFERENCES_FILE_NAME, 0); in assertPreferencesDataDoesNotExist()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/notifications/
DBlockChangeReceiver.java17 SharedPreferences prefs = context.getSharedPreferences( in onReceive()
DNotificationListenerVerifierActivity.java275 SharedPreferences prefs = mContext.getSharedPreferences( in test()
300 SharedPreferences prefs = mContext.getSharedPreferences( in tearDown()
354 SharedPreferences prefs = mContext.getSharedPreferences( in test()
379 SharedPreferences prefs = mContext.getSharedPreferences( in tearDown()
422 SharedPreferences prefs = mContext.getSharedPreferences( in test()
451 SharedPreferences prefs = mContext.getSharedPreferences( in tearDown()
494 SharedPreferences prefs = mContext.getSharedPreferences( in test()
519 SharedPreferences prefs = mContext.getSharedPreferences( in tearDown()
/cts/hostsidetests/backup/SharedPreferencesRestoreApp/src/android/cts/backup/sharedprefrestoreapp/
DSharedPrefsRestoreTestActivity.java54 mPrefs = getSharedPreferences(TEST_PREFS_1, MODE_PRIVATE); in onCreate()
/cts/hostsidetests/backup/includeexcludeapp/src/android/cts/backup/includeexcludeapp/
DIncludeExcludeTest.java103 mContext.getSharedPreferences("include_shared_pref", Context.MODE_PRIVATE); in setupFiles()
105 mContext.getSharedPreferences("exclude_shared_pref", Context.MODE_PRIVATE); in setupFiles()
/cts/hostsidetests/devicepolicy/app/TransferOwnerIncomingApp/src/com/android/cts/transferowner/
DDeviceAndProfileOwnerTransferIncomingTest.java101 return context.getSharedPreferences(SHARED_PREFERENCE_NAME, Context.MODE_PRIVATE); in getPrefs()
/cts/hostsidetests/net/app2/src/com/android/cts/net/hostside/app2/
DMyBroadcastReceiver.java102 .getSharedPreferences(mName, Context.MODE_PRIVATE); in increaseCounter()
109 final SharedPreferences prefs = context.getSharedPreferences(receiverName, in getCounter()
/cts/hostsidetests/appsecurity/test-apps/EncryptionApp/src/com/android/cts/encryptionapp/
DEncryptionAppTest.java117 mDe.getSharedPreferences(KEY_BOOT, 0).edit().putInt(KEY_BOOT, thisCount).commit(); in doBootCountBefore()
121 final int lastCount = mDe.getSharedPreferences(KEY_BOOT, 0).getInt(KEY_BOOT, -1); in doBootCountAfter()
/cts/hostsidetests/devicepolicy/app/TransferOwnerOutgoingApp/src/com/android/cts/transferowner/
DDeviceAndProfileOwnerTransferOutgoingTest.java203 return context.getSharedPreferences(SHARED_PREFERENCE_NAME, Context.MODE_PRIVATE); in getPrefs()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/nfc/hce/
DSimpleReaderActivity.java68 mPrefs = getSharedPreferences(PREFS_NAME, 0); in onCreate()
/cts/hostsidetests/devicepolicy/app/ContactDirectoryProvider/src/com/android/cts/contactdirectoryprovider/
DDirectoryProvider.java103 mSharedPrefs = getContext().getSharedPreferences(CONFIG_NAME, Context.MODE_PRIVATE); in onCreate()

12