Home
last modified time | relevance | path

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

/cts/tests/tests/content/src/android/content/cts/
DSharedPreferencesTest.java51 SharedPreferences prefs = getPrefs(); in setUp() local
52 prefs.edit().clear().commit(); in setUp()
73 SharedPreferences prefs = getPrefs(); in testCommitCreatesFiles() local
75 prefs.edit().putString("foo", "bar").commit(); in testCommitCreatesFiles()
80 SharedPreferences prefs = getPrefs(); in testDefaults() local
82 assertFalse(prefs.contains(key)); in testDefaults()
83 assertEquals(0, prefs.getAll().size()); in testDefaults()
84 assertTrue(prefs.getAll().isEmpty()); in testDefaults()
85 assertEquals(false, prefs.getBoolean(key, false)); in testDefaults()
86 assertEquals(true, prefs.getBoolean(key, true)); in testDefaults()
[all …]
/cts/hostsidetests/backup/KeyValueApp/src/android/cts/backup/keyvaluerestoreapp/
DKeyValueBackupRestoreTest.java138 SharedPreferences prefs = mContext.getSharedPreferences(TEST_PREFS_1, MODE_PRIVATE); in saveSharedPreferencesValues() local
139 SharedPreferences.Editor editor = prefs.edit(); in saveSharedPreferencesValues()
144 prefs = mContext.getSharedPreferences(TEST_PREFS_2, MODE_PRIVATE); in saveSharedPreferencesValues()
145 editor = prefs.edit(); in saveSharedPreferencesValues()
165 SharedPreferences prefs = mContext.getSharedPreferences(TEST_PREFS_1, MODE_PRIVATE); in readSharedPrefValues() local
166 mIntValue = prefs.getInt(INT_PREF, DEFAULT_INT_VALUE); in readSharedPrefValues()
167 mBoolValue = prefs.getBoolean(BOOL_PREF, DEFAULT_BOOL_VALUE); in readSharedPrefValues()
169 prefs = mContext.getSharedPreferences(TEST_PREFS_2, MODE_PRIVATE); in readSharedPrefValues()
170 mFloatValue = prefs.getFloat(FLOAT_PREF, DEFAULT_FLOAT_VALUE); in readSharedPrefValues()
171 mLongValue = prefs.getLong(LONG_PREF, DEFAULT_LONG_VALUE); in readSharedPrefValues()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/admin/
DPolicySerializationTestActivity.java109 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/
DBroadcastIntentReceiver.java33 SharedPreferences prefs = c.getSharedPreferences(PREFERENCES_NAME, Context.MODE_PRIVATE); in onReceive() local
34 SharedPreferences.Editor editor = prefs.edit(); in onReceive()
/cts/hostsidetests/appsecurity/test-apps/AppWithData/src/com/android/cts/appwithdata/
DCreatePrivateDataTest.java109 SharedPreferences prefs = mContext.getSharedPreferences(PREFERENCES_FILE_NAME, 0); in writeToPreferences() local
110 SharedPreferences.Editor editor = prefs.edit(); in writeToPreferences()
113 assertEquals(PREFERENCE_VALUE, prefs.getString(PREFERENCE_KEY, null)); in writeToPreferences()
150 SharedPreferences prefs = mContext.getSharedPreferences(PREFERENCES_FILE_NAME, 0); in assertPreferencesDataDoesNotExist() local
151 assertNull(prefs.getString(PREFERENCE_KEY, null)); in assertPreferencesDataDoesNotExist()
/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/tools/dex-tools/dex/
Dclasses0.out.dex57459 @dalvik.annotation.EnclosingClass (value =Ljava/util/prefs/AbstractPreferences; )
57460 final class java.util.prefs.AbstractPreferences$1 extends java.lang.Thread
57471 @dalvik.annotation.EnclosingClass (value =Ljava/util/prefs/AbstractPreferences; )
57473 class java.util.prefs.AbstractPreferences$EventDispatcher extends java.lang.Thread
57480 @dalvik.annotation.Signature (value =(Ljava/util/prefs/NodeChangeEvent;Ljava/util/List<Ljava/util/E…
57482 java.util.prefs.NodeChangeEvent
57484 @dalvik.annotation.Signature (value =(Ljava/util/prefs/NodeChangeEvent;Ljava/util/List<Ljava/util/E…
57486 java.util.prefs.NodeChangeEvent
57488 @dalvik.annotation.Signature (value =(Ljava/util/prefs/PreferenceChangeEvent;Ljava/util/List<Ljava/…
57490 java.util.prefs.PreferenceChangeEvent
[all …]