Searched refs:pfd (Results 1 - 15 of 15) sorted by relevance

/frameworks/base/native/android/
H A Dsensor.cpp107 struct pollfd pfd; local
108 pfd.fd = static_cast<SensorEventQueue*>(queue)->getFd();
109 pfd.events = POLLIN;
110 pfd.revents = 0;
112 int nfd = poll(&pfd, 1, 0);
117 if (pfd.revents != POLLIN)
/frameworks/base/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/
H A DDownloadManagerTestApp.java202 ParcelFileDescriptor pfd = null;
216 pfd = mDownloadManager.openDownloadedFile(dlRequest);
217 verifyFileSize(pfd, filesize);
225 if (pfd != null) {
226 pfd.close();
255 ParcelFileDescriptor pfd = null;
259 pfd = mDownloadManager.openDownloadedFile(dlRequest);
260 verifyFileSize(pfd, filesize);
262 if (pfd != null) {
263 pfd
[all...]
/frameworks/base/core/tests/coretests/src/android/app/
H A DDownloadManagerStressTest.java93 ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(reqs[i]);
94 pfd.close();
120 ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(dlRequest);
121 verifyFileContents(pfd, largeFile);
122 verifyFileSize(pfd, largeFile.length());
H A DDownloadManagerBaseTest.java338 * @param pfd The input file to compare the size of
341 protected void verifyFileSize(ParcelFileDescriptor pfd, long size) { argument
342 assertEquals(pfd.getStatSize(), size);
385 * @param pfd The file whose data we want to verify
389 protected void verifyFileContents(ParcelFileDescriptor pfd, File file) throws IOException { argument
393 AutoCloseInputStream input = new ParcelFileDescriptor.AutoCloseInputStream(pfd);
395 assertEquals(file.length(), pfd.getStatSize());
489 ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(requestId);
498 verifyFileSize(pfd, fileSize);
499 verifyFileContents(pfd, fileDat
[all...]
/frameworks/base/core/java/android/content/res/
H A DAssetManager.java330 ParcelFileDescriptor pfd = openAssetFd(fileName, mOffsets);
331 if (pfd != null) {
332 return new AssetFileDescriptor(pfd, mOffsets[0], mOffsets[1]);
427 ParcelFileDescriptor pfd = openNonAssetFdNative(cookie,
429 if (pfd != null) {
430 return new AssetFileDescriptor(pfd, mOffsets[0], mOffsets[1]);
/frameworks/base/core/jni/
H A Dandroid_bluetooth_HeadsetBase.cpp110 struct pollfd pfd; local
114 pfd.fd = fd;
115 pfd.events = POLLIN;
117 int ret = poll(&pfd, 1, timeout_ms);
127 if (pfd.revents & (POLLHUP | POLLERR | POLLNVAL)) {
129 "but with an unexpected revents bitmask: %#x\n", ret, pfd.revents);
H A Dandroid_app_NativeActivity.cpp147 struct pollfd pfd[2]; local
149 pfd[0].fd = mConsumer.getChannel()->getReceivePipeFd();
150 pfd[0].events = POLLIN;
151 pfd[0].revents = 0;
152 pfd[1].fd = mDispatchKeyRead;
153 pfd[0].events = POLLIN;
154 pfd[0].revents = 0;
156 int nfd = poll(pfd, 2, 0);
158 return (pfd[0].revents == POLLIN || pfd[
[all...]
/frameworks/base/media/java/android/media/
H A DThumbnailUtils.java275 * The image data will be read from specified pfd if it's not null, otherwise
282 Uri uri, ContentResolver cr, ParcelFileDescriptor pfd,
286 if (pfd == null) pfd = makeInputStream(uri, cr);
287 if (pfd == null) return null;
290 FileDescriptor fd = pfd.getFileDescriptor();
309 closeSilently(pfd);
281 makeBitmap(int minSideLength, int maxNumOfPixels, Uri uri, ContentResolver cr, ParcelFileDescriptor pfd, BitmapFactory.Options options) argument
/frameworks/base/core/java/android/content/
H A DContentResolver.java475 ParcelFileDescriptor pfd = ParcelFileDescriptor.open(
477 return new AssetFileDescriptor(pfd, 0, -1);
489 ParcelFileDescriptor pfd = new ParcelFileDescriptorInner(
491 return new AssetFileDescriptor(pfd, fd.getStartOffset(),
1412 ParcelFileDescriptorInner(ParcelFileDescriptor pfd, IContentProvider icp) { argument
1413 super(pfd);
/frameworks/base/cmds/dumpstate/
H A Dutils.c403 struct pollfd pfd = { ifd, POLLIN, 0 }; local
404 int ret = poll(&pfd, 1, 200); /* 200 msec timeout */
/frameworks/base/libs/ui/
H A DEventHub.cpp448 const struct pollfd& pfd = mFDs[mInputDeviceIndex]; local
449 if (pfd.revents & POLLIN) {
450 int32_t readSize = read(pfd.fd, mInputBufferData,
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/
H A DSettingsProvider.java699 ParcelFileDescriptor pfd = null;
701 pfd = context.getContentResolver().openFileDescriptor(soundUri, mode);
702 return new AssetFileDescriptor(pfd, 0, -1);
/frameworks/base/services/java/com/android/server/
H A DWallpaperManagerService.java432 ParcelFileDescriptor pfd = updateWallpaperBitmapLocked(name);
433 if (pfd != null) {
438 return pfd;
/frameworks/base/core/java/android/app/
H A DActivityManagerNative.java937 ParcelFileDescriptor pfd = openContentUri(uri);
939 if (pfd != null) {
941 pfd.writeToParcel(reply, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
2430 ParcelFileDescriptor pfd = null;
2432 pfd = ParcelFileDescriptor.CREATOR.createFromParcel(reply);
2436 return pfd;
/frameworks/base/services/java/com/android/server/am/
H A DActivityManagerService.java5658 ParcelFileDescriptor pfd = null;
5670 pfd = cph.provider.openFile(uri, "r");
5672 // do nothing; pfd will be returned null
5683 return pfd;

Completed in 307 milliseconds