Home
last modified time | relevance | path

Searched refs:ret (Results 1 – 25 of 103) sorted by relevance

12345

/cts/tests/tests/graphics/jni/
DCameraTestHelpers.cpp43 int ret = ACameraManager_getCameraIdList(mCameraManager, &mCameraIdList); in initCamera() local
44 if (ret != AMEDIA_OK) { in initCamera()
45 ALOGE("Failed to get cameraIdList: ret=%d", ret); in initCamera()
46 return ret; in initCamera()
61 ret = ACameraManager_openCamera(mCameraManager, mCameraId, &mDeviceCb, in initCamera()
63 if (ret != AMEDIA_OK || mDevice == nullptr) { in initCamera()
64 ALOGE("Failed to open camera, ret=%d, mDevice=%p.", ret, mDevice); in initCamera()
68 ret = ACameraManager_getCameraCharacteristics(mCameraManager, mCameraId, in initCamera()
70 if (ret != ACAMERA_OK || mCameraMetadata == nullptr) { in initCamera()
72 mCameraId, ret, mCameraMetadata); in initCamera()
[all …]
DImageReaderTestHelpers.cpp49 int ret = AImageReader_newWithUsage(mWidth, mHeight, mFormat, mUsage, in initImageReader() local
51 if (ret != AMEDIA_OK || mImgReader == nullptr) { in initImageReader()
52 ALOGE("Failed to create new AImageReader, ret=%d, mImgReader=%p", ret, in initImageReader()
57 ret = AImageReader_setImageListener(mImgReader, &mReaderAvailableCb); in initImageReader()
58 if (ret != AMEDIA_OK) { in initImageReader()
59 ALOGE("Failed to set image available listener, ret=%d.", ret); in initImageReader()
60 return ret; in initImageReader()
63 ret = AImageReader_getWindow(mImgReader, &mImgReaderAnw); in initImageReader()
64 if (ret != AMEDIA_OK || mImgReaderAnw == nullptr) { in initImageReader()
67 ret, mImgReaderAnw); in initImageReader()
[all …]
Dandroid_graphics_cts_CameraGpuCtsActivity.cpp114 int ret = mImageReader.initImageReader(); in initRenderer() local
115 if (ret < 0) { in initRenderer()
116 ALOGE("Failed to initialize image reader: %d", ret); in initRenderer()
117 return ret; in initRenderer()
120 ret = mCamera.initCamera(mImageReader.getNativeWindow()); in initRenderer()
121 if (ret < 0) { in initRenderer()
122 ALOGE("Failed to initialize camera: %d", ret); in initRenderer()
123 return ret; in initRenderer()
190 int ret = mCamera.takePicture(); in drawFrame() local
191 if (ret < 0) { in drawFrame()
[all …]
/cts/tests/tests/graphics/src/android/graphics/cts/
DColorMatrixTest.java64 float[] ret = mColorMatrix.getArray(); in testReset() local
65 preCompare(ret); in testReset()
68 ret = mColorMatrix.getArray(); in testReset()
69 assertEquals(20, ret.length); in testReset()
73 assertEquals(1.0f, ret[i], 0.0f); in testReset()
77 assertEquals(0.0f, ret[i], 0.0f); in testReset()
83 float[] ret = mColorMatrix.getArray(); in testSet1() local
84 preCompare(ret); in testSet1()
94 ret = mColorMatrix.getArray(); in testSet1()
95 assertArrayEquals(fArray, ret, 0.0f); in testSet1()
[all …]
/cts/hostsidetests/security/securityPatch/CVE-2014-3145/
Dpoc.c66 ssize_t ret; in send_receive_packet() local
68 ret = send(s[1], pkt, len, 0); in send_receive_packet()
69 if (ret != len) { in send_receive_packet()
73 ret = recv(s[0], tmp, len, MSG_DONTWAIT); in send_receive_packet()
74 if (ret < 0 && errno == EAGAIN) in send_receive_packet()
93 int s[2], ret; in main() local
95 ret = socketpair(AF_UNIX, SOCK_DGRAM, 0, s); in main()
96 if (ret) { in main()
100 ret = setsockopt(s[0], SOL_SOCKET, SO_ATTACH_FILTER, in main()
102 if (ret < 0) { in main()
[all …]
/cts/tests/tests/media/libimagereaderjni/
DAImageReaderCts.cpp79 int ret; in initCamera() local
87 ret = ACameraManager_getCameraIdList(mCameraManager, &mCameraIdList); in initCamera()
88 if (ret != AMEDIA_OK) { in initCamera()
89 ALOGE("Failed to get cameraIdList: ret=%d", ret); in initCamera()
90 return ret; in initCamera()
104 ret = ACameraManager_openCamera(mCameraManager, mCameraId, &mDeviceCb, &mDevice); in initCamera()
105 if (ret != AMEDIA_OK || mDevice == nullptr) { in initCamera()
106 ALOGE("Failed to open camera, ret=%d, mDevice=%p.", ret, mDevice); in initCamera()
110 ret = ACameraManager_getCameraCharacteristics(mCameraManager, mCameraId, &mCameraMetadata); in initCamera()
111 if (ret != ACAMERA_OK || mCameraMetadata == nullptr) { in initCamera()
[all …]
/cts/tests/camera/libctscamera2jni/
Dnative-camera-jni.cpp163 camera_status_t ret = ACameraCaptureSession_getDevice(session, &device); in onReady() local
165 if (ret != ACAMERA_OK && !thiz->mIsClosed) { in onReady()
183 camera_status_t ret = ACameraCaptureSession_getDevice(session, &device); in onActive() local
184 if (ret != ACAMERA_OK) { in onActive()
270 auto ret = ACameraMetadata_getConstEntry(result, ACAMERA_SYNC_FRAME_NUMBER, &entry); in onCaptureCompleted() local
271 if (ret != ACAMERA_OK) { in onCaptureCompleted()
327 int64_t ret = -1; in getCaptureSequenceLastFrameNumber() local
339 ret = mLastSequenceFrameNumber; in getCaptureSequenceLastFrameNumber()
342 return ret; in getCaptureSequenceLastFrameNumber()
346 bool ret = false; in waitForFrameNumber() local
[all …]
/cts/hostsidetests/security/securityPatch/CVE-2016-8426/
Dpoc.c52 int ret = 0; in set_affinity() local
56 ret = sched_setaffinity(0, sizeof(cpu_set_t), &mask); in set_affinity()
57 if(ret == -1){ in set_affinity()
60 return ret; in set_affinity()
84 int i, try_time = TRY_TIMES, ret; in main() local
100 ret = ioctl(fd, NVHOST_IOCTL_CHANNEL_OPEN, &o_args); in main()
101 if(ret == -1) { in main()
115 ret = pthread_create(close_thread_id + i, NULL, close_thread, NULL); in main()
116 if(ret){ in main()
127 ret = ioctl(fd, NVHOST_IOCTL_CHANNEL_OPEN, &o_args); in main()
[all …]
/cts/hostsidetests/security/securityPatch/CVE-2016-8425/
Dpoc.c52 int ret = 0; in set_affinity() local
56 ret = sched_setaffinity(0, sizeof(cpu_set_t), &mask); in set_affinity()
57 if(ret == -1){ in set_affinity()
60 return ret; in set_affinity()
84 int i, try_time = TRY_TIMES, ret; in main() local
100 ret = ioctl(fd, NVHOST_IOCTL_CHANNEL_OPEN, &o_args); in main()
101 if(ret == -1) { in main()
115 ret = pthread_create(close_thread_id + i, NULL, close_thread, NULL); in main()
116 if(ret){ in main()
125 ret = ioctl(fd, NVHOST_IOCTL_CHANNEL_OPEN, &o_args); in main()
/cts/hostsidetests/security/securityPatch/CVE-2016-6733/
Dpoc.c85 int ret = 0; in set_affinity() local
89 ret = sched_setaffinity(0, sizeof(cpu_set_t), &mask); in set_affinity()
90 if(ret == -1){ in set_affinity()
93 return ret; in set_affinity()
103 int ret = 1; in child() local
106 while(ret){ in child()
107 ret = ioctl(fd, DRM_IOCTL_TEGRA_CLOSE_CHANNEL, &close_c); in child()
114 int i, try_time = THREAD_NUM, ret; in main() local
136 ret = ioctl(fd, DRM_IOCTL_TEGRA_OPEN_CHANNEL, &open_c); in main()
139 ret = ioctl(fd, DRM_IOCTL_TEGRA_CLOSE_CHANNEL, &close_c); in main()
[all …]
/cts/hostsidetests/security/securityPatch/CVE-2016-6732/
Dpoc.c86 int ret = 0; in set_affinity() local
90 ret = sched_setaffinity(0, sizeof(cpu_set_t), &mask); in set_affinity()
91 if(ret == -1){ in set_affinity()
93 return ret; in set_affinity()
103 int ret = 1; in child() local
106 while(ret){ in child()
107 ret = ioctl(fd, DRM_IOCTL_TEGRA_CLOSE_CHANNEL, &close_c); in child()
114 int i, try_time = TRY_TIMES, ret; in main() local
135 ret = ioctl(fd, DRM_IOCTL_TEGRA_OPEN_CHANNEL, &open_c); in main()
136 if(ret){ in main()
/cts/hostsidetests/security/securityPatch/CVE-2016-8479/
Dpoc.c117 int ret = 0; in set_affinity() local
121 ret = sched_setaffinity(0, sizeof(cpu_set_t), &mask); in set_affinity()
122 return ret; in set_affinity()
126 int ret = 1; in child_ioctl_0() local
132 ret = ioctl(fd, IOCTL_KGSL_DRAWCTXT_DESTROY, &kdd); in child_ioctl_0()
137 int ret = 1; in child_ioctl_1() local
143 ret = ioctl(fd, IOCTL_KGSL_DRAWCTXT_DESTROY, &kdd); in child_ioctl_1()
148 int ret = 1; in child_ioctl_2() local
153 ret = ioctl(fd, IOCTL_KGSL_DRAWCTXT_CREATE, &kdc); in child_ioctl_2()
159 int i, ret; in main() local
[all …]
/cts/common/device-side/util/src/com/android/compatibility/common/util/
DBundleUtils.java32 final Bundle ret = new Bundle(); in makeBundle() local
39 ret.putString(key, null); in makeBundle()
42 ret.putBoolean(key, (Boolean) value); in makeBundle()
45 ret.putInt(key, (Integer) value); in makeBundle()
48 ret.putString(key, (String) value); in makeBundle()
51 ret.putBundle(key, (Bundle) value); in makeBundle()
57 return ret; in makeBundle()
/cts/hostsidetests/security/securityPatch/CVE-2017-6262/
Dpoc.c32 int ret; in drm_version() local
42 ret = ioctl(fd, DRM_IOCTL_VERSION, &ver); in drm_version()
44 if (ret == -1) { in drm_version()
52 int ret; in nouveau_gem_ioctl_new() local
60 ret = ioctl(fd, DRM_IOCTL_NOUVEAU_GEM_NEW, &new_arg); in nouveau_gem_ioctl_new()
61 if (ret == -1) { in nouveau_gem_ioctl_new()
79 int ret; in nouveau_gem_ioctl_map() local
85 ret = ioctl(fd, DRM_IOCTL_NOUVEAU_GEM_MAP, &map_arg); in nouveau_gem_ioctl_map()
86 if (ret == -1) { in nouveau_gem_ioctl_map()
/cts/hostsidetests/security/securityPatch/CVE-2016-6734/
Dpoc.c91 int ret = 0; in set_affinity() local
95 ret = sched_setaffinity(0, sizeof(cpu_set_t), &mask); in set_affinity()
96 if(ret == -1){ in set_affinity()
98 return ret; in set_affinity()
117 int i, try_time = TRY_TIMES, ret; in main() local
133 ret = pthread_create(keepon_thread_id + i, NULL, keepon_thread, NULL); in main()
134 if(ret){ in main()
141 ret = ioctl(fd, DRM_IOCTL_TEGRA_OPEN_CHANNEL, &open_c); in main()
142 if(ret == 0){ in main()
149 ret = ioctl(fd, DRM_IOCTL_TEGRA_CLOSE_CHANNEL, &close_c); in main()
/cts/hostsidetests/security/securityPatch/CVE-2016-6731/
Dpoc.c94 int ret = 0; in set_affinity() local
98 ret = sched_setaffinity(0, sizeof(cpu_set_t), &mask); in set_affinity()
99 if(ret == -1){ in set_affinity()
101 return ret; in set_affinity()
120 int i, try_time = TRY_TIMES, ret; in main() local
136 ret = pthread_create(clk_thread_id + i, NULL, clk_thread, NULL); in main()
137 if(ret){ in main()
144 ret = ioctl(fd, DRM_IOCTL_TEGRA_OPEN_CHANNEL, &open_c); in main()
145 if(ret == 0){ in main()
152 ret = ioctl(fd, DRM_IOCTL_TEGRA_CLOSE_CHANNEL, &close_c); in main()
/cts/hostsidetests/security/securityPatch/CVE-2016-6730/
Dpoc.c94 int ret = 0; in set_affinity() local
98 ret = sched_setaffinity(0, sizeof(cpu_set_t), &mask); in set_affinity()
99 if(ret == -1){ in set_affinity()
101 return ret; in set_affinity()
120 int i, try_time = TRY_TIMES, ret; in main() local
136 ret = pthread_create(clk_thread_id + i, NULL, clk_thread, NULL); in main()
137 if(ret){ in main()
144 ret = ioctl(fd, DRM_IOCTL_TEGRA_OPEN_CHANNEL, &open_c); in main()
145 if(ret == 0){ in main()
152 ret = ioctl(fd, DRM_IOCTL_TEGRA_CLOSE_CHANNEL, &close_c); in main()
/cts/hostsidetests/security/securityPatch/CVE-2016-8482/
Dpoc.c71 int ret = 0; in set_affinity() local
75 ret = sched_setaffinity(0, sizeof(cpu_set_t), &mask); in set_affinity()
76 if(ret == -1){ in set_affinity()
79 return ret; in set_affinity()
123 int ret; in close_thread() local
127 ret = ioctl(vic, NVHOST_IOCTL_CHANNEL_SET_ERROR_NOTIFIER, &err1); in close_thread()
135 int i, j, ret; in main() local
172 ret = ioctl(nvmap, NVMAP_IOC_CREATE, &args); in main()
173 if(ret) in main()
182 ret = ioctl(nvmap, NVMAP_IOC_ALLOC, &alloc); in main()
[all …]
/cts/hostsidetests/security/securityPatch/CVE-2016-6735/
Dpoc.c92 int ret = 0; in set_affinity() local
96 ret = sched_setaffinity(0, sizeof(cpu_set_t), &mask); in set_affinity()
97 return ret; in set_affinity()
116 int i, try_time = TRY_TIMES, ret; in main() local
132 ret = pthread_create(keepon_thread_id + i, NULL, keepon_thread, NULL); in main()
133 if(ret){ in main()
140 ret = ioctl(fd, DRM_IOCTL_TEGRA_OPEN_CHANNEL, &open_c); in main()
141 if(ret == 0){ in main()
148 ret = ioctl(fd, DRM_IOCTL_TEGRA_CLOSE_CHANNEL, &close_c); in main()
/cts/tests/tests/shortcutmanager/common/src/android.content.pm.cts.shortcutmanager.common/
DReplyUtil.java52 final Bundle ret = new Bundle(); in sendReply() local
54 ret.putBoolean("success", true); in sendReply()
56 ret.putString("error", failureMessageOrNullForSuccess); in sendReply()
61 reply.putExtras(ret); in sendReply()
71 final AtomicReference<Intent> ret = new AtomicReference<>(); in invokeAndWaitForReply() local
82 ret.set(intent); in invokeAndWaitForReply()
93 retryUntil(() -> ret.get() != null, "Didn't receive result broadcast", 120); in invokeAndWaitForReply()
95 if (ret.get().getExtras().getBoolean("success")) { in invokeAndWaitForReply()
98 Assert.fail(ret.get().getExtras().getString("error")); in invokeAndWaitForReply()
/cts/hostsidetests/security/securityPatch/CVE-2016-6736/
Dpoc.c106 int ret = 0; in set_affinity() local
110 ret = sched_setaffinity(0, sizeof(cpu_set_t), &mask); in set_affinity()
111 return ret; in set_affinity()
130 int i, try_time = TRY_TIMES, ret; in main() local
146 ret = pthread_create(submit_thread_id + i, NULL, submit_thread, NULL); in main()
147 if(ret){ in main()
154 ret = ioctl(fd, DRM_IOCTL_TEGRA_OPEN_CHANNEL, &open_c); in main()
155 if(ret == 0){ in main()
162 ret = ioctl(fd, DRM_IOCTL_TEGRA_CLOSE_CHANNEL, &close_c); in main()
/cts/hostsidetests/security/securityPatch/CVE-2016-8432/
Dpoc.c48 int ret = 0; in set_affinity() local
52 ret = sched_setaffinity(0, sizeof(cpu_set_t), &mask); in set_affinity()
53 if(ret == -1){ in set_affinity()
55 return ret; in set_affinity()
101 int ret; in main() local
114 ret = ioctl(dev_fd, DRM_IOCTL_TEGRA_OPEN_CHANNEL, &open_c); in main()
115 if(ret == -1){ in main()
123 ret = ioctl(dev_fd, DRM_IOCTL_TEGRA_GEM_CREATE, &gem_create); in main()
124 if(ret == 0){ in main()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/
DDynamicSensorDiscoveryTestActivity.java186 boolean ret; in waitForConnection()
190 ret = mConnectLatch.await(CONNECTION_TIMEOUT_SEC, TimeUnit.SECONDS); in waitForConnection()
192 ret = false; in waitForConnection()
197 return ret; in waitForConnection()
201 boolean ret; in waitForDisconnection()
204 ret = mDisconnectLatch.await(DISCONNECTION_TIMEOUT_SEC, TimeUnit.SECONDS); in waitForDisconnection()
206 ret = false; in waitForDisconnection()
211 return ret; in waitForDisconnection()
235 boolean ret; in waitForSensorEvent()
237 ret = eventLatch.await(EVENT_TIMEOUT_SEC, TimeUnit.SECONDS); in waitForSensorEvent()
[all …]
/cts/tests/tests/security/src/android/security/cts/
DAudioSecurityTest.java161 Integer ret = (Integer) AudioEffect.class.getDeclaredMethod( in testAudioEffectGetParameter() local
165 assertTrue("Audio server might have crashed", ret != ERROR_DEAD_OBJECT); in testAudioEffectGetParameter()
212 Integer ret = (Integer) AudioEffect.class.getDeclaredMethod( in testAudioEffectGetParameter2() local
217 assertTrue("Audio server might have crashed", ret != ERROR_DEAD_OBJECT); in testAudioEffectGetParameter2()
235 Integer ret = (Integer) AudioEffect.class.getDeclaredMethod( in testAudioEffectGetParameter3() local
242 assertTrue("Audio server might have crashed", ret != ERROR_DEAD_OBJECT); in testAudioEffectGetParameter3()
280 Integer ret = (Integer) AudioEffect.class.getDeclaredMethod( in testAudioEffectSetParameter() local
284 assertTrue("Audio server might have crashed", ret != ERROR_DEAD_OBJECT); in testAudioEffectSetParameter()
301 Integer ret = (Integer) AudioEffect.class.getDeclaredMethod( in testAudioEffectSetOffload() local
308 assertTrue("Audio server might have crashed", ret != ERROR_DEAD_OBJECT); in testAudioEffectSetOffload()
[all …]
/cts/hostsidetests/jvmti/attaching/app/jni/
Dcts_agent.cpp57 jvmtiError ret = jvmti_env->SetEventNotificationMode(JVMTI_DISABLE, variable
60 if (JvmtiErrorToException(env, jvmti_env, ret)) {
63 ret = jvmti_env->SetEventNotificationMode(JVMTI_DISABLE,
66 JvmtiErrorToException(env, jvmti_env, ret);
74 jvmtiError ret = jvmti_env->SetEventCallbacks(&callbacks, sizeof(callbacks)); variable
75 if (JvmtiErrorToException(env, jvmti_env, ret)) {
79 ret = jvmti_env->SetEventNotificationMode(JVMTI_ENABLE,
82 if (JvmtiErrorToException(env, jvmti_env, ret)) {
85 ret = jvmti_env->SetEventNotificationMode(JVMTI_ENABLE,
88 JvmtiErrorToException(env, jvmti_env, ret);

12345