Home
last modified time | relevance | path

Searched refs:T (Results 1 – 25 of 1020) sorted by relevance

12345678910>>...41

/aosp14/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/util/mockito/
H A DKotlinMockitoHelpers.kt39 fun <T> eq(obj: T): T = Mockito.eq<T>(obj)
47 fun <T> any(type: Class<T>): T = Mockito.any<T>(type)
48 inline fun <reified T> any(): T = any(T::class.java)
56 fun <T> argThat(matcher: ArgumentMatcher<T>): T = Mockito.argThat(matcher)
61 inline fun <reified T> nullable(): T? = Mockito.nullable(T::class.java)
69 fun <T> capture(argumentCaptor: ArgumentCaptor<T>): T = argumentCaptor.capture()
86 inline fun <reified T : Any> mock(apply: T.() -> Unit = {}): T = Mockito.mock(T::class.java)
94 fun <T> whenever(methodCall: T): OngoingStubbing<T> = `when`(methodCall)
95 fun <T> Stubber.whenever(mock: T): T = `when`(mock)
133 inline fun <reified T : Any> withArgCaptor(block: KotlinArgumentCaptor<T>.() -> Unit): T =
[all …]
/aosp14/frameworks/base/libs/dream/lowlight/tests/src/com/android/dream/lowlight/utils/
H A DKotlinMockitoHelpers.kt16 fun <T> eq(obj: T): T = Mockito.eq<T>(obj)
24 fun <T> any(type: Class<T>): T = Mockito.any<T>(type)
25 inline fun <reified T> any(): T = any(T::class.java)
33 fun <T> argThat(matcher: ArgumentMatcher<T>): T = Mockito.argThat(matcher)
38 inline fun <reified T> nullable(): T? = Mockito.nullable(T::class.java)
46 fun <T> capture(argumentCaptor: ArgumentCaptor<T>): T = argumentCaptor.capture()
63 inline fun <reified T : Any> mock(apply: T.() -> Unit = {}): T = Mockito.mock(T::class.java)
71 fun <T> whenever(methodCall: T): OngoingStubbing<T> = `when`(methodCall)
72 fun <T> Stubber.whenever(mock: T): T = `when`(mock)
110 inline fun <reified T : Any> withArgCaptor(block: KotlinArgumentCaptor<T>.() -> Unit): T =
[all …]
/aosp14/system/core/libutils/include/utils/
H A DStrongPointer.h195 sp<T> sp<T>::make(Args&&... args) { in make()
204 sp<T> sp<T>::fromExisting(T* other) { in fromExisting()
216 sp<T>::sp(T* other) in sp()
232 sp<T>& sp<T>::operator=(T* other) {
245 sp<T>::sp(const sp<T>& other) in sp()
271 sp<T> sp<T>::cast(const sp<U>& other) { in cast()
282 sp<T>& sp<T>::operator =(const sp<T>& other) {
294 sp<T>& sp<T>::operator=(sp<T>&& other) noexcept {
326 sp<T>& sp<T>::operator =(U* other) {
337 void sp<T>::force_set(T* other) { in force_set()
[all …]
H A DFlattenable.h125 template<typename T>
127 return static_cast<T const*>(this)->T::getFlattenedSize(); in getFlattenedSize()
129 template<typename T>
131 return static_cast<T const*>(this)->T::getFdCount(); in getFdCount()
133 template<typename T>
172 return static_cast<T const*>(this)->T::isFixedSize(); in isFixedSize()
176 return static_cast<T const*>(this)->T::getFlattenedSize(); in getFlattenedSize()
180 return static_cast<T const*>(this)->T::flatten(buffer, size); in flatten()
184 return static_cast<T*>(this)->T::unflatten(buffer, size); in unflatten()
208 memcpy(buffer, static_cast<T const*>(this), sizeof(T)); in flatten()
[all …]
H A DRefBase.h541 wp<T> wp<T>::fromExisting(T* other) { in fromExisting()
555 wp<T>::wp(T* other) in wp()
568 wp<T>& wp<T>::operator=(T* other) {
578 wp<T>& wp<T>::operator=(U* other) {
588 wp<T>::wp(const wp<T>& other) in wp()
595 wp<T>::wp(const sp<T>& other) in wp()
627 wp<T>& wp<T>::operator = (const wp<T>& other)
639 wp<T>& wp<T>::operator = (const sp<T>& other)
651 wp<T>& wp<T>::operator = (const wp<U>& other)
663 wp<T>& wp<T>::operator = (const sp<U>& other)
[all …]
/aosp14/frameworks/base/services/permission/java/com/android/server/permission/access/collection/
H A DIndexedSet.kt21 typealias IndexedSet<T> = ArraySet<T>
23 inline fun <T> IndexedSet<T>.allIndexed(predicate: (Int, T) -> Boolean): Boolean {
32 inline fun <T> IndexedSet<T>.anyIndexed(predicate: (Int, T) -> Boolean): Boolean {
42 inline fun <T> IndexedSet<T>.copy(): IndexedSet<T> = IndexedSet(this)
45 inline fun <T> IndexedSet<T>.elementAt(index: Int): T = valueAt(index)
47 inline fun <T> IndexedSet<T>.forEachIndexed(action: (Int, T) -> Unit) {
53 inline fun <T> IndexedSet<T>.forEachReversedIndexed(action: (Int, T) -> Unit) {
63 inline operator fun <T> IndexedSet<T>.minus(element: T): IndexedSet<T> =
67 inline operator fun <T> IndexedSet<T>.minusAssign(element: T) {
81 inline operator fun <T> IndexedSet<T>.plus(element: T): IndexedSet<T> =
[all …]
H A DIntMap.kt21 typealias IntMap<T> = SparseArray<T>
23 inline fun <T> IntMap<T>.allIndexed(predicate: (Int, Int, T) -> Boolean): Boolean {
41 inline fun <T> IntMap<T>.copy(copyValue: (T) -> T): IntMap<T> =
55 inline fun <T> IntMap<T>.forEachIndexed(action: (Int, Int, T) -> Unit) {
73 inline fun <T> IntMap<T>.forEachValueIndexed(action: (Int, T) -> Unit) {
79 inline fun <T> IntMap<T>.getOrPut(key: Int, defaultValue: () -> T): T {
85 inline fun <T> IntMap<T>?.getWithDefault(key: Int, defaultValue: T): T {
91 inline val <T> IntMap<T>.lastIndex: Int
109 inline fun <T> IntMap<T>.putWithDefault(key: Int, value: T, defaultValue: T): T {
130 fun <T> IntMap<T>.removeReturnOld(key: Int): T? {
[all …]
H A DIndexedListSet.kt72 inline fun <T> IndexedListSet<T>.allIndexed(predicate: (Int, T) -> Boolean): Boolean {
81 inline fun <T> IndexedListSet<T>.anyIndexed(predicate: (Int, T) -> Boolean): Boolean {
90 inline fun <T> IndexedListSet<T>.forEachIndexed(action: (Int, T) -> Unit) {
96 inline fun <T> IndexedListSet<T>.forEachReversedIndexed(action: (Int, T) -> Unit) {
102 inline val <T> IndexedListSet<T>.lastIndex: Int
106 inline operator fun <T> IndexedListSet<T>.minus(element: T): IndexedListSet<T> =
110 inline operator fun <T> IndexedListSet<T>.minusAssign(element: T) {
114 inline fun <T> IndexedListSet<T>.noneIndexed(predicate: (Int, T) -> Boolean): Boolean {
124 inline operator fun <T> IndexedListSet<T>.plus(element: T): IndexedListSet<T> =
128 inline operator fun <T> IndexedListSet<T>.plusAssign(element: T) {
[all …]
H A DIndexedList.kt19 typealias IndexedList<T> = ArrayList<T>
21 inline fun <T> IndexedList<T>.allIndexed(predicate: (Int, T) -> Boolean): Boolean {
30 inline fun <T> IndexedList<T>.anyIndexed(predicate: (Int, T) -> Boolean): Boolean {
40 inline fun <T> IndexedList<T>.copy(): IndexedList<T> = IndexedList(this)
42 inline fun <T> IndexedList<T>.forEachIndexed(action: (Int, T) -> Unit) {
48 inline fun <T> IndexedList<T>.forEachReversedIndexed(action: (Int, T) -> Unit) {
55 inline operator fun <T> IndexedList<T>.minus(element: T): IndexedList<T> =
59 inline operator fun <T> IndexedList<T>.minusAssign(element: T) {
63 inline fun <T> IndexedList<T>.noneIndexed(predicate: (Int, T) -> Boolean): Boolean {
73 inline operator fun <T> IndexedList<T>.plus(element: T): IndexedList<T> =
[all …]
H A DList.kt19 inline fun <T> List<T>.allIndexed(predicate: (Int, T) -> Boolean): Boolean {
28 inline fun <T> List<T>.anyIndexed(predicate: (Int, T) -> Boolean): Boolean {
37 inline fun <T> List<T>.forEachIndexed(action: (Int, T) -> Unit) {
43 inline fun <T> List<T>.forEachReversedIndexed(action: (Int, T) -> Unit) {
49 inline fun <T> List<T>.noneIndexed(predicate: (Int, T) -> Boolean): Boolean {
58 inline fun <T> MutableList<T>.removeAllIndexed(predicate: (Int, T) -> Boolean): Boolean {
69 inline fun <T> MutableList<T>.retainAllIndexed(predicate: (Int, T) -> Boolean): Boolean {
/aosp14/frameworks/base/cmds/idmap2/include/idmap2/
H A DResult.h49 template <typename T>
66 T& operator*() &;
69 T* operator->() &;
80 template <typename T>
81 Result<T>::Result(const T& value) : data_(std::in_place_type<T>, value) { in Result()
84 template <typename T>
85 Result<T>::Result(T&& value) noexcept : data_(std::in_place_type<T>, std::forward<T>(value)) { in Result()
103 constexpr const T& Result<T>::operator*() const& {
109 T& Result<T>::operator*() & {
115 constexpr const T* Result<T>::operator->() const& {
[all …]
/aosp14/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/
H A DCameraErrorCollector.java91 public <T> void checkThat(final T value, final Matcher<T> matcher) { in checkThat()
147 public <T> boolean expectEquals(String msg, T expected, T actual) { in expectEquals()
169 public <T> boolean expectNotEquals(String msg, T expected, T actual) { in expectNotEquals()
189 public <T> boolean expectEquals(String msg, T[] expected, T[] actual) { in expectEquals()
214 public <T> boolean expectNotEquals(String msg, T[] expected, T[] actual) { in expectNotEquals()
338 List<T> list, T min) { in expectValuesGreaterOrEqual()
367 T min, T max) { in expectValuesInRange()
385 T min, T max) { in expectValuesInRange()
416 T min, T max) { in expectInRange()
954 public <T> void expectContains(String reason, T[] values, T expected) { in expectContains()
[all …]
/aosp14/frameworks/base/core/java/com/android/internal/util/
H A DCollectionUtils.java62 public static @NonNull <T> List<T> filter(@Nullable List<T> list, in filter()
77 public static @NonNull <T> Set<T> filter(@Nullable Set<T> set, in filter()
273 public static @Nullable <T> T find(@Nullable List<T> items, in find()
287 public static @Nullable <T> T find(@Nullable Set<T> cur, in find()
318 public static @NonNull <T> List<T> add(@Nullable List<T> cur, T val) { in add()
330 public static @NonNull <T> List<T> add(@Nullable List<T> cur, int index, T val) { in add()
342 public static @NonNull <T> Set<T> addAll(@Nullable Set<T> cur, @Nullable Collection<T> val) { in addAll()
356 public static @NonNull <T> Set<T> add(@Nullable Set<T> cur, T val) { in add()
379 public static @NonNull <T> List<T> remove(@Nullable List<T> cur, T val) { in remove()
390 public static @NonNull <T> Set<T> remove(@Nullable Set<T> cur, T val) { in remove()
[all …]
H A DArrayUtils.java121 public static <T> T[] emptyArray(Class<T> kind) { in emptyArray()
142 public static @NonNull <T> T[] emptyIfNull(@Nullable T[] items, Class<T> kind) { in emptyIfNull()
362 public static @NonNull <T> T[] concat(Class<T> kind, @Nullable T[]... arrays) { in concat()
433 public static @NonNull <T> T[] appendElement(Class<T> kind, @Nullable T[] array, T element) { in appendElement()
441 public static @NonNull <T> T[] appendElement(Class<T> kind, @Nullable T[] array, T element, in appendElement()
463 public static @Nullable <T> T[] removeElement(Class<T> kind, @Nullable T[] array, T element) { in removeElement()
628 public static @NonNull <T> ArraySet<T> add(@Nullable ArraySet<T> cur, T val) { in add()
650 public static @Nullable <T> ArraySet<T> remove(@Nullable ArraySet<T> cur, T val) { in remove()
662 public static @NonNull <T> ArrayList<T> add(@Nullable ArrayList<T> cur, T val) { in add()
819 public static <T> T[] filterNotNull(T[] val, IntFunction<T[]> arrayConstructor) { in filterNotNull()
[all …]
/aosp14/frameworks/base/media/mca/filterpacks/native/base/
H A Dvec_types.h26 T data[dim];
28 VecBase<T,dim>& operator = (const VecBase<T, dim> &x) {
52 Vec<T,dim>& operator = (const Vec<T, dim> &x) {
59 Vec<T, dim> operator + (const Vec<T,dim> &x, const Vec<T,dim> &y) {
67 Vec<T, dim> operator - (const Vec<T,dim> &x, const Vec<T,dim> &y) {
75 Vec<T, dim> operator * (const Vec<T,dim> &x, const Vec<T,dim> &y) {
83 Vec<T, dim> operator / (const Vec<T,dim> &x, const Vec<T,dim> &y) {
91 T dot(const Vec<T,dim> &x, const Vec<T,dim> &y) { in dot() argument
99 Vec<T, dim> operator * (const Vec<T,dim> &x, T scale) {
107 Vec<T, dim> operator / (const Vec<T,dim> &x, T scale) {
[all …]
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
H A DExtensionController.java29 <T> ExtensionBuilder<T> newExtension(Class<T> cls); in newExtension()
31 interface Extension<T> {
32 T get(); in get()
40 T reload(); in reload()
51 ExtensionBuilder<T> withTunerFactory(TunerFactory<T> factory); in withTunerFactory()
52 <P extends T> ExtensionBuilder<T> withPlugin(Class<P> cls); in withPlugin()
53 <P extends T> ExtensionBuilder<T> withPlugin(Class<P> cls, String action); in withPlugin()
56 ExtensionBuilder<T> withDefault(Supplier<T> def); in withDefault()
57 ExtensionBuilder<T> withCallback(Consumer<T> callback); in withCallback()
58 ExtensionBuilder<T> withUiMode(int mode, Supplier<T> def); in withUiMode()
[all …]
H A DExtensionControllerImpl.java73 public <T> ExtensionBuilder<T> newExtension(Class<T> cls) { in newExtension()
78 T get(); in get()
112 public ExtensionController.ExtensionBuilder<T> withDefault(Supplier<T> def) { in withDefault()
147 private class ExtensionImpl<T> implements ExtensionController.Extension<T> {
150 private T mItem;
158 public T get() { in get()
268 private class TunerItem<T> implements Item<T>, Tunable {
301 private class UiModeItem<T> implements Item<T>, ConfigurationListener {
342 private class FeatureItem<T> implements Item<T> {
368 private class Default<T> implements Item<T> {
[all …]
/aosp14/frameworks/base/telephony/common/com/android/internal/telephony/util/
H A DArrayUtils.java40 public static <T> T[] appendElement(Class<T> kind, @Nullable T[] array, T element) { in appendElement()
55 public static <T> T[] appendElement(Class<T> kind, @Nullable T[] array, T element, in appendElement()
57 final T[] result; in appendElement()
82 public static <T> T[] concatElements(Class<T> kind, @Nullable T[]... arrays) { in concatElements()
88 for (T[] item : arrays) { in concatElements()
101 final T[] all = (T[]) Array.newInstance(kind, totalLength); in concatElements()
113 private static @NonNull <T> T[] createEmptyArray(Class<T> kind) { in createEmptyArray()
146 public static <T> boolean contains(@Nullable Collection<T> cur, T val) { in contains()
179 public static <T> boolean contains(@Nullable T[] array, T value) { in contains()
187 public static <T> int indexOf(@Nullable T[] array, T value) { in indexOf()
[all …]
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/util/kotlin/
H A DFlow.kt42 fun <T, R> Flow<T>.pairwiseBy(transform: suspend (old: T, new: T) -> R): Flow<R> = flow {
60 fun <T, R> Flow<T>.pairwiseBy(
76 fun <T, R> Flow<T>.pairwiseBy(
88 fun <T> Flow<T>.pairwise(): Flow<WithPrev<T>> = pairwiseBy(::WithPrev)
96 fun <T> Flow<T>.pairwise(initialValue: T): Flow<WithPrev<T>> = pairwiseBy(initialValue, ::WithPrev)
99 data class WithPrev<T>(val previousValue: T, val newValue: T)
112 fun <T, R> Flow<Set<T>>.setChangesBy(
117 .pairwiseBy { old: Set<T>, new: Set<T> ->
135 fun <T> Flow<Set<T>>.setChanges(emitFirstEvent: Boolean = true): Flow<SetChanges<T>> =
205 fun <T> Flow<T>.throttle(periodMs: Long): Flow<T> = this.throttle(periodMs, SystemClockImpl())
[all …]
/aosp14/frameworks/base/libs/hwui/utils/
H A DLinearAllocator.h59 template <class T>
72 T* ret = new (allocImpl(sizeof(T))) T(std::forward<Params>(params)...); in create()
74 auto dtor = [](void* ret) { ((T*)ret)->~T(); }; in create()
87 template <class T>
91 return reinterpret_cast<T*>(allocImpl(sizeof(T) * count)); in create_trivial_array()
103 template <class T>
155 template <class T>
176 return (T*)(linearAllocator.alloc<void*>(num * sizeof(T)));
198 template <class T>
199 class LsaVector : public std::vector<T, LinearStdAllocator<T>> {
[all …]
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/util/
H A DSparseArrayUtils.kt26 fun <T> Sequence<Pair<Int, T>>.toSparseArray(size: Int = -1): SparseArray<T> {
28 size < 0 -> SparseArray<T>()
29 else -> SparseArray<T>(size)
44 inline fun <T> Array<T>.associateByToSparseArray(
45 crossinline keySelector: (T) -> Int
46 ): SparseArray<T> {
57 inline fun <T, R> Grouping<T, Int>.foldToSparseArray(
60 crossinline operation: (R, T) -> R
78 fun <T> SparseArray<T>.asMap(): Map<Int, T> = SparseArrayMapWrapper(this)
82 ) : Map<Int, T> {
[all …]
/aosp14/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/utils/leaks/
H A DFakeExtensionController.java35 public <T> ExtensionBuilder<T> newExtension(Class<T> cls) { in newExtension()
41 private class FakeExtensionBuilder<T> implements ExtensionBuilder<T> {
49 public ExtensionBuilder<T> withTunerFactory(TunerFactory<T> factory) { in withTunerFactory()
54 public <P extends T> ExtensionBuilder<T> withPlugin(Class<P> cls) { in withPlugin()
69 public ExtensionBuilder<T> withDefault(Supplier<T> def) { in withDefault()
74 public ExtensionBuilder<T> withCallback(Consumer<T> callback) { in withCallback()
79 public ExtensionBuilder<T> withUiMode(int mode, Supplier<T> def) { in withUiMode()
84 public ExtensionBuilder<T> withFeature(String feature, Supplier<T> def) { in withFeature()
94 private class FakeExtension<T> implements Extension<T> {
102 public T get() { in get()
[all …]
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/listbuilder/
H A DSemiStableSort.kt36 fun <T : Any> sort(
37 items: MutableList<T>,
60 fun <T : Any> sortTo(
61 items: Iterable<T>,
64 output: MutableList<T>,
86 fun <T : Any> stabilizeTo(
89 output: MutableList<T>,
114 private inline fun <T : Any, R> withWorkspace(block: (ArrayList<T>) -> R): R {
121 private inline fun <T : Any> withAdditions(block: (ArrayList<T>) -> Unit) {
177 fun <T> List<T>.isSorted(comparator: Comparator<T>): Boolean {
[all …]
/aosp14/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/animation/
H A DPhysicsAnimatorTestUtils.kt40 typealias UpdateFramesPerProperty<T> =
133 target: T,
182 predicate: (T) -> Boolean
187 .UpdateListener<T> {
189 target: T,
346 fun <T : Any> getAnimationUpdateFrames(animator: PhysicsAnimator<T>):
355 fun <T : Any> clearAnimationUpdateFrames(animator: PhysicsAnimator<T>) {
360 private fun <T> getAnimationTestHelper(animator: PhysicsAnimator<T>): AnimatorTestHelper<T> {
369 class AnimatorTestHelper<T> (private val animator: PhysicsAnimator<T>) {
414 target: T,
[all …]
/aosp14/frameworks/base/media/java/android/media/
H A DCallbackUtil.java48 static class ListenerInfo<T> {
49 final @NonNull T mListener;
65 static <T> @Nullable ListenerInfo<T> getListenerInfo( in getListenerInfo()
66 @NonNull T listener, @Nullable ArrayList<ListenerInfo<T>> listeners) { in getListenerInfo()
85 static <T> boolean hasListener(@NonNull T listener, in hasListener()
97 static <T> boolean removeListener(@NonNull T listener, in removeListener()
126 static <T, S> Pair<ArrayList<ListenerInfo<T>>, S> addListener(String methodName, in addListener()
128 @NonNull T listener, in addListener()
177 static <T, S> Pair<ArrayList<ListenerInfo<T>>, S> removeListener(String methodName, in removeListener()
178 @NonNull T listener, in removeListener()
[all …]

12345678910>>...41