/cts/tests/tests/binder_ndk/libbinder_ndk_test/ |
D | itest_impl.h | 45 ::ndk::ScopedAStatus GetName(std::string* _aidl_return) override { in GetName() 68 std::mutex mCachedMutex; 69 std::condition_variable mCachedCondition; 75 std::unique_lock<std::mutex> l(mCachedMutex); in CacheCallingInfoFromOneway() 85 std::unique_lock<std::mutex> l(mCachedMutex); in GiveMeMyCallingPidFromOneway() 93 std::unique_lock<std::mutex> l(mCachedMutex); in GiveMeMyCallingUidFromOneway() 158 const std::shared_ptr<IEmpty>& in_value, in RepeatInterface() 159 std::shared_ptr<IEmpty>* _aidl_return) override { in RepeatInterface() 164 const std::shared_ptr<IEmpty>& in_value, in RepeatNullableInterface() 165 std::shared_ptr<IEmpty>* _aidl_return) override { in RepeatNullableInterface() [all …]
|
D | test_native_aidl_client.cpp | 53 std::shared_ptr<MyTest> test = SharedRefBase::make<MyTest>(); in TEST_F() 61 std::shared_ptr<ITest> iface; 64 std::string expectedName; 80 std::string name; in TEST_P() 105 bool ReadFdToString(int fd, std::string* content) { in ReadFdToString() 114 std::string dumpToString(std::shared_ptr<ITest> itest, std::vector<const char*> args) { in dumpToString() 121 std::string ret; in dumpToString() 129 std::string name; in TEST_P() 179 ASSERT_EQ(std::string(""), ITest::kEmpty); in TEST_P() 180 ASSERT_EQ(std::string("foo"), ITest::kFoo); in TEST_P() [all …]
|
/cts/tests/tests/jni/libjnitest/ |
D | android_jni_cts_LinkerNamespacesTest.cpp | 50 static const std::string kSystemLibraryPath = "/system/" LIB_DIR; 51 static const std::string kArtApexLibraryPath = "/apex/com.android.art/" LIB_DIR; 52 static const std::string kVendorLibraryPath = "/vendor/" LIB_DIR; 53 static const std::string kProductLibraryPath = "/product/" LIB_DIR; 55 static const std::vector<std::regex> kSystemPathRegexes = { 56 std::regex("/system/lib(64)?"), 57 std::regex("/apex/com\\.android\\.[^/]*/lib(64)?"), 58 … std::regex("/system/lib/arm(64)?"), // when CTS runs in ARM ABI on non-ARM CPU. http://b/149852946 61 static const std::string kWebViewPlatSupportLib = "libwebviewchromium_plat_support.so"; 72 static bool not_accessible(const std::string& err) { in not_accessible() [all …]
|
/cts/apps/CtsVerifier/include/colorchecker/ |
D | colorcheckertest.h | 42 const std::vector<std::vector<Vec2f> >* getCheckerCenterAdd() const { in getCheckerCenterAdd() 43 std::vector<std::vector<Vec2f> >* returnPositions = in getCheckerCenterAdd() 44 new std::vector<std::vector<Vec2f> >( in getCheckerCenterAdd() 45 4, std::vector<Vec2f>(6, Vec2f(0.f, 0.f))); in getCheckerCenterAdd() 55 const std::vector<std::vector<float> >* getCheckerRadiusAdd() const { in getCheckerRadiusAdd() 56 std::vector<std::vector<float> >* returnRadius= in getCheckerRadiusAdd() 57 new std::vector<std::vector<float> >( in getCheckerRadiusAdd() 58 4, std::vector<float>(6, 0.f)); in getCheckerRadiusAdd() 80 void findCheckerBoards(std::vector<std::vector<int> > linesDir1, 81 std::vector<std::vector<int> > linesDir2); [all …]
|
D | meteringtest.h | 35 void addDataToList(const std::vector<Vec3f>* checkerColors) { in addDataToList() 44 const std::vector<bool>* getComparisonResults() const { in getComparisonResults() 49 bool isDarkerThan(const std::vector<Vec3f>* checkerColors1, 50 const std::vector<Vec3f>* checkerColors2) const; 51 bool isEquivalentTo(const std::vector<Vec3f>* checkerColors1, 52 const std::vector<Vec3f>* checkerColors2) const; 54 std::vector<std::vector<Vec3f> > mCheckerColors; 55 std::vector<bool> mComparisonResults;
|
D | autolocktest.h | 31 void addDataToList(const std::vector<Vec3f>* checkerColors) { in addDataToList() 40 const std::vector<bool>* getComparisonResults() const { in getComparisonResults() 45 bool IsBrighterThan(const std::vector<Vec3f>* colorCheckers1, 46 const std::vector<Vec3f>* colorCheckers2) const; 47 bool IsEquivalentTo(const std::vector<Vec3f>* colorCheckers1, 48 const std::vector<Vec3f>* colorCheckers2) const; 50 std::vector<std::vector<Vec3f> > mCheckerColors; 51 std::vector<bool> mComparisonResults;
|
/cts/tests/tests/view/jni/ |
D | android_view_cts_ChoreographerNativeTest.cpp | 39 using namespace std::chrono_literals; 41 static constexpr std::chrono::nanoseconds NOMINAL_VSYNC_PERIOD{16ms}; 42 static constexpr std::chrono::nanoseconds DELAY_PERIOD{NOMINAL_VSYNC_PERIOD * 5}; 43 static constexpr std::chrono::nanoseconds ZERO{std::chrono::nanoseconds::zero()}; 45 static std::mutex gLock; 50 std::chrono::nanoseconds frameTime{0LL}; 54 std::lock_guard<std::mutex> _l(gLock); in frameCallback64() 57 cb->frameTime = std::chrono::nanoseconds{frameTimeNanos}; in frameCallback64() 64 static std::chrono::nanoseconds now() { in now() 65 return std::chrono::steady_clock::now().time_since_epoch(); in now() [all …]
|
/cts/tests/tests/media/libaudiojni/ |
D | Gate.h | 63 std::unique_lock<std::mutex> l(mLock); in wait() 76 std::lock_guard<std::mutex> l(mLock); in closeGate() 84 std::lock_guard<std::mutex> l(mLock); in openGate() 97 std::lock_guard<std::mutex> l(mLock); in terminate() 106 std::lock_guard<std::mutex> l(mLock); in isOpen() 112 std::lock_guard<std::mutex> l(mLock); in waiters() 121 std::condition_variable mCondition; 122 std::mutex mLock;
|
/cts/hostsidetests/securitybulletin/securityPatch/pac/ |
D | pac.cpp | 29 std::cout << "incorrect number of arguments" << std::endl; in main() 30 std::cout << "usage: ./pacrunner mypac.pac" << std::endl; in main() 36 std::ifstream t; in main() 38 if (t.rdstate() != std::ifstream::goodbit) { in main() 39 std::cout << "error opening file" << std::endl; in main() 42 t.seekg(0, std::ios::end); in main() 48 std::string u8Script(raw); in main() 49 std::u16string u16Script = std::wstring_convert< in main() 50 std::codecvt_utf8_utf16<char16_t>, char16_t>{}.from_bytes(u8Script); in main()
|
/cts/tests/tests/media/libmediandkjni/ |
D | native_media_encoder_jni.cpp | 50 NativeEncoder(const std::string&); 53 static std::shared_ptr<ANativeWindow> getPersistentSurface(); 54 std::shared_ptr<ANativeWindow> getSurface() const; 56 Status prepare(std::unique_ptr<RunConfig> config, std::shared_ptr<ANativeWindow> anw = nullptr); 67 std::shared_ptr<AMediaCodec> mEnc; 68 std::shared_ptr<ANativeWindow> mLocalSurface; // the one created by createInputSurface() 69 std::string mOutFileName; 73 std::unique_ptr<RunConfig> mRunConfig; 77 NativeEncoder::NativeEncoder(const std::string& outFileName) in NativeEncoder() 92 std::shared_ptr<ANativeWindow> NativeEncoder::getPersistentSurface() { in getPersistentSurface() [all …]
|
D | native_media_utils.h | 103 static std::shared_ptr<DynamicParam> newBitRate(int atFrame, int32_t bitrate) { in newBitRate() 106 return std::shared_ptr<DynamicParam>(d); in newBitRate() 108 static std::shared_ptr<DynamicParam> newRequestSync(int atFrame) { in newRequestSync() 111 return std::shared_ptr<DynamicParam>(d); in newRequestSync() 124 mParam = std::shared_ptr<AMediaFormat>(AMediaFormat_new(), deleter_AMediaFormat); in DynamicParam() 128 std::shared_ptr<AMediaFormat> mParam; 131 using DParamRef = std::shared_ptr<DynamicParam>; 138 RunConfig(int32_t numFramesToEncode, std::shared_ptr<AMediaFormat> staticParams) in RunConfig() 149 const std::vector<DParamRef>& dynamicParams() const { in dynamicParams() 156 const char *key, std::vector<DParamRef>& ) const; [all …]
|
D | native_media_decoder_source.cpp | 33 Status prepare(std::shared_ptr<Listener> l, std::shared_ptr<ANativeWindow> n) override; 49 std::shared_ptr<AMediaExtractor> mEx; 50 std::shared_ptr<AMediaCodec> mDec; 51 std::shared_ptr<AMediaFormat> mFormat; 52 std::string mMime; 59 std::shared_ptr<Source> createDecoderSource( in createDecoderSource() 65 std::shared_ptr<Source> src(d); in createDecoderSource() 86 mEx = std::shared_ptr<AMediaExtractor>(AMediaExtractor_new(), deleter_AMediExtractor); in setDataSourceFd() 107 mFormat = std::shared_ptr<AMediaFormat>(format, deleter_AMediaFormat); in setDataSourceFd() 188 mFormat = std::shared_ptr<AMediaFormat>( in run() [all …]
|
/cts/tests/tests/nativemedia/aaudio/jni/ |
D | test_aaudio_callback.cpp | 58 using CbTestParams = std::tuple<aaudio_sharing_mode_t, int32_t, aaudio_performance_mode_t>; 65 static std::string getTestName(const ::testing::TestParamInfo<CbTestParams>& info) { in getTestName() 66 return std::string() + sharingModeToString(std::get<PARAM_SHARING_MODE>(info.param)) + in getTestName() 67 "__" + std::to_string(std::get<PARAM_FRAMES_PER_CB>(info.param)) + in getTestName() 68 "__" + performanceModeToString(std::get<PARAM_PERF_MODE>(info.param)); in getTestName() 79 std::atomic<aaudio_result_t> callbackError; 80 std::atomic<int32_t> callbackCount; 104 minLatency = std::min(minLatency, latency); in updateLatency() 105 maxLatency = std::max(maxLatency, latency); in updateLatency() 115 std::unique_ptr<T> mHelper; [all …]
|
D | test_aaudio.cpp | 32 using StreamTestParams = std::tuple<aaudio_sharing_mode_t, aaudio_performance_mode_t>; 38 static std::string getTestName(const ::testing::TestParamInfo<StreamTestParams>& info) { in getTestName() 39 return std::string() + sharingModeToString(std::get<PARAM_SHARING_MODE>(info.param)) + in getTestName() 40 "__" + performanceModeToString(std::get<PARAM_PERF_MODE>(info.param)); in getTestName() 51 std::unique_ptr<T> mHelper; 53 std::unique_ptr<int16_t[]> mData; 68 std::get<PARAM_SHARING_MODE>(GetParam()), in SetUp() 69 std::get<PARAM_PERF_MODE>(GetParam()))); in SetUp() 96 stream(), &mData[0], std::min(framesToRecord, mFramesPerRead), in TEST_P() 117 stream(), &mData[0], std::min(framesToRecord, mFramesPerRead), in TEST_P() [all …]
|
D | test_aaudio_stream_builder.cpp | 148 static std::string getTestName(const ::testing::TestParamInfo<int32_t>& info) { in getTestName() 149 return info.param >= 0 ? std::to_string(info.param) : "_" + std::to_string(-info.param); in getTestName() 184 static std::string getTestName(const ::testing::TestParamInfo<int32_t>& info) { in getTestName() 185 return info.param >= 0 ? std::to_string(info.param) : "_" + std::to_string(-info.param); in getTestName() 212 static std::string getTestName(const ::testing::TestParamInfo<aaudio_format_t>& info) { in getTestName() 213 return info.param >= 0 ? std::to_string(info.param) : "_" + std::to_string(-info.param); in getTestName() 246 static std::string getTestName(const ::testing::TestParamInfo<aaudio_sharing_mode_t>& info) { in getTestName() 247 return info.param >= 0 ? std::to_string(info.param) : "_" + std::to_string(-info.param); in getTestName() 274 static std::string getTestName(const ::testing::TestParamInfo<aaudio_direction_t>& info) { in getTestName() 275 return info.param >= 0 ? std::to_string(info.param) : "_" + std::to_string(-info.param); in getTestName() [all …]
|
/cts/suite/audio_quality/lib/src/task/ |
D | TaskSave.cpp | 55 std::unique_ptr<std::vector<android::String8> > list(StringUtil::split(fileValue, ',')); in handleFile() 56 std::vector<android::String8>* listp = list.get(); in handleFile() 79 std::unique_ptr<std::list<TaskCase::BufferPair> > buffers( in handleFile() 81 std::list<TaskCase::BufferPair>* buffersp = buffers.get(); in handleFile() 86 std::list<TaskCase::BufferPair>::iterator it = buffersp->begin(); in handleFile() 87 std::list<TaskCase::BufferPair>::iterator end = buffersp->end(); in handleFile() 108 std::unique_ptr<std::vector<android::String8> > list(StringUtil::split(reportValue, ',')); in handleReport() 109 std::vector<android::String8>* listp = list.get(); in handleReport() 117 std::unique_ptr<std::list<TaskCase::ValuePair> > values( in handleReport() 119 std::list<TaskCase::ValuePair>* valuesp = values.get(); in handleReport() [all …]
|
D | TaskProcess.cpp | 54 bool TaskProcess::prepareParams(std::vector<TaskProcess::Param>& list, in prepareParams() 56 std::unique_ptr<void_ptr[]>& ptrs, in prepareParams() 57 std::unique_ptr<UniqueValue[]>& values, in prepareParams() 58 std::unique_ptr<UniqueBuffer[]>& buffers, in prepareParams() 96 std::unique_ptr<android::sp<Buffer> > buffer(new android::sp<Buffer>()); in prepareParams() 170 std::unique_ptr<void_ptr[]> inputs; in doRun() 172 std::unique_ptr<UniqueValue[]> inputValues; in doRun() 174 std::unique_ptr<UniqueBuffer[]> inputBuffers; in doRun() 176 std::unique_ptr<void_ptr[]> outputs; in doRun() 178 std::unique_ptr<UniqueValue[]> outputValues; in doRun() [all …]
|
D | TaskCase.cpp | 68 typename std::map<android::String8, T>& map, in registerGeneric() 71 typename std::map<android::String8, T>::iterator it; in registerGeneric() 82 template <typename T> bool findGeneric(typename std::map<android::String8, T>& map, in findGeneric() 86 typename std::map<android::String8, T>::iterator it; in findGeneric() 95 template <typename T> bool updateGeneric(typename std::map<android::String8, T>& map, in updateGeneric() 99 typename std::map<android::String8, T>::iterator it; in updateGeneric() 110 template <typename T> typename std::list<std::pair<android::String8, T> >* findAllGeneric( in findAllGeneric() 111 typename std::map<android::String8, T>& map, const char* re) in findAllGeneric() 118 typename std::map<android::String8, T>::iterator it; in findAllGeneric() 119 typename std::list<std::pair<android::String8, T> >* list = NULL; in findAllGeneric() [all …]
|
/cts/hostsidetests/jvmti/base/jni/ |
D | redefine.cpp | 70 void PushRedefinition(std::string name, std::vector<unsigned char> data) { in PushRedefinition() 72 std::stack<std::vector<unsigned char>> stack; in PushRedefinition() 73 redefinitions_[name] = std::move(stack); in PushRedefinition() 75 redefinitions_[name].push(std::move(data)); in PushRedefinition() 78 bool RetrieveRedefinition(std::string name, /*out*/std::vector<unsigned char>* data) { in RetrieveRedefinition() 88 void PopRedefinition(std::string name) { in PopRedefinition() 100 std::unordered_map<std::string, std::stack<std::vector<unsigned char>>> redefinitions_; 117 std::string name_str(name); in CommonClassFileLoadHookRetransformable() 118 std::vector<unsigned char> dex_data; in CommonClassFileLoadHookRetransformable() 166 std::string name_str(name_chrs); in Java_android_jvmti_cts_JvmtiRedefineClassesTest_pushTransformationResult() [all …]
|
D | tracking.cpp | 32 static std::string GetClassName(JNIEnv* jni_env, jclass cls) { in GetClassName() 41 static std::mutex gLock; 42 static std::string gCollection; 50 std::string object_klass_descriptor = GetClassName(jni_env, object_klass); in ObjectAllocated() 52 std::string object_klass_descriptor2 = GetClassName(jni_env, object_klass2.get()); in ObjectAllocated() 53 std::string result = android::base::StringPrintf("ObjectAllocated type %s/%s size %zu", in ObjectAllocated() 57 std::unique_lock<std::mutex> mu(gLock); in ObjectAllocated() 84 std::string result; in Java_android_jvmti_cts_JvmtiTrackingTest_getAndResetAllocationTrackingString() 86 std::unique_lock<std::mutex> mu(gLock); in Java_android_jvmti_cts_JvmtiTrackingTest_getAndResetAllocationTrackingString() 94 std::unique_lock<std::mutex> mu(gLock); in Java_android_jvmti_cts_JvmtiTrackingTest_getAndResetAllocationTrackingString()
|
/cts/common/device-side/nativetesthelper/jni/ |
D | gtest_wrapper.cpp | 69 std::string nativeName; 73 std::unordered_map<std::string, TestNameInfo> gNativeTestNames; 77 std::string registerAndMangleTestName(const std::string& nativeName) { in registerAndMangleTestName() 78 std::string mangledName = nativeName; in registerAndMangleTestName() 79 std::replace(mangledName.begin(), mangledName.end(), '.', '_'); in registerAndMangleTestName() 80 std::replace(mangledName.begin(), mangledName.end(), '/', '_'); in registerAndMangleTestName() 81 gNativeTestNames.insert(std::make_pair(mangledName, TestNameInfo{nativeName, false})); in registerAndMangleTestName() 86 jobject createTestDescription(JNIEnv* env, jstring className, const std::string& mangledName) { in createTestDescription() 93 std::ostringstream nativeNameStream; in createTestDescription() 95 std::string mangledName = registerAndMangleTestName(nativeNameStream.str()); in createTestDescription() [all …]
|
/cts/hostsidetests/gputools/apps/jni/ |
D | android_gputools_cts_RootlessGpuDebug.cpp | 39 std::string initVulkan() { in initVulkan() 40 std::string result = ""; in initVulkan() 72 std::string initGLES() { in initGLES() 73 std::string result = ""; in initGLES() 88 std::string display_extensions = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS); in initGLES() 89 if (display_extensions.find("EGL_ANDROID_GLES_layers") == std::string::npos) in initGLES() 96 result = "eglGetDisplay() returned error " + std::to_string(eglGetError()); in initGLES() 101 result = "eglInitialize() returned error " + std::to_string(eglGetError()); in initGLES() 107 "eglChooseConfig() returned error " + std::to_string(eglGetError()); in initGLES() 113 "eglGetConfigAttrib() returned error " + std::to_string(eglGetError()); in initGLES() [all …]
|
/cts/suite/audio_quality/lib/include/task/ |
D | TaskProcess.h | 42 bool parseParams(std::vector<Param>& list, const char* str, bool isInput); 45 typedef std::unique_ptr<TaskCase::Value> UniqueValue; 46 typedef std::unique_ptr<android::sp<Buffer> > UniqueBuffer; 49 bool prepareParams(std::vector<TaskProcess::Param>& list, 51 std::unique_ptr<void_ptr[]>& ptrs, 52 std::unique_ptr<UniqueValue[]>& values, 53 std::unique_ptr<UniqueBuffer[]>& buffers, 86 std::vector<Param> mInput; 87 std::vector<Param> mOutput; 89 std::unique_ptr<SignalProcessingInterface> mSp;
|
/cts/hostsidetests/jvmti/attaching/app/jni/ |
D | cts_agent.cpp | 31 static std::mutex gVectorMutex; 32 static std::vector<std::string> gLoadedDescriptors; 34 static std::string GetClassName(jvmtiEnv* jenv, JNIEnv* jni_env, jclass klass) { in GetClassName() 46 std::string tmp(name); in GetClassName() 95 std::string name = GetClassName(jenv, jni_env, klass); in ClassPrepareCallback() 99 std::lock_guard<std::mutex> guard(gVectorMutex); in ClassPrepareCallback() 105 std::lock_guard<std::mutex> guard(gVectorMutex); in Java_android_jvmti_JvmtiActivity_didSeeLoadOf() 107 std::string tmp = str.c_str(); in Java_android_jvmti_JvmtiActivity_didSeeLoadOf() 108 bool found = std::find(gLoadedDescriptors.begin(), gLoadedDescriptors.end(), tmp) != in Java_android_jvmti_JvmtiActivity_didSeeLoadOf()
|
/cts/tests/tests/nativehardware/jni/ |
D | AHardwareBufferGLTest.cpp | 92 std::string GetTestName(const ::testing::TestParamInfo<AHardwareBuffer_Desc>& info) { in GetTestName() 93 std::ostringstream name; in GetTestName() 193 return 1 + static_cast<int>(std::floor(std::log2(static_cast<float>(std::max(width, height))))); in MipLevelCount() 254 std::unique_ptr<uint8_t[]> pixels(new uint8_t[size]); in UploadRedPixels() 267 std::unique_ptr<uint8_t[]> pixels(new uint8_t[size]); in UploadRedPixels() 280 std::unique_ptr<float[]> pixels(new float[size]); in UploadRedPixels() 293 std::unique_ptr<uint32_t[]> pixels(new uint32_t[size]); in UploadRedPixels() 328 void CheckGoldenPixel(int x, int y, const std::array<T, 4>& golden, in CheckGoldenPixel() 329 const std::array<T, 4>& actual) { in CheckGoldenPixel() 337 void CheckGoldenPixel(int x, int y, const std::array<T, 4>& minimum, in CheckGoldenPixel() [all …]
|