/frameworks/base/core/java/com/android/internal/widget/remotecompose/core/operations/utilities/ |
D | IntMap.java | 26 private int[] mKeys; field in IntMap 31 mKeys = new int[DEFAULT_CAPACITY]; in IntMap() 32 Arrays.fill(mKeys, NOT_PRESENT); in IntMap() 40 Arrays.fill(mKeys, NOT_PRESENT); in clear() 47 if (mSize > mKeys.length * LOAD_FACTOR) { in put() 66 int index = hash(key) % mKeys.length; in insert() 67 while (mKeys[index] != NOT_PRESENT && mKeys[index] != key) { in insert() 68 index = (index + 1) % mKeys.length; in insert() 71 if (mKeys[index] == NOT_PRESENT) { in insert() 76 mKeys[index] = key; in insert() [all …]
|
/frameworks/base/core/java/android/view/inputmethod/ |
D | SparseRectFArray.java | 42 private final int[] mKeys; field in SparseRectFArray 60 mKeys = source.createIntArray(); in SparseRectFArray() 73 dest.writeIntArray(mKeys); in writeToParcel() 81 if (mKeys == null || mKeys.length == 0) { in hashCode() 84 int hash = mKeys.length; in hashCode() 108 return Arrays.equals(mKeys, that.mKeys) && Arrays.equals(mCoordinates, that.mCoordinates) in equals() 114 if (mKeys == null || mCoordinates == null || mFlagsArray == null) { in toString() 119 for (int i = 0; i < mKeys.length; i++) { in toString() 124 sb.append(mKeys[i]); in toString() 153 if (mKeys[mCount - 1] >= key) { in checkIndex() [all …]
|
/frameworks/base/core/java/android/util/ |
D | SparseBooleanArray.java | 65 mKeys = EmptyArray.INT; in SparseBooleanArray() 68 mKeys = ArrayUtils.newUnpaddedIntArray(initialCapacity); in SparseBooleanArray() 69 mValues = new boolean[mKeys.length]; in SparseBooleanArray() 79 clone.mKeys = mKeys.clone(); in clone() 100 int i = ContainerHelpers.binarySearch(mKeys, mSize, key); in get() 113 int i = ContainerHelpers.binarySearch(mKeys, mSize, key); in delete() 116 System.arraycopy(mKeys, i + 1, mKeys, i, mSize - (i + 1)); in delete() 128 System.arraycopy(mKeys, index + 1, mKeys, index, mSize - (index + 1)); in removeAt() 139 int i = ContainerHelpers.binarySearch(mKeys, mSize, key); in put() 146 mKeys = GrowingArrayUtils.insert(mKeys, mSize, i, key); in put() [all …]
|
D | SparseLongArray.java | 45 private int[] mKeys; field in SparseLongArray 65 mKeys = EmptyArray.INT; in SparseLongArray() 69 mKeys = new int[mValues.length]; in SparseLongArray() 79 clone.mKeys = mKeys.clone(); in clone() 100 int i = ContainerHelpers.binarySearch(mKeys, mSize, key); in get() 113 int i = ContainerHelpers.binarySearch(mKeys, mSize, key); in delete() 132 System.arraycopy(mKeys, index + size, mKeys, index, mSize - (index + size)); in removeAtRange() 141 System.arraycopy(mKeys, index + 1, mKeys, index, mSize - (index + 1)); in removeAt() 152 int i = ContainerHelpers.binarySearch(mKeys, mSize, key); in put() 159 mKeys = GrowingArrayUtils.insert(mKeys, mSize, i, key); in put() [all …]
|
D | LongSparseLongArray.java | 52 private long[] mKeys; field in LongSparseLongArray 74 mKeys = EmptyArray.LONG; in LongSparseLongArray() 77 mKeys = ArrayUtils.newUnpaddedLongArray(initialCapacity); in LongSparseLongArray() 78 mValues = new long[mKeys.length]; in LongSparseLongArray() 88 clone.mKeys = mKeys.clone(); in clone() 109 int i = ContainerHelpers.binarySearch(mKeys, mSize, key); in get() 122 int i = ContainerHelpers.binarySearch(mKeys, mSize, key); in delete() 133 System.arraycopy(mKeys, index + 1, mKeys, index, mSize - (index + 1)); in removeAt() 144 int i = ContainerHelpers.binarySearch(mKeys, mSize, key); in put() 151 mKeys = GrowingArrayUtils.insert(mKeys, mSize, i, key); in put() [all …]
|
D | SparseIntArray.java | 50 private int[] mKeys; field in SparseIntArray 72 mKeys = EmptyArray.INT; in SparseIntArray() 75 mKeys = ArrayUtils.newUnpaddedIntArray(initialCapacity); in SparseIntArray() 76 mValues = new int[mKeys.length]; in SparseIntArray() 86 clone.mKeys = mKeys.clone(); in clone() 107 int i = ContainerHelpers.binarySearch(mKeys, mSize, key); in get() 120 int i = ContainerHelpers.binarySearch(mKeys, mSize, key); in delete() 131 System.arraycopy(mKeys, index + 1, mKeys, index, mSize - (index + 1)); in removeAt() 142 int i = ContainerHelpers.binarySearch(mKeys, mSize, key); in put() 149 mKeys = GrowingArrayUtils.insert(mKeys, mSize, i, key); in put() [all …]
|
D | LongSparseArray.java | 63 private long[] mKeys; field in LongSparseArray 83 mKeys = EmptyArray.LONG; in LongSparseArray() 86 mKeys = ArrayUtils.newUnpaddedLongArray(initialCapacity); in LongSparseArray() 98 clone.mKeys = mKeys.clone(); in clone() 120 int i = ContainerHelpers.binarySearch(mKeys, mSize, key); in get() 133 int i = ContainerHelpers.binarySearch(mKeys, mSize, key); in delete() 155 if (mValues[i] != DELETED && filter.test(mKeys[i], (E) mValues[i])) { in removeIf() 187 long[] keys = mKeys; in gc() 222 final int index = Arrays.binarySearch(mKeys, 0, size(), key); in firstIndexOnOrAfter() 249 int i = ContainerHelpers.binarySearch(mKeys, mSize, key); in put() [all …]
|
D | SparseArray.java | 63 private int[] mKeys; field in SparseArray 85 mKeys = EmptyArray.INT; in SparseArray() 89 mKeys = new int[mValues.length]; in SparseArray() 100 clone.mKeys = mKeys.clone(); in clone() 133 int i = ContainerHelpers.binarySearch(mKeys, mSize, key); in get() 146 int i = ContainerHelpers.binarySearch(mKeys, mSize, key); in delete() 161 int i = ContainerHelpers.binarySearch(mKeys, mSize, key); in removeReturnOld() 222 int[] keys = mKeys; in gc() 259 int i = ContainerHelpers.binarySearch(mKeys, mSize, key); in put() 267 mKeys[i] = key; in put() [all …]
|
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/util/ |
D | SparseWeakArray.java | 63 mKeys = ArrayUtils.newUnpaddedLongArray(initialCapacity); in SparseWeakArray() 64 mValues = new WeakReference[mKeys.length]; in SparseWeakArray() 81 int i = binarySearch(mKeys, 0, mSize, key); in get() 94 int i = binarySearch(mKeys, 0, mSize, key); in delete() 124 long[] keys = mKeys; in gc() 153 int i = binarySearch(mKeys, 0, mSize, key); in put() 161 mKeys[i] = key; in put() 166 if (mSize >= mKeys.length && (mGarbage || hasReclaimedRefs())) { in put() 170 i = ~binarySearch(mKeys, 0, mSize, key); in put() 173 mKeys = GrowingArrayUtils.insert(mKeys, mSize, i, key); in put() [all …]
|
/frameworks/base/services/core/java/com/android/server/notification/ |
D | TimeToLiveHelper.java | 57 final TreeSet<Pair<Long, String>> mKeys; field in TimeToLiveHelper 63 mKeys = new TreeSet<>((left, right) -> Long.compare(left.first, right.first)); in TimeToLiveHelper() 76 pw.println(indent + "mKeys " + mKeys); in dump() 100 final Long currentEarliestTime = mKeys.isEmpty() ? null : mKeys.first().first; in scheduleTimeoutLocked() 107 mKeys.add(Pair.create(timeoutAfter, record.getKey())); in scheduleTimeoutLocked() 110 mKeys.add(Pair.create(timeoutAfter, record.getKey())); in scheduleTimeoutLocked() 121 if (!mKeys.isEmpty() && key.equals(mKeys.first().second)) { in removeMatchingEntry() 125 mKeys.remove(mKeys.first()); in removeMatchingEntry() 130 for (Pair<Long, String> entry : mKeys) { in removeMatchingEntry() 137 mKeys.remove(trackedPair); in removeMatchingEntry() [all …]
|
/frameworks/base/services/core/java/com/android/server/utils/ |
D | WatchedSparseBooleanMatrix.java | 116 private int[] mKeys; field in WatchedSparseBooleanMatrix 162 mKeys = ArrayUtils.newUnpaddedIntArray(mOrder); in WatchedSparseBooleanMatrix() 181 mKeys = src.mKeys.clone(); in copyFrom() 265 System.arraycopy(mKeys, index + 1, mKeys, index, mSize - (index + 1)); in removeAt() 266 mKeys[mSize - 1] = 0; in removeAt() 290 System.arraycopy(mKeys, toIndex, mKeys, fromIndex, mSize - toIndex); in removeRange() 293 mKeys[i] = 0; in removeRange() 330 return mKeys[index]; in keyAt() 387 return binarySearch(mKeys, mSize, key); in indexOfKey() 402 int i = binarySearch(mKeys, mSize, key); in indexOfKey() [all …]
|
/frameworks/base/core/java/android/os/health/ |
D | HealthKeys.java | 86 private final int[][] mKeys = new int[TYPE_COUNT][]; field in HealthKeys.Constants 103 final SortedIntArray[] keys = new SortedIntArray[mKeys.length]; in Constants() 127 mKeys[i] = keys[i].getArray(); in Constants() 149 return mKeys[type].length; in getSize() 163 final int index = Arrays.binarySearch(mKeys[type], key); in getIndex() 176 return mKeys[type]; in getKeys()
|
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ |
D | TimeToLiveHelperTest.java | 91 assertThat(mHelper.mKeys).hasSize(1); in testTimeout() 104 assertThat(mHelper.mKeys).isEmpty(); in testTimeoutExpires() 121 assertThat(mHelper.mKeys).hasSize(1); in testTimeoutExpires_twoEntries() 133 assertThat(mHelper.mKeys).hasSize(1); in testTimeout_earlierEntryAddedSecond() 141 assertThat(mHelper.mKeys).hasSize(2); in testTimeout_earlierEntryAddedSecond() 145 assertThat(mHelper.mKeys.first().second).isEqualTo(first.getKey()); in testTimeout_earlierEntryAddedSecond() 160 assertThat(mHelper.mKeys).hasSize(2); in testTimeout_earlierEntryAddedFirst() 161 assertThat(mHelper.mKeys.first().second).isEqualTo(first.getKey()); in testTimeout_earlierEntryAddedFirst() 179 assertThat(mHelper.mKeys).hasSize(1); in testTimeout_updateEarliestEntry() 208 assertThat(mHelper.mKeys).hasSize(2); in testTimeout_twoEntries_updateEarliestEntry() [all …]
|
D | NotificationListenerServiceTest.java | 146 for (int i = 0; i < mKeys.length; i++) { in testRanking() 147 String key = mKeys[i]; in testRanking() 217 private String[] mKeys = new String[] { "key", "key1", "key2", "key3", "key4"}; field in NotificationListenerServiceTest 220 Ranking[] rankings = new Ranking[mKeys.length]; in generateUpdate() 221 for (int i = 0; i < mKeys.length; i++) { in generateUpdate() 222 final String key = mKeys[i]; in generateUpdate()
|
/frameworks/base/core/tests/coretests/src/android/util/ |
D | SparseLongArrayTest.java | 43 private int[] mKeys; field in SparseLongArrayTest 64 mSparseLongArray.get(mKeys[i], Long.MIN_VALUE)); in assertRemoved() 67 mSparseLongArray.get(mKeys[i])); in assertRemoved() 92 mKeys = generateRandomKeys(TEST_SIZE); in setUp() 96 mSparseLongArray.put(mKeys[i], mValues[i]); in setUp()
|
/frameworks/base/core/java/android/inputmethodservice/ |
D | Keyboard.java | 131 private List<Key> mKeys; field in Keyboard 181 ArrayList<Key> mKeys = new ArrayList<Key>(); field in Keyboard.Row 554 mKeys = new ArrayList<Key>(); in Keyboard() 577 mKeys = new ArrayList<Key>(); in Keyboard() 627 mKeys.add(key); in Keyboard() 628 row.mKeys.add(key); in Keyboard() 642 int numKeys = row.mKeys.size(); in resize() 646 Key key = row.mKeys.get(keyIndex); in resize() 656 Key key = row.mKeys.get(keyIndex); in resize() 670 return mKeys; in getKeys() [all …]
|
D | KeyboardView.java | 168 private Key[] mKeys; field in KeyboardView 489 mKeys = keys.toArray(new Key[keys.size()]); in setKeyboard() 629 final Key[] keys = mKeys; in computeProximityThreshold() 687 final Key[] keys = mKeys; in onBufferDraw() 778 final Key[] keys = mKeys; in getKeyIndices() 829 if (index != NOT_A_KEY && index < mKeys.length) { in detectAndSendKey() 830 final Key key = mKeys[index]; in detectAndSendKey() 877 final Key[] keys = mKeys; in showPreview() 928 final Key[] keys = mKeys; in showKey() 929 if (keyIndex < 0 || keyIndex >= mKeys.length) return; in showKey() [all …]
|
/frameworks/native/services/inputflinger/tests/ |
D | UinputDevice.cpp | 81 : UinputDevice(name, productId), mKeys(keys.begin(), keys.end()) {} in UinputKeyboard() 90 std::for_each(mKeys.begin(), mKeys.end(), [fd](int key) { in configureDevice() 103 if (mKeys.find(key) == mKeys.end()) { in pressKey() 111 if (mKeys.find(key) == mKeys.end()) { in releaseKey()
|
/frameworks/base/core/java/android/app/backup/ |
D | WallpaperBackupHelper.java | 52 private final String[] mKeys; field in WallpaperBackupHelper 66 mKeys = keys; in WallpaperBackupHelper() 93 if (isKeyInList(key, mKeys)) { in restoreEntity()
|
D | BlobBackupHelper.java | 47 private final String[] mKeys; field in BlobBackupHelper 51 mKeys = keys; in BlobBackupHelper() 249 for (String key : mKeys) { in performBackup() 291 for (which = 0; which < mKeys.length; which++) { in restoreEntity() 292 if (key.equals(mKeys[which])) { in restoreEntity() 296 if (which >= mKeys.length) { in restoreEntity()
|
/frameworks/base/core/tests/coretests/src/android/service/notification/ |
D | NotificationRankingUpdateTest.java | 88 public static String[] mKeys = new String[] { "key", "key1", "key2", "key3", "key4"}; field in NotificationRankingUpdateTest 97 new NotificationListenerService.Ranking[mKeys.length]; in generateUpdate() 98 for (int i = 0; i < mKeys.length; i++) { in generateUpdate() 99 final String key = mKeys[i]; in generateUpdate() 507 generateUpdate(getContext()).getRankingMap().getRawRankingObject(mKeys[0]); in testRanking_parcel() 526 nru2.getRankingMap().getRawRankingObject(mKeys[0]); in testRankingUpdate_equals_legacy() 563 nru.getRankingMap().getRawRankingObject(mKeys[0]), in testRankingUpdate_rankingConstructor() 564 nru.getRankingMap().getRawRankingObject(mKeys[1]), in testRankingUpdate_rankingConstructor() 565 nru.getRankingMap().getRawRankingObject(mKeys[2]), in testRankingUpdate_rankingConstructor() 566 nru.getRankingMap().getRawRankingObject(mKeys[3]), in testRankingUpdate_rankingConstructor() [all …]
|
/frameworks/base/services/core/java/com/android/server/accounts/ |
D | TokenCache.java | 85 private final List<Key> mKeys; field in TokenCache.TokenLruCache.Evictor 88 mKeys = new ArrayList<>(); in Evictor() 92 mKeys.add(k); in add() 96 for (Key k : mKeys) { in evict()
|
/frameworks/base/tests/FrameworkPerf/src/com/android/frameworkperf/ |
D | TestService.java | 1133 String[] mKeys; field in TestService.GenericMapOp 1142 mKeys = new String[mSize]; in onInit() 1151 mKeys[i] = builder.toString(); in onInit() 1169 map.put(mKeys[i], mValues[i]); in onRun() 1183 map.put(mKeys[i], mValues[i]); in onRun() 1197 map.put(mKeys[i], mValues[i]); in onRun() 1211 map.put(mKeys[i], mValues[i]); in onRun() 1225 map.put(mKeys[i], mValues[i]); in onRun() 1239 map.put(mKeys[i], mValues[i]); in onRun() 1272 mHashMap.put(mKeys[i], mValues[i]); in onInit() [all …]
|
/frameworks/native/libs/input/ |
D | KeyCharacterMap.cpp | 151 mKeys.clear(); in clear() 173 for (const auto& [keyCode, key] : overlay.mKeys) { in combine() 174 mKeys.insert_or_assign(keyCode, key); in combine() 422 auto it = mKeys.find(keyCode); in getKey() 423 if (it != mKeys.end()) { in getKey() 478 for (const auto& [keyCode, key] : mKeys) { in findKey() 657 map->mKeys.emplace(keyCode, std::move(key)); in readFromParcel() 711 size_t numKeys = mKeys.size(); in writeToParcel() 713 for (const auto& [keyCode, key] : mKeys) { in writeToParcel() 929 if (mMap->mKeys.find(*keyCode) != mMap->mKeys.end()) { in parseKey() [all …]
|
/frameworks/base/media/java/android/media/ |
D | MediaFormat.java | 2153 private Set<String> mKeys; field in MediaFormat.FilteredMappedKeySet 2165 mKeys = mMap.keySet(); in FilteredMappedKeySet() 2174 return keepKey(key) && mKeys.contains(key); in contains() 2183 if (keepKey(key) && mKeys.remove(key)) { in remove() 2200 mKeys.stream().filter(k -> keepKey(k)).collect(Collectors.toList()).iterator(); in KeyIterator() 2228 return (int) mKeys.stream().filter(this::keepKey).count(); in size()
|