/aosp14/frameworks/base/services/permission/java/com/android/server/permission/access/collection/ |
H A D | List.kt | 19 inline fun <T> List<T>.allIndexed(predicate: (Int, T) -> Boolean): Boolean { 21 if (!predicate(index, element)) { 28 inline fun <T> List<T>.anyIndexed(predicate: (Int, T) -> Boolean): Boolean { 30 if (predicate(index, element)) { 49 inline fun <T> List<T>.noneIndexed(predicate: (Int, T) -> Boolean): Boolean { 51 if (predicate(index, element)) { 58 inline fun <T> MutableList<T>.removeAllIndexed(predicate: (Int, T) -> Boolean): Boolean { 61 if (predicate(index, element)) { 69 inline fun <T> MutableList<T>.retainAllIndexed(predicate: (Int, T) -> Boolean): Boolean { 72 if (!predicate(index, element)) {
|
H A D | IndexedList.kt | 21 inline fun <T> IndexedList<T>.allIndexed(predicate: (Int, T) -> Boolean): Boolean { 23 if (!predicate(index, element)) { 30 inline fun <T> IndexedList<T>.anyIndexed(predicate: (Int, T) -> Boolean): Boolean { 32 if (predicate(index, element)) { 63 inline fun <T> IndexedList<T>.noneIndexed(predicate: (Int, T) -> Boolean): Boolean { 65 if (predicate(index, element)) { 81 inline fun <T> IndexedList<T>.removeAllIndexed(predicate: (Int, T) -> Boolean): Boolean { 84 if (predicate(index, element)) { 92 inline fun <T> IndexedList<T>.retainAllIndexed(predicate: (Int, T) -> Boolean): Boolean { 95 if (!predicate(index, element)) {
|
H A D | IndexedSet.kt | 23 inline fun <T> IndexedSet<T>.allIndexed(predicate: (Int, T) -> Boolean): Boolean { 25 if (!predicate(index, element)) { 32 inline fun <T> IndexedSet<T>.anyIndexed(predicate: (Int, T) -> Boolean): Boolean { 34 if (predicate(index, element)) { 71 inline fun <T> IndexedSet<T>.noneIndexed(predicate: (Int, T) -> Boolean): Boolean { 73 if (predicate(index, element)) { 89 inline fun <T> IndexedSet<T>.removeAllIndexed(predicate: (Int, T) -> Boolean): Boolean { 92 if (predicate(index, element)) { 100 inline fun <T> IndexedSet<T>.retainAllIndexed(predicate: (Int, T) -> Boolean): Boolean { 103 if (!predicate(index, element)) {
|
H A D | IntSet.kt | 56 inline fun IntSet.allIndexed(predicate: (Int, Int) -> Boolean): Boolean { 58 if (!predicate(index, element)) { 65 inline fun IntSet.anyIndexed(predicate: (Int, Int) -> Boolean): Boolean { 67 if (predicate(index, element)) { 97 inline fun IntSet.noneIndexed(predicate: (Int, Int) -> Boolean): Boolean { 99 if (predicate(index, element)) { 122 inline fun IntSet.removeAllIndexed(predicate: (Int, Int) -> Boolean): Boolean { 125 if (predicate(index, element)) { 133 inline fun IntSet.retainAllIndexed(predicate: (Int, Int) -> Boolean): Boolean { 136 if (!predicate(index, element)) {
|
H A D | IndexedListSet.kt | 72 inline fun <T> IndexedListSet<T>.allIndexed(predicate: (Int, T) -> Boolean): Boolean { 74 if (!predicate(index, element)) { 81 inline fun <T> IndexedListSet<T>.anyIndexed(predicate: (Int, T) -> Boolean): Boolean { 83 if (predicate(index, element)) { 114 inline fun <T> IndexedListSet<T>.noneIndexed(predicate: (Int, T) -> Boolean): Boolean { 116 if (predicate(index, element)) { 132 inline fun <T> IndexedListSet<T>.removeAllIndexed(predicate: (Int, T) -> Boolean): Boolean { 135 if (predicate(index, element)) { 143 inline fun <T> IndexedListSet<T>.retainAllIndexed(predicate: (Int, T) -> Boolean): Boolean { 146 if (!predicate(index, element)) {
|
H A D | IntBooleanMap.kt | 23 inline fun IntBooleanMap.allIndexed(predicate: (Int, Int, Boolean) -> Boolean): Boolean { 25 if (!predicate(index, key, value)) { 32 inline fun IntBooleanMap.anyIndexed(predicate: (Int, Int, Boolean) -> Boolean): Boolean { 34 if (predicate(index, key, value)) { 98 inline fun IntBooleanMap.noneIndexed(predicate: (Int, Int, Boolean) -> Boolean): Boolean { 100 if (predicate(index, key, value)) { 143 inline fun IntBooleanMap.removeAllIndexed(predicate: (Int, Int, Boolean) -> Boolean): Boolean { 146 if (predicate(index, key, value)) { 154 inline fun IntBooleanMap.retainAllIndexed(predicate: (Int, Int, Boolean) -> Boolean): Boolean { 157 if (!predicate(index, key, value)) {
|
H A D | IntLongMap.kt | 23 inline fun IntLongMap.allIndexed(predicate: (Int, Int, Long) -> Boolean): Boolean { 25 if (!predicate(index, key, value)) { 32 inline fun IntLongMap.anyIndexed(predicate: (Int, Int, Long) -> Boolean): Boolean { 34 if (predicate(index, key, value)) { 98 inline fun IntLongMap.noneIndexed(predicate: (Int, Int, Long) -> Boolean): Boolean { 100 if (predicate(index, key, value)) { 143 inline fun IntLongMap.removeAllIndexed(predicate: (Int, Int, Long) -> Boolean): Boolean { 146 if (predicate(index, key, value)) { 154 inline fun IntLongMap.retainAllIndexed(predicate: (Int, Int, Long) -> Boolean): Boolean { 157 if (!predicate(index, key, value)) {
|
H A D | IntMap.kt | 23 inline fun <T> IntMap<T>.allIndexed(predicate: (Int, Int, T) -> Boolean): Boolean { 25 if (!predicate(index, key, value)) { 32 inline fun <T> IntMap<T>.anyIndexed(predicate: (Int, Int, T) -> Boolean): Boolean { 34 if (predicate(index, key, value)) { 99 inline fun <T> IntMap<T>.noneIndexed(predicate: (Int, Int, T) -> Boolean): Boolean { 101 if (predicate(index, key, value)) { 141 inline fun <T> IntMap<T>.removeAllIndexed(predicate: (Int, Int, T) -> Boolean): Boolean { 144 if (predicate(index, key, value)) { 152 inline fun <T> IntMap<T>.retainAllIndexed(predicate: (Int, Int, T) -> Boolean): Boolean { 155 if (!predicate(index, key, value)) {
|
H A D | IndexedMap.kt | 23 inline fun <K, V> IndexedMap<K, V>.allIndexed(predicate: (Int, K, V) -> Boolean): Boolean { 25 if (!predicate(index, key, value)) { 32 inline fun <K, V> IndexedMap<K, V>.anyIndexed(predicate: (Int, K, V) -> Boolean): Boolean { 34 if (predicate(index, key, value)) { 99 inline fun <K, V> IndexedMap<K, V>.noneIndexed(predicate: (Int, K, V) -> Boolean): Boolean { 101 if (predicate(index, key, value)) { 129 inline fun <K, V> IndexedMap<K, V>.removeAllIndexed(predicate: (Int, K, V) -> Boolean): Boolean { 132 if (predicate(index, key, value)) { 140 inline fun <K, V> IndexedMap<K, V>.retainAllIndexed(predicate: (Int, K, V) -> Boolean): Boolean { 143 if (!predicate(index, key, value)) {
|
/aosp14/frameworks/base/apct-tests/perftests/core/src/android/util/ |
H A D | ArraySetPerfTest.java | 128 Predicate<Integer> predicate = (i) -> i % 2 == 0; in testRemoveIf_Small_Base() local 142 Predicate<Integer> predicate = (i) -> false; in testRemoveIf_Small_RemoveNothing() local 149 set.removeIf(predicate); in testRemoveIf_Small_RemoveNothing() 157 Predicate<Integer> predicate = (i) -> true; in testRemoveIf_Small_RemoveAll() local 164 set.removeIf(predicate); in testRemoveIf_Small_RemoveAll() 179 set.removeIf(predicate); in testRemoveIf_Small_RemoveHalf() 205 Predicate<Integer> predicate = (i) -> false; in testRemoveIf_Large_RemoveNothing() local 212 set.removeIf(predicate); in testRemoveIf_Large_RemoveNothing() 220 Predicate<Integer> predicate = (i) -> true; in testRemoveIf_Large_RemoveAll() local 227 set.removeIf(predicate); in testRemoveIf_Large_RemoveAll() [all …]
|
/aosp14/frameworks/base/test-runner/src/android/test/suitebuilder/ |
H A D | TestPredicates.java | 64 public static <T> Predicate<T> not(Predicate<? super T> predicate) { in not() argument 65 return new NotPredicate<T>(predicate); in not() 69 private final Predicate<? super T> predicate; field in TestPredicates.NotPredicate 71 private NotPredicate(Predicate<? super T> predicate) { in NotPredicate() argument 72 this.predicate = predicate; in NotPredicate() 76 return !predicate.apply(t); in apply()
|
/aosp14/frameworks/base/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/utils/ |
H A D | NotificationListener.kt | 78 predicate: (StatusBarNotification) -> Boolean 81 return notifications.values.firstOrNull(predicate) 87 predicate: (StatusBarNotification) -> Boolean 90 return waitForResult(extractor = { it.notifications.values.firstOrNull(predicate) }) 96 fun waitForNotificationToDisappear(predicate: (StatusBarNotification) -> Boolean): Boolean { 97 return instance?.let { wait { it.notifications.values.none(predicate) } }
|
/aosp14/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/hardware/ |
H A D | InputManager.kt | 47 fun InputManager.findInputDevice(predicate: (InputDevice) -> Boolean): InputDevice? = 48 getInputDeviceSequence().find { predicate(it) } 59 fun InputManager.hasInputDevice(predicate: (InputDevice) -> Boolean): Boolean = 60 getInputDeviceSequence().any { predicate(it) }
|
/aosp14/frameworks/base/core/java/com/android/internal/util/ |
H A D | CollectionUtils.java | 67 if (predicate.test(item)) { in filter() 86 if (predicate.test(item)) { in filter() 92 if (predicate.test(item)) { in filter() 102 @Nullable Predicate<? super T> predicate) { in addIf() argument 105 if (predicate.test(item)) { in addIf() 256 java.util.function.Predicate<T> predicate) { in any() argument 257 return find(items, predicate) != null; in any() 266 return find(items, predicate) != null; in any() 278 if (predicate.test(item)) return item; in find() 297 if (predicate.test(item)) { in find() [all …]
|
/aosp14/frameworks/base/tests/SurfaceViewBufferTests/src/com/android/test/ |
H A D | SurfaceTracingTestBase.kt | 56 fun withTrace(predicate: (it: MainActivity) -> Unit): LayersTrace { 59 predicate(it) 64 fun withTrace(predicate: () -> Unit): LayersTrace { 66 predicate() 70 fun runOnUiThread(predicate: (it: MainActivity) -> Unit) { 72 predicate(it)
|
H A D | ScreenRecordTestBase.kt | 62 fun runOnUiThread(predicate: (it: MainActivity) -> Unit) { 64 predicate(mActivity) 71 predicate: (it: MainActivity) -> Unit 76 predicate(mActivity)
|
/aosp14/frameworks/base/core/tests/coretests/src/android/util/ |
H A D | LongSparseArrayTest.java | 46 final LongObjPredicate<Integer> predicate = (value, obj) -> (value < 0 && obj < 0); in testRemoveIf() local 47 sparseArray.removeIf(predicate); in testRemoveIf() 50 assertThat(predicate.test(sparseArray.keyAt(i), sparseArray.valueAt(i))) in testRemoveIf()
|
/aosp14/frameworks/base/core/java/android/widget/ |
H A D | DayPickerViewPager.java | 140 protected <T extends View> T findViewByPredicateTraversal(Predicate<View> predicate, in findViewByPredicateTraversal() argument 142 if (predicate.test(this)) { in findViewByPredicateTraversal() 150 final View v = current.findViewByPredicate(predicate); in findViewByPredicateTraversal() 161 final View v = child.findViewByPredicate(predicate); in findViewByPredicateTraversal()
|
/aosp14/frameworks/base/services/core/java/com/android/server/location/listeners/ |
H A D | ListenerMultiplexer.java | 319 protected final void removeRegistrationIf(@NonNull Predicate<TKey> predicate) { in removeRegistrationIf() argument 336 if (predicate.test(key)) { in removeRegistrationIf() 487 protected final boolean findRegistration(Predicate<TRegistration> predicate) { in findRegistration() argument 496 if (predicate.test(registration)) { in findRegistration() 512 protected final void updateRegistrations(@NonNull Predicate<TRegistration> predicate) { in updateRegistrations() argument 525 if (predicate.test(registration)) { in updateRegistrations() 541 @NonNull Predicate<TRegistration> predicate) { in updateRegistration() argument 557 if (predicate.test(registration)) { in updateRegistration()
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/globalactions/ |
H A D | GlobalActionsImeTest.java | 131 private static void waitUntil(String message, BooleanSupplier predicate) in waitUntil() argument 133 if (!waitUntil(predicate)) { in waitUntil() 138 private static boolean waitUntil(BooleanSupplier predicate) throws Exception { in waitUntil() argument 142 if (predicate.getAsBoolean()) { in waitUntil()
|
/aosp14/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/controllers/ |
H A D | IdleController.java | 127 Predicate<JobStatus> predicate) { in dumpControllerStateLocked() argument 134 if (!predicate.test(js)) { in dumpControllerStateLocked() 147 Predicate<JobStatus> predicate) { in dumpControllerStateLocked() argument 156 if (!predicate.test(js)) { in dumpControllerStateLocked()
|
H A D | StorageController.java | 158 Predicate<JobStatus> predicate) { in dumpControllerStateLocked() argument 165 if (!predicate.test(js)) { in dumpControllerStateLocked() 178 Predicate<JobStatus> predicate) { in dumpControllerStateLocked() argument 189 if (!predicate.test(js)) { in dumpControllerStateLocked()
|
/aosp14/frameworks/base/services/core/java/com/android/server/wm/ |
H A D | PersisterQueue.java | 119 synchronized <T extends WriteQueueItem> T findLastItem(Predicate<T> predicate, Class<T> clazz) { in findLastItem() argument 124 if (predicate.test(item)) { in findLastItem() 151 synchronized <T extends WriteQueueItem> void removeItems(Predicate<T> predicate, in removeItems() argument 157 if (predicate.test(item)) { in removeItems()
|
H A D | VisibleActivityProcessTracker.java | 86 private boolean match(int uid, Predicate<WindowProcessController> predicate) { in match() argument 90 if (wpc.mUid == uid && (predicate == null || predicate.test(wpc))) { in match()
|
/aosp14/frameworks/base/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/util/ |
H A D | Collections.kt | 51 suspend inline fun <T> Iterable<T>.asyncFilter(crossinline predicate: (T) -> Boolean): List<T> = 52 asyncMap { item -> item to predicate(item) }
|