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

/frameworks/base/core/java/android/hardware/
H A DSerialPort.java59 public void open(ParcelFileDescriptor pfd, int speed) throws IOException { argument
60 native_open(pfd.getFileDescriptor(), speed);
61 mFileDescriptor = pfd;
123 private native void native_open(FileDescriptor pfd, int speed) throws IOException; argument
H A DSerialManager.java75 ParcelFileDescriptor pfd = mService.openSerialPort(name);
76 if (pfd != null) {
78 port.open(pfd, speed);
/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.java265 ParcelFileDescriptor pfd = mService.openDevice(deviceName);
266 if (pfd != null) {
268 boolean result = connection.open(deviceName, pfd);
269 pfd.close();
/frameworks/base/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/downloadmanagertests/
H A DDownloadManagerTestApp.java191 ParcelFileDescriptor pfd = null;
205 pfd = mDownloadManager.openDownloadedFile(dlRequest);
206 verifyFileSize(pfd, filesize);
214 if (pfd != null) {
215 pfd.close();
244 ParcelFileDescriptor pfd = null;
248 pfd = mDownloadManager.openDownloadedFile(dlRequest);
249 verifyFileSize(pfd, filesize);
251 if (pfd != null) {
252 pfd
[all...]
H A DDownloadManagerBaseTest.java187 * @param pfd The input file to compare the size of
190 protected void verifyFileSize(ParcelFileDescriptor pfd, long size) { argument
191 assertEquals(pfd.getStatSize(), size);
/frameworks/base/core/tests/coretests/src/android/app/
H A DDownloadManagerStressTest.java132 ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(dlRequest);
133 verifyFileContents(pfd, largeFile);
134 verifyFileSize(pfd, largeFile.length());
H A DDownloadManagerBaseTest.java334 * @param pfd The input file to compare the size of
337 protected void verifyFileSize(ParcelFileDescriptor pfd, long size) { argument
338 assertEquals(pfd.getStatSize(), size);
381 * @param pfd The file whose data we want to verify
385 protected void verifyFileContents(ParcelFileDescriptor pfd, File file) throws IOException { argument
389 AutoCloseInputStream input = new ParcelFileDescriptor.AutoCloseInputStream(pfd);
391 assertEquals(file.length(), pfd.getStatSize());
485 ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(requestId);
492 verifyFileSize(pfd, fileSize);
493 verifyFileContents(pfd, fileDat
[all...]
H A DDownloadManagerFunctionalTest.java128 ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(requestId);
134 verifyFileSize(pfd, fileSize);
135 verifyFileContents(pfd, fileData);
140 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/media/java/android/media/
H A DThumbnailUtils.java302 * The image data will be read from specified pfd if it's not null, otherwise
309 Uri uri, ContentResolver cr, ParcelFileDescriptor pfd,
313 if (pfd == null) pfd = makeInputStream(uri, cr);
314 if (pfd == null) return null;
317 FileDescriptor fd = pfd.getFileDescriptor();
336 closeSilently(pfd);
308 makeBitmap(int minSideLength, int maxNumOfPixels, Uri uri, ContentResolver cr, ParcelFileDescriptor pfd, BitmapFactory.Options options) argument
/frameworks/base/core/jni/
H A Dandroid_app_NativeActivity.cpp148 struct pollfd pfd[2]; local
150 pfd[0].fd = mConsumer.getChannel()->getFd();
151 pfd[0].events = POLLIN;
152 pfd[0].revents = 0;
153 pfd[1].fd = mDispatchKeyRead;
154 pfd[1].events = POLLIN;
155 pfd[1].revents = 0;
157 int nfd = poll(pfd, 2, 0);
159 return ((pfd[0].revents & POLLIN) || (pfd[
[all...]
/frameworks/base/core/java/android/content/
H A DContentResolver.java609 ParcelFileDescriptor pfd = ParcelFileDescriptor.open(
611 return new AssetFileDescriptor(pfd, 0, -1);
650 ParcelFileDescriptor pfd = new ParcelFileDescriptorInner(
657 return new AssetFileDescriptor(pfd, fd.getStartOffset(),
742 ParcelFileDescriptor pfd = new ParcelFileDescriptorInner(
749 return new AssetFileDescriptor(pfd, fd.getStartOffset(),
1892 ParcelFileDescriptorInner(ParcelFileDescriptor pfd, IContentProvider icp) { argument
1893 super(pfd);
/frameworks/native/cmds/dumpstate/
H A Dutils.c476 struct pollfd pfd = { ifd, POLLIN, 0 }; local
477 int ret = poll(&pfd, 1, 200); /* 200 msec timeout */
/frameworks/base/services/java/com/android/server/
H A DWallpaperManagerService.java729 ParcelFileDescriptor pfd = updateWallpaperBitmapLocked(name, wallpaper);
730 if (pfd != null) {
733 return pfd;
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/
H A DSettingsProvider.java1031 ParcelFileDescriptor pfd = null;
1033 pfd = context.getContentResolver().openFileDescriptor(soundUri, mode);
1034 return new AssetFileDescriptor(pfd, 0, -1);
/frameworks/base/core/java/android/app/
H A DActivityManagerNative.java1095 ParcelFileDescriptor pfd = openContentUri(uri);
1097 if (pfd != null) {
1099 pfd.writeToParcel(reply, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
3185 ParcelFileDescriptor pfd = null;
3187 pfd = ParcelFileDescriptor.CREATOR.createFromParcel(reply);
3191 return pfd;
/frameworks/base/services/java/com/android/server/am/
H A DActivityManagerService.java7040 ParcelFileDescriptor pfd = null;
7052 pfd = cph.provider.openFile(uri, "r");
7054 // do nothing; pfd will be returned null
7065 return pfd;

Completed in 665 milliseconds