Searched refs:pfd (Results 1 - 20 of 20) 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/graphics/tests/graphicstests/src/android/graphics/
H A DBitmapFactoryTest.java37 ParcelFileDescriptor pfd = ParcelFileDescriptor.fromData(out.toByteArray(), null);
38 FileDescriptor fd = pfd.getFileDescriptor();
/frameworks/base/core/java/android/hardware/usb/
H A DUsbDeviceConnection.java46 /* package */ boolean open(String name, ParcelFileDescriptor pfd) { argument
47 return native_open(name, pfd.getFileDescriptor());
171 private native boolean native_open(String deviceName, FileDescriptor pfd); argument
H A DUsbManager.java255 ParcelFileDescriptor pfd = mService.openDevice(deviceName);
256 if (pfd != null) {
258 boolean result = connection.open(deviceName, pfd);
259 pfd.close();
/frameworks/base/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/
H A DDownloadManagerTestApp.java201 ParcelFileDescriptor pfd = null;
215 pfd = mDownloadManager.openDownloadedFile(dlRequest);
216 verifyFileSize(pfd, filesize);
224 if (pfd != null) {
225 pfd.close();
254 ParcelFileDescriptor pfd = null;
258 pfd = mDownloadManager.openDownloadedFile(dlRequest);
259 verifyFileSize(pfd, filesize);
261 if (pfd != null) {
262 pfd
[all...]
H A DDownloadManagerBaseTest.java319 * @param pfd The input file to compare the size of
322 protected void verifyFileSize(ParcelFileDescriptor pfd, long size) { argument
323 assertEquals(pfd.getStatSize(), size);
/frameworks/base/core/tests/coretests/src/android/app/
H A DDownloadManagerStressTest.java133 ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(dlRequest);
134 verifyFileContents(pfd, largeFile);
135 verifyFileSize(pfd, largeFile.length());
H A DDownloadManagerBaseTest.java337 * @param pfd The input file to compare the size of
340 protected void verifyFileSize(ParcelFileDescriptor pfd, long size) { argument
341 assertEquals(pfd.getStatSize(), size);
384 * @param pfd The file whose data we want to verify
388 protected void verifyFileContents(ParcelFileDescriptor pfd, File file) throws IOException { argument
392 AutoCloseInputStream input = new ParcelFileDescriptor.AutoCloseInputStream(pfd);
394 assertEquals(file.length(), pfd.getStatSize());
488 ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(requestId);
497 verifyFileSize(pfd, fileSize);
498 verifyFileContents(pfd, fileDat
[all...]
H A DDownloadManagerFunctionalTest.java129 ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(requestId);
137 verifyFileSize(pfd, fileSize);
138 verifyFileContents(pfd, fileData);
143 pfd.close();
/frameworks/base/core/java/android/content/res/
H A DAssetManager.java331 ParcelFileDescriptor pfd = openAssetFd(fileName, mOffsets);
332 if (pfd != null) {
333 return new AssetFileDescriptor(pfd, mOffsets[0], mOffsets[1]);
428 ParcelFileDescriptor pfd = openNonAssetFdNative(cookie,
430 if (pfd != null) {
431 return new AssetFileDescriptor(pfd, mOffsets[0], mOffsets[1]);
/frameworks/base/core/jni/
H A Dandroid_bluetooth_HeadsetBase.cpp111 struct pollfd pfd; local
115 pfd.fd = fd;
116 pfd.events = POLLIN;
118 int ret = poll(&pfd, 1, timeout_ms);
128 if (pfd.revents & (POLLHUP | POLLERR | POLLNVAL)) {
130 "but with an unexpected revents bitmask: %#x\n", ret, pfd.revents);
H A Dandroid_app_NativeActivity.cpp145 struct pollfd pfd[2]; local
147 pfd[0].fd = mConsumer.getChannel()->getReceivePipeFd();
148 pfd[0].events = POLLIN;
149 pfd[0].revents = 0;
150 pfd[1].fd = mDispatchKeyRead;
151 pfd[1].events = POLLIN;
152 pfd[1].revents = 0;
154 int nfd = poll(pfd, 2, 0);
156 return ((pfd[0].revents & POLLIN) || (pfd[
[all...]
/frameworks/base/media/java/android/media/
H A DThumbnailUtils.java291 * The image data will be read from specified pfd if it's not null, otherwise
298 Uri uri, ContentResolver cr, ParcelFileDescriptor pfd,
302 if (pfd == null) pfd = makeInputStream(uri, cr);
303 if (pfd == null) return null;
306 FileDescriptor fd = pfd.getFileDescriptor();
325 closeSilently(pfd);
297 makeBitmap(int minSideLength, int maxNumOfPixels, Uri uri, ContentResolver cr, ParcelFileDescriptor pfd, BitmapFactory.Options options) argument
/frameworks/base/core/java/android/content/
H A DContentResolver.java531 ParcelFileDescriptor pfd = ParcelFileDescriptor.open(
533 return new AssetFileDescriptor(pfd, 0, -1);
548 ParcelFileDescriptor pfd = new ParcelFileDescriptorInner(
555 return new AssetFileDescriptor(pfd, fd.getStartOffset(),
612 ParcelFileDescriptor pfd = new ParcelFileDescriptorInner(
619 return new AssetFileDescriptor(pfd, fd.getStartOffset(),
1620 ParcelFileDescriptorInner(ParcelFileDescriptor pfd, IContentProvider icp) { argument
1621 super(pfd);
/frameworks/base/core/java/android/server/
H A DBluetoothHealthProfileHandler.java337 ParcelFileDescriptor pfd = null;
339 pfd = chan.mChannelFd.dup();
340 return pfd;
/frameworks/base/cmds/dumpstate/
H A Dutils.c413 struct pollfd pfd = { ifd, POLLIN, 0 }; local
414 int ret = poll(&pfd, 1, 200); /* 200 msec timeout */
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/
H A DSettingsProvider.java693 ParcelFileDescriptor pfd = null;
695 pfd = context.getContentResolver().openFileDescriptor(soundUri, mode);
696 return new AssetFileDescriptor(pfd, 0, -1);
/frameworks/base/services/java/com/android/server/
H A DWallpaperManagerService.java465 ParcelFileDescriptor pfd = updateWallpaperBitmapLocked(name);
466 if (pfd != null) {
469 return pfd;
/frameworks/base/core/java/android/app/
H A DActivityManagerNative.java961 ParcelFileDescriptor pfd = openContentUri(uri);
963 if (pfd != null) {
965 pfd.writeToParcel(reply, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
2749 ParcelFileDescriptor pfd = null;
2751 pfd = ParcelFileDescriptor.CREATOR.createFromParcel(reply);
2755 return pfd;
/frameworks/base/services/java/com/android/server/am/
H A DActivityManagerService.java6375 ParcelFileDescriptor pfd = null;
6387 pfd = cph.provider.openFile(uri, "r");
6389 // do nothing; pfd will be returned null
6400 return pfd;

Completed in 471 milliseconds