/packages/apps/Contacts/tests/src/com/android/contacts/tests/mocks/ |
H A D | MockSharedPreferences.java | 40 public boolean contains(String key) { argument 41 return mValues.containsKey(key); 48 public boolean getBoolean(String key, boolean defValue) { argument 49 if (mValues.containsKey(key)) { 50 return ((Boolean)mValues.get(key)).booleanValue(); 55 public float getFloat(String key, float defValue) { argument 56 if (mValues.containsKey(key)) { 57 return ((Float)mValues.get(key)).floatValue(); 62 public int getInt(String key, int defValue) { argument 63 if (mValues.containsKey(key)) { 69 getLong(String key, long defValue) argument 76 getString(String key, String defValue) argument 83 getStringSet(String key, Set<String> defValues) argument 100 putBoolean(String key, boolean value) argument 105 putFloat(String key, float value) argument 110 putInt(String key, int value) argument 115 putLong(String key, long value) argument 120 putString(String key, String value) argument 125 putStringSet(String key, Set<String> values) argument 130 remove(String key) argument [all...] |
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/util/ |
H A D | MockSharedPreferences.java | 40 public boolean contains(String key) { argument 41 return mValues.containsKey(key); 48 public boolean getBoolean(String key, boolean defValue) { argument 49 if (mValues.containsKey(key)) { 50 return ((Boolean)mValues.get(key)).booleanValue(); 55 public float getFloat(String key, float defValue) { argument 56 if (mValues.containsKey(key)) { 57 return ((Float)mValues.get(key)).floatValue(); 62 public int getInt(String key, int defValue) { argument 63 if (mValues.containsKey(key)) { 69 getLong(String key, long defValue) argument 76 getString(String key, String defValue) argument 83 getStringSet(String key, Set<String> defValues) argument 100 putBoolean(String key, boolean value) argument 105 putFloat(String key, float value) argument 110 putInt(String key, int value) argument 115 putLong(String key, long value) argument 120 putString(String key, String value) argument 125 putStringSet(String key, Set<String> values) argument 130 remove(String key) argument [all...] |
/packages/apps/Camera/src/com/android/camera/ |
H A D | ComboPreferences.java | 76 private static boolean isGlobal(String key) { argument 77 return key.equals(CameraSettings.KEY_VIDEO_TIME_LAPSE_FRAME_INTERVAL) 78 || key.equals(CameraSettings.KEY_CAMERA_ID) 79 || key.equals(CameraSettings.KEY_RECORD_LOCATION) 80 || key.equals(CameraSettings.KEY_CAMERA_FIRST_USE_HINT_SHOWN) 81 || key.equals(CameraSettings.KEY_VIDEO_FIRST_USE_HINT_SHOWN) 82 || key.equals(CameraSettings.KEY_VIDEO_EFFECT); 86 public String getString(String key, String defValue) { argument 87 if (isGlobal(key) || !mPrefLocal.contains(key)) { 95 getInt(String key, int defValue) argument 104 getLong(String key, long defValue) argument 113 getFloat(String key, float defValue) argument 122 getBoolean(String key, boolean defValue) argument 132 getStringSet(String key, Set<String> defValues) argument 137 contains(String key) argument 174 remove(String key) argument 181 putString(String key, String value) argument 191 putInt(String key, int value) argument 201 putLong(String key, long value) argument 211 putFloat(String key, float value) argument 221 putBoolean(String key, boolean value) argument 232 putStringSet(String key, Set<String> values) argument 257 onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) argument [all...] |
/packages/apps/LegacyCamera/src/com/android/camera/ |
H A D | ComboPreferences.java | 75 private static boolean isGlobal(String key) { argument 76 return key.equals(CameraSettings.KEY_VIDEO_TIME_LAPSE_FRAME_INTERVAL) 77 || key.equals(CameraSettings.KEY_CAMERA_ID) 78 || key.equals(CameraSettings.KEY_RECORD_LOCATION) 79 || key.equals(CameraSettings.KEY_CAMERA_FIRST_USE_HINT_SHOWN) 80 || key.equals(CameraSettings.KEY_VIDEO_FIRST_USE_HINT_SHOWN) 81 || key.equals(CameraSettings.KEY_VIDEO_EFFECT); 84 public String getString(String key, String defValue) { argument 85 if (isGlobal(key) || !mPrefLocal.contains(key)) { 92 getInt(String key, int defValue) argument 100 getLong(String key, long defValue) argument 108 getFloat(String key, float defValue) argument 116 getBoolean(String key, boolean defValue) argument 125 getStringSet(String key, Set<String> defValues) argument 129 contains(String key) argument 162 remove(String key) argument 168 putString(String key, String value) argument 177 putInt(String key, int value) argument 186 putLong(String key, long value) argument 195 putFloat(String key, float value) argument 204 putBoolean(String key, boolean value) argument 214 putStringSet(String key, Set<String> values) argument 235 onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) argument [all...] |
/packages/apps/Mms/src/com/android/mms/util/ |
H A D | SendingProgressTokenManager.java | 36 synchronized public static long get(Object key) { argument 37 Long token = TOKEN_POOL.get(key); 39 Log.v(TAG, "TokenManager.get(" + key + ") -> " + token); 44 synchronized public static void put(Object key, long token) { argument 46 Log.v(TAG, "TokenManager.put(" + key + ", " + token + ")"); 48 TOKEN_POOL.put(key, token); 51 synchronized public static void remove(Object key) { argument 53 Log.v(TAG, "TokenManager.remove(" + key + ")"); 55 TOKEN_POOL.remove(key);
|
H A D | SimpleCache.java | 102 public V get(Object key) { argument 103 return mSoftReferences != null ? unwrap(mSoftReferences.get(key)) 104 : mHardReferences.get(key); 110 public V put(K key, V value) { argument 112 unwrap(mSoftReferences.put(key, new SoftReference<V>(value))) 113 : mHardReferences.put(key, value); 130 public V remove(K key) { argument 132 return unwrap(mSoftReferences.remove(key)); 134 return mHardReferences.remove(key);
|
H A D | ImageCacheService.java | 58 byte[] key = makeKey(path, type); 59 long cacheKey = crc64Long(key); 66 if (isSameKey(key, value)) { 67 int offset = key.length; 77 byte[] key = makeKey(path, type); 78 long cacheKey = crc64Long(key); 79 ByteBuffer buffer = ByteBuffer.allocate(key.length + value.length); 80 buffer.put(key); 99 private static boolean isSameKey(byte[] key, byte[] buffer) { argument 100 int n = key [all...] |
/packages/apps/Calendar/tests/src/com/android/calendar/ |
H A D | FakeSharedPreferences.java | 38 public boolean contains(String key) { argument 39 return mValues.containsKey(key); 48 public boolean getBoolean(String key, boolean defValue) { argument 49 if (mValues.containsKey(key)) { 50 return ((Boolean)mValues.get(key)).booleanValue(); 56 public float getFloat(String key, float defValue) { argument 57 if (mValues.containsKey(key)) { 58 return ((Float)mValues.get(key)).floatValue(); 64 public int getInt(String key, int defValue) { argument 65 if (mValues.containsKey(key)) { 72 getLong(String key, long defValue) argument 80 getString(String key, String defValue) argument 88 getStringSet(String key, Set<String> defValues) argument 108 putBoolean(String key, boolean value) argument 114 putFloat(String key, float value) argument 120 putInt(String key, int value) argument 126 putLong(String key, long value) argument 132 putString(String key, String value) argument 138 putStringSet(String key, Set<String> values) argument 144 remove(String key) argument [all...] |
/packages/apps/Email/tests/src/com/android/email/ |
H A D | MockSharedPreferences.java | 42 public boolean contains(String key) { argument 43 return mValues.containsKey(key); 50 public boolean getBoolean(String key, boolean defValue) { argument 51 if (mValues.containsKey(key)) { 52 return ((Boolean)mValues.get(key)).booleanValue(); 57 public float getFloat(String key, float defValue) { argument 58 if (mValues.containsKey(key)) { 59 return ((Float)mValues.get(key)).floatValue(); 64 public int getInt(String key, int defValue) { argument 65 if (mValues.containsKey(key)) { 71 getLong(String key, long defValue) argument 78 getString(String key, String defValue) argument 85 getStringSet(String key, Set<String> defValues) argument 102 putBoolean(String key, boolean value) argument 107 putFloat(String key, float value) argument 112 putInt(String key, int value) argument 117 putLong(String key, long value) argument 122 putString(String key, String value) argument 127 putStringSet(String key, Set<String> values) argument 132 remove(String key) argument [all...] |
/packages/apps/Gallery2/src/com/android/gallery3d/app/ |
H A D | TransitionStore.java | 24 public void put(Object key, Object value) { argument 25 mStorage.put(key, value); 29 public <T> T get(Object key) { argument 30 return (T) mStorage.get(key);
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/ |
H A D | PointerTracker.java | 47 * Get KeyboardActionListener object that is used to register key code and so on. 59 * Get TimerProxy object that handles key repeat and long press timer event for this 61 * @return the TimerProxy object that handles key repeat and long press timer event. 67 public void invalidateKey(Key key); argument 132 // The current key where this pointer is. 134 // The position where the current key was recognized for the first time. 145 // true if event is already translated to a key action. 151 // true if this pointer is repeatable key 154 // true if this pointer is in sliding key input 157 // true if sliding key i 238 callListenerOnPressAndCheckKeyboardLayoutChange(Key key) argument 266 callListenerOnCodeInput(Key key, int primaryCode, int x, int y) argument 295 callListenerOnRelease(Key key, int primaryCode, boolean withSliding) argument 346 setReleasedKeyGraphics(Key key) argument 377 setPressedKeyGraphics(Key key) argument 416 updateReleaseKeyGraphics(Key key) argument 421 updatePressKeyGraphics(Key key) argument 545 startSlidingKeyInput(Key key) argument 717 startRepeatKey(Key key) argument 727 onRegisterKey(Key key) argument 750 startLongPressTimer(Key key) argument 756 detectAndSendKey(Key key, int x, int y) argument [all...] |
H A D | MoreKeysDetector.java | 42 for (final Key key : getKeyboard().mKeys) { 43 final int dist = key.squaredDistanceToEdge(touchX, touchY); 45 nearestKey = key;
|
H A D | KeyDetector.java | 31 * This class handles key detection. 79 * Detect the key whose hitbox the touch point is in. 83 * @return the key that the touch point hits. 91 for (final Key key: mKeyboard.getNearestKeys(touchX, touchY)) { 92 final boolean isOnKey = key.isOnKey(touchX, touchY); 93 final int distance = key.squaredDistanceToEdge(touchX, touchY); 96 || (distance == minDistance && isOnKey && key.mCode > primaryKey.mCode)) { 98 primaryKey = key; 104 public static String printableCode(Key key) { argument 105 return key ! [all...] |
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/accessibility/ |
H A D | AccessibilityEntityProvider.java | 105 * Creates and populates an {@link AccessibilityEvent} for the specified key 108 * @param key A key on the host keyboard view. 110 * @return A populated {@link AccessibilityEvent} for the key. 113 public AccessibilityEvent createAccessibilityEvent(Key key, int eventType) { argument 114 final int virtualViewId = generateVirtualViewIdForKey(key); 115 final String keyDescription = getKeyDescription(key); 119 event.setClassName(key.getClass().getName()); 165 for (Key key : keys) { 166 final int childVirtualViewId = generateVirtualViewIdForKey(key); 217 simulateKeyPress(Key key) argument 250 performActionForKey(Key key, int action, Bundle arguments) argument 284 sendAccessibilityEventForKey(Key key, int eventType) argument 295 getKeyDescription(Key key) argument 336 generateVirtualViewIdForKey(Key key) argument [all...] |
/packages/apps/Gallery/src/com/android/camera/gallery/ |
H A D | LruCache.java | 45 public Entry(K key, V value, ReferenceQueue<V> queue) { argument 47 mKey = key; 60 public synchronized V put(K key, V value) { argument 62 mLruMap.put(key, value); 64 key, new Entry<K, V>(key, value, mQueue)); 68 public synchronized V get(K key) { argument 70 V value = mLruMap.get(key); 72 Entry<K, V> entry = mWeakMap.get(key);
|
/packages/apps/Gallery2/src/com/android/gallery3d/data/ |
H A D | ImageCacheService.java | 58 byte[] key = makeKey(path, type); 59 long cacheKey = Utils.crc64Long(key); 62 request.key = cacheKey; 67 if (isSameKey(key, request.buffer)) { 69 buffer.offset = key.length; 80 byte[] key = makeKey(path, type); 81 long cacheKey = Utils.crc64Long(key); 82 ByteBuffer buffer = ByteBuffer.allocate(key.length + value.length); 83 buffer.put(key); 98 private static boolean isSameKey(byte[] key, byt argument [all...] |
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ |
H A D | ListSuggestionCursorNoDuplicates.java | 41 String key = SuggestionUtils.getSuggestionKey(suggestion); 42 if (mSuggestionKeys.add(key)) { 45 if (DBG) Log.d(TAG, "Rejecting duplicate " + key);
|
/packages/apps/KeyChain/support/src/com/android/keychain/tests/support/ |
H A D | IKeyChainServiceTestSupport.aidl | 35 boolean keystorePut(String key, in byte[] value); 36 boolean keystoreImportKey(String key, in byte[] value);
|
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/ |
H A D | LruCache.java | 49 public Entry(K key, V value, ReferenceQueue<V> queue) { argument 51 mKey = key; 64 public synchronized boolean containsKey(K key) { argument 66 return mWeakMap.containsKey(key); 69 public synchronized V put(K key, V value) { argument 71 mLruMap.put(key, value); 73 key, new Entry<K, V>(key, value, mQueue)); 77 public synchronized V get(K key) { argument 79 V value = mLruMap.get(key); [all...] |
/packages/apps/Launcher2/src/com/android/launcher2/ |
H A D | PagedViewIconCache.java | 82 for (Key key : mIconOutlineCache.keySet()) { 83 mIconOutlineCache.get(key).recycle(); 90 for (Key key : keysToRemove) { 91 if (key.isKeyType(t)) { 92 mIconOutlineCache.get(key).recycle(); 93 mIconOutlineCache.remove(key); 121 public void addOutline(Key key, Bitmap b) { argument 122 mIconOutlineCache.put(key, b); 124 public void removeOutline(Key key) { argument 125 if (mIconOutlineCache.containsKey(key)) { 130 getOutline(Key key) argument [all...] |
/packages/apps/Gallery2/src/com/android/gallery3d/util/ |
H A D | IdentityCache.java | 37 public Entry(K key, V value, ReferenceQueue<V> queue) { argument 39 mKey = key; 51 public synchronized V put(K key, V value) { argument 54 key, new Entry<K, V>(key, value, mQueue)); 58 public synchronized V get(K key) { argument 60 Entry<K, V> entry = mWeakMap.get(key);
|
/packages/providers/CalendarProvider/src/com/android/providers/calendar/ |
H A D | CalendarCache.java | 29 * Class for managing a persistent Cache of (key, value) pairs. The persistent storage used is 48 public static final String COLUMN_NAME_KEY = "key"; 62 * This exception is thrown when the cache encounter a null key or a null database reference 141 * Write a (key, value) pair in the Cache. 143 * @param key the key (must not be null) 145 * @throws CacheException when key is null 147 public void writeData(String key, String value) throws CacheException { argument 151 writeDataLocked(db, key, value); 154 Log.i(TAG, "Wrote (key, valu 170 writeDataLocked(SQLiteDatabase db, String key, String value) argument 200 readData(String key) argument 215 readDataLocked(SQLiteDatabase db, String key) argument [all...] |
/packages/apps/Contacts/src/com/android/contacts/util/ |
H A D | ExpirableCache.java | 97 /** Returns the value stored in the cache for a given key. */ 161 * Returns the cached value for the given key, or null if no value exists. 163 * The cached value gives access both to the value associated with the key and whether it is 171 * @param key the key to look up 173 public CachedValue<V> getCachedValue(K key) { argument 174 return mCache.get(key); 178 * Returns the value for the given key, or null if no value exists. 187 * @param key the key t 189 getPossiblyExpired(K key) argument 204 get(K key) argument 217 put(K key, V value) argument [all...] |
H A D | NameConverter.java | 62 for (String key : STRUCTURED_NAME_FIELDS) { 63 if (structuredName.containsKey(key)) { 64 appendQueryParameter(builder, key, structuredName.get(key)); 78 for (String key : STRUCTURED_NAME_FIELDS) { 79 if (values.containsKey(key)) { 80 appendQueryParameter(builder, key, values.getAsString(key)); 155 for (String key : mapValues.keySet()) { 156 contentValues.put(key, mapValue [all...] |
/packages/inputmethods/OpenWnn/src/jp/co/omronsoft/openwnn/ |
H A D | KeyboardView.java | 59 * detecting key presses and touch movements. 69 * Called when the user presses a key. This is sent before the {@link #onKey} is called. 71 * @param primaryCode the unicode of the key being pressed. If the touch is not on a valid 72 * key, the value will be zero. 77 * Called when the user releases a key. This is sent after the {@link #onKey} is called. 79 * @param primaryCode the code of the key that was released 84 * Send a key press to the listener. 85 * @param primaryCode this is the key that was pressed 87 * with the primary code being the first. If the primary key code is 89 * will include other characters that may be on the same key o 126 onLongPress(Keyboard.Key key) argument 878 getPreviewText(Key key) argument [all...] |