/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/util/mockito/ |
D | KotlinMockitoHelpers.kt | 39 fun <T> eq(obj: T): T = Mockito.eq<T>(obj) in eq() 47 fun <T> any(type: Class<T>): T = Mockito.any<T>(type) in eq() 48 inline fun <reified T> any(): T = any(T::class.java) in eq() 56 fun <T> argThat(matcher: ArgumentMatcher<T>): T = Mockito.argThat(matcher) in eq() 61 inline fun <reified T> nullable(): T? = Mockito.nullable(T::class.java) in eq() 69 fun <T> capture(argumentCaptor: ArgumentCaptor<T>): T = argumentCaptor.capture() in eq() 76 inline fun <reified T : Any> argumentCaptor(): ArgumentCaptor<T> = in eq() 77 ArgumentCaptor.forClass(T::class.java) in eq() 86 inline fun <reified T : Any> mock(apply: T.() -> Unit = {}): T = Mockito.mock(T::class.java) in eq() 94 fun <T> whenever(methodCall: T): OngoingStubbing<T> = `when`(methodCall) in whenever() [all …]
|
/frameworks/av/media/codec2/vndk/include/util/ |
D | C2InterfaceUtils.h | 33 template<typename T> 35 typedef T ValueType; 37 return os << p.ref<T>(); in put() 58 template<typename T> 60 typedef typename _C2FieldValueHelper<T>::ValueType ValueType; 63 constexpr static T MIN_VALUE = std::numeric_limits<T>::min(); 64 constexpr static T MAX_VALUE = std::numeric_limits<T>::max(); 65 constexpr static T MIN_STEP = std::is_floating_point<T>::value ? 0 : 1; 74 inline static constexpr C2SupportedRange<T> None() { 81 inline static constexpr C2SupportedRange<T> Any() { [all …]
|
/frameworks/native/libs/math/include/math/ |
D | TQuatHelpers.h | 50 template <template<typename T> class QUATERNION, typename T> 57 QUATERNION<T>& operator *= (const QUATERNION<OTHER>& r) { 58 QUATERNION<T>& q = static_cast<QUATERNION<T>&>(*this); 65 QUATERNION<T>& operator *= (T v) { 66 QUATERNION<T>& lhs = static_cast<QUATERNION<T>&>(*this); 67 for (size_t i = 0; i < QUATERNION<T>::size(); i++) { 72 QUATERNION<T>& operator /= (T v) { 73 QUATERNION<T>& lhs = static_cast<QUATERNION<T>&>(*this); 74 for (size_t i = 0; i < QUATERNION<T>::size(); i++) { 93 constexpr QUATERNION<T> PURE operator *(const QUATERNION<T>& q, const QUATERNION<RT>& r) { [all …]
|
D | TVecHelpers.h | 57 template <template<typename T> class VECTOR, typename T> 64 VECTOR<T>& operator +=(const VECTOR<OTHER>& v) { 65 VECTOR<T>& lhs = static_cast<VECTOR<T>&>(*this); 72 VECTOR<T>& operator -=(const VECTOR<OTHER>& v) { 73 VECTOR<T>& lhs = static_cast<VECTOR<T>&>(*this); 85 VECTOR<T>& operator +=(const VECTOR<T>& v) { 86 VECTOR<T>& lhs = static_cast<VECTOR<T>&>(*this); 92 VECTOR<T>& operator -=(const VECTOR<T>& v) { 93 VECTOR<T>& lhs = static_cast<VECTOR<T>&>(*this); 112 friend inline constexpr VECTOR<T> PURE operator +(VECTOR<T> lv, const VECTOR<RT>& rv) { [all …]
|
D | scalar.h | 24 template<typename T> 25 static constexpr T saturate(T v) noexcept { in saturate() 26 return T(std::min(T(1), std::max(T(0), v))); in saturate() 29 template<typename T> 30 static constexpr T clamp(T v, T min, T max) noexcept { in clamp() 31 return T(std::min(max, std::max(min, v))); in clamp() 34 template<typename T> 35 static constexpr T mix(T x, T y, T a) noexcept { in mix() 36 return x * (T(1) - a) + y * a; in mix() 39 template<typename T> [all …]
|
/frameworks/av/media/libstagefright/foundation/include/media/stagefright/foundation/ |
D | AUtils.h | 24 template<class T> 25 inline static const T divRound(const T &num, const T &den) { in divRound() 34 template<class T> 35 inline static const T divUp(const T &num, const T &den) { in divUp() 44 template<class T, class U> 45 inline static const T align(const T &num, const U &den) { in align() 46 return (num + (T)(den - 1)) & (T)~(den - 1); in align() 49 template<class T> 50 inline static T abs(const T &a) { in abs() 54 template<class T> [all …]
|
D | TypeTraits.h | 36 template<typename T> 38 : std::integral_constant<bool, std::is_integral<T>::value || std::is_enum<T>::value> { }; 48 template<typename T, 49 typename U=typename std::enable_if<is_integral_or_enum<T>::value>::type, 50 bool=std::is_enum<T>::value, 51 bool=std::is_integral<T>::value> 53 static_assert(!std::is_enum<T>::value, "T should not be enum here"); 54 static_assert(!std::is_integral<T>::value, "T should not be integral here"); 59 template<typename T, typename U> 60 struct HIDE underlying_integral_type<T, U, true, false> { [all …]
|
D | AData.h | 99 template<typename T, typename ...Args> 100 inline static void NO_CFI emplace(size_t totalSize, T *addr, Args&&... args) { in emplace() 101 new(addr)T(std::forward<Args>(args)...); in emplace() 103 constexpr size_t size = sizeof(T); in emplace() 115 template<typename T> 116 inline static void del(T *addr) { in del() 117 addr->~T(); in del() 165 typename T, typename ...Args, 166 typename=typename std::enable_if<is_one_of<T, void, Ts...>::value>::type> 169 sizeof(_type), reinterpret_cast<T*>(&mValue), std::forward<Args>(args)...); in emplace() [all …]
|
/frameworks/native/services/sensorservice/ |
D | RingBuffer.h | 35 template <class T> 47 class iterator : public std::iterator<std::forward_iterator_tag, T> { 49 iterator(T* ptr, size_t size, size_t pos, size_t ctr); 59 T& operator*(); 61 T* operator->(); 64 T* mPtr; 73 class const_iterator : public std::iterator<std::forward_iterator_tag, T> { 75 const_iterator(const T* ptr, size_t size, size_t pos, size_t ctr); 85 const T& operator*(); 87 const T* operator->(); [all …]
|
/frameworks/av/media/libmedia/include/media/ |
D | RingBuffer.h | 35 template <class T> 47 class iterator : public std::iterator<std::forward_iterator_tag, T> { 49 iterator(T* ptr, size_t size, size_t pos, size_t ctr); 59 T& operator*(); 61 T* operator->(); 64 T* mPtr; 73 class const_iterator : public std::iterator<std::forward_iterator_tag, T> { 75 const_iterator(const T* ptr, size_t size, size_t pos, size_t ctr); 85 const T& operator*(); 87 const T* operator->(); [all …]
|
/frameworks/av/media/libeffects/loudness/common/core/ |
D | byte_swapper.h | 40 template <typename T, unsigned int kValSize> 42 static T Swap(const T &val) { in Swap() 43 T new_val = val; in Swap() 54 template <typename T> 55 struct ByteSwapper<T, 1> { 56 static T Swap(const T &val) { 61 template <typename T> 62 struct ByteSwapper<T, 2> { 63 static T Swap(const T &val) { 64 T new_val; [all …]
|
/frameworks/base/cmds/idmap2/include/idmap2/ |
D | Result.h | 49 template <typename T> 52 Result(const T& value); // NOLINT(runtime/explicit) 53 Result(T&& value) noexcept; // NOLINT(runtime/explicit) 65 constexpr const T& operator*() const&; 66 T& operator*() &; 68 constexpr const T* operator->() const&; 69 T* operator->() &; 77 std::variant<T, Error> data_; 80 template <typename T> 81 Result<T>::Result(const T& value) : data_(std::in_place_type<T>, value) { in Result() [all …]
|
/frameworks/native/libs/vr/libdvrcommon/include/private/dvr/ |
D | numeric.h | 27 template <typename T> 28 T NormalizePeriodicRange(T x, T lo, T hi) { in NormalizePeriodicRange() 29 T range_size = hi - lo; in NormalizePeriodicRange() 46 template <typename T> 47 T NormalizeDegrees(T x, T centre = static_cast<T>(180.0)) { 48 return NormalizePeriodicRange(x, centre - static_cast<T>(180.0), 49 centre + static_cast<T>(180.0)); 61 template <typename T> 62 T NormalizeRadians(T x, T centre = static_cast<T>(M_PI)) { 63 return NormalizePeriodicRange(x, centre - static_cast<T>(M_PI), [all …]
|
/frameworks/rs/cpp/util/ |
D | StrongPointer.h | 34 template<typename T> class wp; 39 inline bool operator _op_ (const sp<T>& o) const { \ 42 inline bool operator _op_ (const T* o) const { \ 53 inline bool operator _op_ (const wp<T>& o) const { \ 63 template <typename T> 69 sp(T* other); // NOLINT, implicit 70 sp(const sp<T>& other); 78 sp& operator = (T* other); 79 sp& operator = (const sp<T>& other); 85 void force_set(T* other); [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
D | ExtensionController.java | 29 <T> ExtensionBuilder<T> newExtension(Class<T> cls); in newExtension() 31 interface Extension<T> { 32 T get(); in get() 35 void addCallback(Consumer<T> callback); in addCallback() 40 T reload(); in reload() 50 interface ExtensionBuilder<T> { 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() 54 <P> ExtensionBuilder<T> withPlugin(Class<P> cls, String action, in withPlugin() [all …]
|
/frameworks/minikin/include/minikin/ |
D | Buffer.h | 36 template <typename T> 39 static_assert(sizeof(T) % alignof(T) == 0, "sizeof(T) must be a multiple of alignof(T)"); in align() 43 return (pos + sizeof(T) - 1) / sizeof(T) * sizeof(T); in align() 46 template <typename T> 47 const T& read() { in read() 48 static_assert(std::is_pod<T>::value, "T must be a POD"); in read() 49 mPos = BufferReader::align<T>(mPos); in read() 50 const T* data = reinterpret_cast<const T*>(mData + mPos); in read() 51 mPos += sizeof(T); in read() 55 template <typename T> [all …]
|
/frameworks/base/media/mca/filterpacks/native/base/ |
D | vec_types.h | 23 template < class T, int dim> 26 T data[dim]; 28 VecBase<T,dim>& operator = (const VecBase<T, dim> &x) { 29 memcpy(data, x.data, sizeof(T)*dim); 32 T & operator [] (int i) { 36 const T & operator [] (int i) const { 40 T Length() { in Length() 44 return static_cast<T>(sqrt(sum)); in Length() 48 template < class T, int dim> 49 class Vec : public VecBase<T,dim> { [all …]
|
/frameworks/native/services/surfaceflinger/Scheduler/ |
D | StrongTyping.h | 20 template <typename T, template <typename> class AbilityType> 22 T& base() { return static_cast<T&>(*this); } in base() 23 T const& base() const { return static_cast<T const&>(*this); } in base() 26 template <typename T> 27 struct Add : Ability<T, Add> { 28 inline T operator+(T const& other) const { return T(this->base().value() + other.value()); } 29 inline T& operator++() { 33 inline T operator++(int) { 34 T tmp(this->base()); 38 inline T& operator+=(T const& other) { [all …]
|
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/ |
D | CameraErrorCollector.java | 91 public <T> void checkThat(final T value, final Matcher<T> matcher) { in checkThat() 102 public <T> void checkThat(final String reason, 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() 236 public <T extends Comparable<? super T>> boolean expectGreater(String msg, T expected, in expectGreater() 237 T actual) { in expectGreater() 250 public <T extends Comparable<? super T>> boolean expectGreaterOrEqual(String msg, T expected, in expectGreaterOrEqual() 251 T actual) { in expectGreaterOrEqual() [all …]
|
/frameworks/base/core/java/com/android/internal/util/ |
D | CollectionUtils.java | 52 public static <T> boolean contains(@Nullable Collection<T> collection, T element) { in contains() 62 public static @NonNull <T> List<T> filter(@Nullable List<T> list, in filter() 63 java.util.function.Predicate<? super T> predicate) { in filter() 64 ArrayList<T> result = null; in filter() 66 final T item = list.get(i); in filter() 77 public static @NonNull <T> Set<T> filter(@Nullable Set<T> set, in filter() 78 java.util.function.Predicate<? super T> predicate) { in filter() 80 ArraySet<T> result = null; in filter() 82 ArraySet<T> arraySet = (ArraySet<T>) set; in filter() 85 final T item = arraySet.valueAt(i); in filter() [all …]
|
/frameworks/av/media/libmediatranscoding/include/media/ |
D | AdjustableMaxPriorityQueue.h | 39 template <class T, class Comparator = std::less<T>> 42 typedef typename std::vector<T>::iterator iterator; 43 typedef typename std::vector<T>::const_iterator const_iterator; 54 const T& top() const; 67 T consume_top(); 70 bool push(const T& item) { return pushInternal(item); } in push() 73 bool push(T&& item) { return pushInternal(std::move(item)); } in push() 105 const std::vector<T>& getStorage() const { return mHeap; }; in getStorage() 108 std::vector<T> mHeap; 115 template <class T, class Comparator> [all …]
|
/frameworks/native/libs/battery/ |
D | MultiStateCounter.h | 36 template <class T> 41 T emptyValue; 42 T lastValue; 44 T deltaValue; 49 T counter; 55 MultiStateCounter(uint16_t stateCount, const T& emptyValue); 63 void setValue(state_t state, const T& value); 70 const T& updateValue(const T& value, time_t timestamp); 76 void incrementValue(const T& increment, time_t timestamp); 83 void addValue(const T& increment); [all …]
|
/frameworks/av/media/codec2/core/include/ |
D | C2.h | 189 template<typename T, typename B> 197 template<typename T> 201 inline static constexpr T get(const U &value) { in get() 202 return T(value); in get() 205 template<typename U, typename E=typename std::enable_if<(sizeof(U) >= sizeof(T))>::type> 207 inline static constexpr T get(const c2_cntr_t<U, void> &value) { in get() 208 return T(value.mValue); in get() 235 template<typename T, typename B=typename std::enable_if<std::is_integral<T>::value && std::is_unsig… 237 using compat = _c2_cntr_compat_helper<T>; 239 T mValue; [all …]
|
/frameworks/native/include/ftl/details/ |
D | future.h | 26 template <typename T> 28 using type = T; 31 template <typename T> 32 struct future_result<std::future<T>> { 33 using type = T; 36 template <typename T> 37 struct future_result<std::shared_future<T>> { 38 using type = T; 41 template <typename T, template <typename> class FutureImpl> 42 struct future_result<Future<T, FutureImpl>> { [all …]
|
/frameworks/libs/net/common/framework/com/android/net/module/util/ |
D | CollectionUtils.java | 38 public static <T> boolean isEmpty(@Nullable T[] array) { in isEmpty() 45 public static <T> boolean isEmpty(@Nullable Collection<T> collection) { in isEmpty() 81 public static <T> boolean all(@NonNull Collection<T> elem, @NonNull Predicate<T> predicate) { in all() 82 for (final T e : elem) { in all() 93 public static <T> boolean any(@NonNull Collection<T> elem, @NonNull Predicate<T> predicate) { in any() 101 public static <T> int indexOf(@NonNull Collection<T> elem, @NonNull Predicate<T> predicate) { in indexOf() 103 for (final T e : elem) { in indexOf() 114 public static <T> boolean any(@NonNull SparseArray<T> array, @NonNull Predicate<T> predicate) { in any() 152 public static <T> boolean contains(@Nullable T[] array, @Nullable T value) { in contains() 159 public static <T> int indexOf(@Nullable T[] array, @Nullable T value) { in indexOf() [all …]
|