Home
last modified time | relevance | path

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

/frameworks/base/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/downloadmanagertests/
DDownloadManagerTestApp.java191 ParcelFileDescriptor pfd = null; in verifyFileDownloadSucceeded() local
205 pfd = mDownloadManager.openDownloadedFile(dlRequest); in verifyFileDownloadSucceeded()
206 verifyFileSize(pfd, filesize); in verifyFileDownloadSucceeded()
214 if (pfd != null) { in verifyFileDownloadSucceeded()
215 pfd.close(); in verifyFileDownloadSucceeded()
244 ParcelFileDescriptor pfd = null; in runLargeDownloadOverWiFi() local
248 pfd = mDownloadManager.openDownloadedFile(dlRequest); in runLargeDownloadOverWiFi()
249 verifyFileSize(pfd, filesize); in runLargeDownloadOverWiFi()
251 if (pfd != null) { in runLargeDownloadOverWiFi()
252 pfd.close(); in runLargeDownloadOverWiFi()
[all …]
DDownloadManagerBaseTest.java190 protected void verifyFileSize(ParcelFileDescriptor pfd, long size) { in verifyFileSize() argument
191 assertEquals(pfd.getStatSize(), size); in verifyFileSize()
/frameworks/base/native/android/
Dsensor.cpp107 struct pollfd pfd; in ASensorEventQueue_hasEvents() local
108 pfd.fd = static_cast<SensorEventQueue*>(queue)->getFd(); in ASensorEventQueue_hasEvents()
109 pfd.events = POLLIN; in ASensorEventQueue_hasEvents()
110 pfd.revents = 0; in ASensorEventQueue_hasEvents()
112 int nfd = poll(&pfd, 1, 0); in ASensorEventQueue_hasEvents()
117 if (pfd.revents != POLLIN) in ASensorEventQueue_hasEvents()
/frameworks/base/core/java/android/hardware/
DSerialPort.java59 public void open(ParcelFileDescriptor pfd, int speed) throws IOException { in open() argument
60 native_open(pfd.getFileDescriptor(), speed); in open()
61 mFileDescriptor = pfd; in open()
123 private native void native_open(FileDescriptor pfd, int speed) throws IOException; in native_open() argument
DSerialManager.java75 ParcelFileDescriptor pfd = mService.openSerialPort(name); in openSerialPort() local
76 if (pfd != null) { in openSerialPort()
78 port.open(pfd, speed); in openSerialPort()
/frameworks/base/core/java/android/hardware/usb/
DUsbDeviceConnection.java46 /* package */ boolean open(String name, ParcelFileDescriptor pfd) { in open() argument
47 return native_open(name, pfd.getFileDescriptor()); in open()
171 private native boolean native_open(String deviceName, FileDescriptor pfd); in native_open() argument
DUsbManager.java265 ParcelFileDescriptor pfd = mService.openDevice(deviceName); in openDevice() local
266 if (pfd != null) { in openDevice()
268 boolean result = connection.open(deviceName, pfd); in openDevice()
269 pfd.close(); in openDevice()
/frameworks/base/graphics/tests/graphicstests/src/android/graphics/
DBitmapFactoryTest.java37 ParcelFileDescriptor pfd = ParcelFileDescriptor.fromData(out.toByteArray(), null); in testBitmapParcelFileDescriptor() local
38 FileDescriptor fd = pfd.getFileDescriptor(); in testBitmapParcelFileDescriptor()
/frameworks/base/core/tests/coretests/src/android/app/
DDownloadManagerBaseTest.java337 protected void verifyFileSize(ParcelFileDescriptor pfd, long size) { in verifyFileSize() argument
338 assertEquals(pfd.getStatSize(), size); in verifyFileSize()
385 protected void verifyFileContents(ParcelFileDescriptor pfd, File file) throws IOException { in verifyFileContents() argument
389 AutoCloseInputStream input = new ParcelFileDescriptor.AutoCloseInputStream(pfd); in verifyFileContents()
391 assertEquals(file.length(), pfd.getStatSize()); in verifyFileContents()
485 ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(requestId); in verifyAndCleanupSingleFileDownload() local
492 verifyFileSize(pfd, fileSize); in verifyAndCleanupSingleFileDownload()
493 verifyFileContents(pfd, fileData); in verifyAndCleanupSingleFileDownload()
495 pfd.close(); in verifyAndCleanupSingleFileDownload()
DDownloadManagerStressTest.java132 ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(dlRequest); in testDownloadLargeFile() local
133 verifyFileContents(pfd, largeFile); in testDownloadLargeFile()
134 verifyFileSize(pfd, largeFile.length()); in testDownloadLargeFile()
DDownloadManagerFunctionalTest.java128 ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(requestId); in verifyDownload() local
134 verifyFileSize(pfd, fileSize); in verifyDownload()
135 verifyFileContents(pfd, fileData); in verifyDownload()
140 pfd.close(); in verifyDownload()
/frameworks/base/media/java/android/media/
DThumbnailUtils.java309 Uri uri, ContentResolver cr, ParcelFileDescriptor pfd, in makeBitmap() argument
313 if (pfd == null) pfd = makeInputStream(uri, cr); in makeBitmap()
314 if (pfd == null) return null; in makeBitmap()
317 FileDescriptor fd = pfd.getFileDescriptor(); in makeBitmap()
336 closeSilently(pfd); in makeBitmap()
/frameworks/base/core/java/android/content/res/
DAssetManager.java331 ParcelFileDescriptor pfd = openAssetFd(fileName, mOffsets); in openFd() local
332 if (pfd != null) { in openFd()
333 return new AssetFileDescriptor(pfd, mOffsets[0], mOffsets[1]); in openFd()
428 ParcelFileDescriptor pfd = openNonAssetFdNative(cookie, in openNonAssetFd() local
430 if (pfd != null) { in openNonAssetFd()
431 return new AssetFileDescriptor(pfd, mOffsets[0], mOffsets[1]); in openNonAssetFd()
/frameworks/base/core/jni/
Dandroid_app_NativeActivity.cpp148 struct pollfd pfd[2]; in hasEvents() local
150 pfd[0].fd = mConsumer.getChannel()->getFd(); in hasEvents()
151 pfd[0].events = POLLIN; in hasEvents()
152 pfd[0].revents = 0; in hasEvents()
153 pfd[1].fd = mDispatchKeyRead; in hasEvents()
154 pfd[1].events = POLLIN; in hasEvents()
155 pfd[1].revents = 0; in hasEvents()
157 int nfd = poll(pfd, 2, 0); in hasEvents()
159 return ((pfd[0].revents & POLLIN) || (pfd[1].revents & POLLIN)) ? 1 : -1; in hasEvents()
/frameworks/base/core/java/android/content/
DContentResolver.java609 ParcelFileDescriptor pfd = ParcelFileDescriptor.open( in openAssetFileDescriptor() local
611 return new AssetFileDescriptor(pfd, 0, -1); in openAssetFileDescriptor()
650 ParcelFileDescriptor pfd = new ParcelFileDescriptorInner( in openAssetFileDescriptor() local
657 return new AssetFileDescriptor(pfd, fd.getStartOffset(), in openAssetFileDescriptor()
742 ParcelFileDescriptor pfd = new ParcelFileDescriptorInner( in openTypedAssetFileDescriptor() local
749 return new AssetFileDescriptor(pfd, fd.getStartOffset(), in openTypedAssetFileDescriptor()
1892 ParcelFileDescriptorInner(ParcelFileDescriptor pfd, IContentProvider icp) { in ParcelFileDescriptorInner() argument
1893 super(pfd); in ParcelFileDescriptorInner()
/frameworks/native/cmds/dumpstate/
Dutils.c476 struct pollfd pfd = { ifd, POLLIN, 0 }; in dump_traces() local
477 int ret = poll(&pfd, 1, 200); /* 200 msec timeout */ in dump_traces()
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/
DSettingsProvider.java1031 ParcelFileDescriptor pfd = null; in openAssetFile() local
1033 pfd = context.getContentResolver().openFileDescriptor(soundUri, mode); in openAssetFile()
1034 return new AssetFileDescriptor(pfd, 0, -1); in openAssetFile()
/frameworks/base/services/java/com/android/server/
DWallpaperManagerService.java729 ParcelFileDescriptor pfd = updateWallpaperBitmapLocked(name, wallpaper); in setWallpaper() local
730 if (pfd != null) { in setWallpaper()
733 return pfd; in setWallpaper()
/frameworks/base/core/java/android/app/
DActivityManagerNative.java1095 ParcelFileDescriptor pfd = openContentUri(uri); in onTransact() local
1097 if (pfd != null) { in onTransact()
1099 pfd.writeToParcel(reply, Parcelable.PARCELABLE_WRITE_RETURN_VALUE); in onTransact()
3200 ParcelFileDescriptor pfd = null; in openContentUri() local
3202 pfd = ParcelFileDescriptor.CREATOR.createFromParcel(reply); in openContentUri()
3206 return pfd; in openContentUri()
/frameworks/base/services/java/com/android/server/am/
DActivityManagerService.java7051 ParcelFileDescriptor pfd = null; in openContentUri() local
7063 pfd = cph.provider.openFile(uri, "r"); in openContentUri()
7076 return pfd; in openContentUri()