Home
last modified time | relevance | path

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

123

/frameworks/base/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/downloadmanagertests/
DDownloadManagerTestApp.java188 ParcelFileDescriptor pfd = null; in verifyFileDownloadSucceeded() local
200 pfd = mDownloadManager.openDownloadedFile(dlRequest); in verifyFileDownloadSucceeded()
201 verifyFileSize(pfd, filesize); in verifyFileDownloadSucceeded()
209 if (pfd != null) { in verifyFileDownloadSucceeded()
210 pfd.close(); in verifyFileDownloadSucceeded()
239 ParcelFileDescriptor pfd = null; in runLargeDownloadOverWiFi() local
243 pfd = mDownloadManager.openDownloadedFile(dlRequest); in runLargeDownloadOverWiFi()
244 verifyFileSize(pfd, filesize); in runLargeDownloadOverWiFi()
246 if (pfd != null) { in runLargeDownloadOverWiFi()
247 pfd.close(); in runLargeDownloadOverWiFi()
[all …]
/frameworks/support/compat/java/android/support/v4/net/
DTrafficStatsCompat.java35 final ParcelFileDescriptor pfd = ParcelFileDescriptor.fromDatagramSocket(socket); in tagDatagramSocket() local
36 TrafficStats.tagSocket(new DatagramSocketWrapper(socket, pfd.getFileDescriptor())); in tagDatagramSocket()
41 pfd.detachFd(); in tagDatagramSocket()
45 final ParcelFileDescriptor pfd = ParcelFileDescriptor.fromDatagramSocket(socket); in untagDatagramSocket() local
46 TrafficStats.untagSocket(new DatagramSocketWrapper(socket, pfd.getFileDescriptor())); in untagDatagramSocket()
51 pfd.detachFd(); in untagDatagramSocket()
/frameworks/base/core/java/android/util/
DMemoryIntArray.java81 ParcelFileDescriptor pfd = parcel.readParcelable(null); in MemoryIntArray() local
82 if (pfd == null) { in MemoryIntArray()
85 mFd = pfd.detachFd(); in MemoryIntArray()
175 ParcelFileDescriptor pfd = ParcelFileDescriptor.adoptFd(mFd); in writeToParcel() local
178 parcel.writeParcelable(pfd, flags & ~Parcelable.PARCELABLE_WRITE_RETURN_VALUE); in writeToParcel()
180 pfd.detachFd(); in writeToParcel()
/frameworks/base/tools/incident_report/
Dmain.cpp328 int pfd[2]; in adb_incident_workaround() local
329 if (pipe(pfd) != 0) { in adb_incident_workaround()
340 dup2(pfd[1], STDOUT_FILENO); in adb_incident_workaround()
341 close(pfd[0]); in adb_incident_workaround()
342 close(pfd[1]); in adb_incident_workaround()
361 close(pfd[1]); in adb_incident_workaround()
365 ssize_t amt = read(pfd[0], buffer + size, maxAllowedSize - size); in adb_incident_workaround()
399 close(pfd[0]); in adb_incident_workaround()
491 int pfd[2]; in main() local
492 if (pipe(pfd) != 0) { in main()
[all …]
/frameworks/base/core/java/android/hardware/
DSerialPort.java54 public void open(ParcelFileDescriptor pfd, int speed) throws IOException { in open() argument
55 native_open(pfd.getFileDescriptor(), speed); in open()
56 mFileDescriptor = pfd; in open()
122 private native void native_open(FileDescriptor pfd, int speed) throws IOException; in native_open() argument
DSerialManager.java70 ParcelFileDescriptor pfd = mService.openSerialPort(name); in openSerialPort() local
71 if (pfd != null) { in openSerialPort()
73 port.open(pfd, speed); in openSerialPort()
/frameworks/base/native/android/
Dsensor.cpp254 struct pollfd pfd; in ASensorEventQueue_hasEvents() local
255 pfd.fd = static_cast<SensorEventQueue*>(queue)->getFd(); in ASensorEventQueue_hasEvents()
256 pfd.events = POLLIN; in ASensorEventQueue_hasEvents()
257 pfd.revents = 0; in ASensorEventQueue_hasEvents()
259 int nfd = poll(&pfd, 1, 0); in ASensorEventQueue_hasEvents()
264 if (pfd.revents != POLLIN) in ASensorEventQueue_hasEvents()
/frameworks/base/drm/java/android/drm/
DDrmOutputStream.java56 public DrmOutputStream(DrmManagerClient client, ParcelFileDescriptor pfd, String mimeType) in DrmOutputStream() argument
59 mPfd = pfd; in DrmOutputStream()
60 mFd = pfd.getFileDescriptor(); in DrmOutputStream()
/frameworks/base/core/tests/coretests/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/java/android/net/
DIpSecManager.java275 private void applyTransportModeTransform(ParcelFileDescriptor pfd, IpSecTransform transform) { in applyTransportModeTransform() argument
277 mService.applyTransportModeTransform(pfd, transform.getResourceId()); in applyTransportModeTransform()
361 private void removeTransportModeTransform(ParcelFileDescriptor pfd, IpSecTransform transform) { in removeTransportModeTransform() argument
363 mService.removeTransportModeTransform(pfd, transform.getResourceId()); in removeTransportModeTransform()
/frameworks/base/core/tests/coretests/src/android/app/
DDownloadManagerBaseTest.java342 protected void verifyFileSize(ParcelFileDescriptor pfd, long size) { in verifyFileSize() argument
343 assertEquals(pfd.getStatSize(), size); in verifyFileSize()
390 protected void verifyFileContents(ParcelFileDescriptor pfd, File file) throws IOException { in verifyFileContents() argument
394 AutoCloseInputStream input = new ParcelFileDescriptor.AutoCloseInputStream(pfd); in verifyFileContents()
396 assertEquals(file.length(), pfd.getStatSize()); in verifyFileContents()
490 ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(requestId); in verifyAndCleanupSingleFileDownload() local
497 verifyFileSize(pfd, fileSize); in verifyAndCleanupSingleFileDownload()
498 verifyFileContents(pfd, fileData); in verifyAndCleanupSingleFileDownload()
500 pfd.close(); in verifyAndCleanupSingleFileDownload()
DDownloadManagerStressTest.java134 ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(dlRequest); in testDownloadLargeFile() local
135 verifyFileContents(pfd, largeFile); in testDownloadLargeFile()
136 verifyFileSize(pfd, largeFile.length()); in testDownloadLargeFile()
DDownloadManagerFunctionalTest.java132 ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(requestId); in verifyDownload() local
138 verifyFileSize(pfd, fileSize); in verifyDownload()
139 verifyFileContents(pfd, fileData); in verifyDownload()
142 pfd.close(); in verifyDownload()
/frameworks/base/media/java/android/media/
DThumbnailUtils.java304 Uri uri, ContentResolver cr, ParcelFileDescriptor pfd, in makeBitmap() argument
308 if (pfd == null) pfd = makeInputStream(uri, cr); in makeBitmap()
309 if (pfd == null) return null; in makeBitmap()
312 FileDescriptor fd = pfd.getFileDescriptor(); in makeBitmap()
331 closeSilently(pfd); in makeBitmap()
/frameworks/base/core/java/android/hardware/usb/
DUsbDeviceConnection.java60 /* package */ boolean open(String name, ParcelFileDescriptor pfd, @NonNull Context context) { in open() argument
62 boolean wasOpened = native_open(name, pfd.getFileDescriptor()); in open()
358 private native boolean native_open(String deviceName, FileDescriptor pfd); in native_open() argument
DUsbManager.java342 ParcelFileDescriptor pfd = mService.openDevice(deviceName); in openDevice() local
343 if (pfd != null) { in openDevice()
345 boolean result = connection.open(deviceName, pfd, mContext); in openDevice()
346 pfd.close(); in openDevice()
/frameworks/base/core/java/android/os/
DParcelFileDescriptor.java261 final ParcelFileDescriptor pfd = new ParcelFileDescriptor(fd, comm[0]); in fromFd() local
284 return pfd; in fromFd()
905 public AutoCloseInputStream(ParcelFileDescriptor pfd) { in AutoCloseInputStream() argument
906 super(pfd.getFileDescriptor()); in AutoCloseInputStream()
907 mPfd = pfd; in AutoCloseInputStream()
956 public AutoCloseOutputStream(ParcelFileDescriptor pfd) { in AutoCloseOutputStream() argument
957 super(pfd.getFileDescriptor()); in AutoCloseOutputStream()
958 mPfd = pfd; in AutoCloseOutputStream()
DShellCommand.java196 ParcelFileDescriptor pfd = getShellCallback().openOutputFile(path, in openOutputFileForSystem() local
198 if (pfd != null) { in openOutputFileForSystem()
199 return pfd; in openOutputFileForSystem()
/frameworks/base/services/usb/java/com/android/server/usb/
DUsbMidiDevice.java221 StructPollfd pfd = mPollFDs[index]; in openLocked() local
222 if ((pfd.revents & (OsConstants.POLLERR in openLocked()
225 } else if ((pfd.revents & OsConstants.POLLIN) != 0) { in openLocked()
227 pfd.revents = 0; in openLocked()
/frameworks/base/core/java/android/content/res/
DAssetManager.java390 ParcelFileDescriptor pfd = openAssetFd(fileName, mOffsets); in openFd() local
391 if (pfd != null) { in openFd()
392 return new AssetFileDescriptor(pfd, mOffsets[0], mOffsets[1]); in openFd()
487 ParcelFileDescriptor pfd = openNonAssetFdNative(cookie, in openNonAssetFd() local
489 if (pfd != null) { in openNonAssetFd()
490 return new AssetFileDescriptor(pfd, mOffsets[0], mOffsets[1]); in openNonAssetFd()
/frameworks/native/libs/binder/tests/
DbinderDriverInterfaceTest.cpp125 pollfd pfd = pollfd(); in binderWaitForReadData() local
127 pfd.fd = m_binderFd; in binderWaitForReadData()
128 pfd.events = POLLIN; in binderWaitForReadData()
129 ret = poll(&pfd, 1, timeout_ms); in binderWaitForReadData()
/frameworks/native/cmds/dumpsys/
Ddumpsys.cpp222 struct pollfd pfd = { in main() local
237 int rc = TEMP_FAILURE_RETRY(poll(&pfd, 1, time_left_ms())); in main()
/frameworks/base/packages/PrintSpooler/tests/outofprocess/src/com/android/printspooler/outofprocess/tests/
DBasePrintTest.java127 ParcelFileDescriptor pfd = instrumentation.getUiAutomation().executeShellCommand(cmd); in runShellCommand() local
130 FileInputStream fis = new ParcelFileDescriptor.AutoCloseInputStream(pfd); in runShellCommand()
/frameworks/base/cmds/wm/src/com/android/commands/wm/
DWm.java116 ParcelFileDescriptor pfd = ParcelFileDescriptor.dup(FileDescriptor.out); in runSurfaceTrace() local
117 mWm.enableSurfaceTrace(pfd); in runSurfaceTrace()
/frameworks/base/services/tests/shortcutmanagerutils/src/com/android/server/pm/shortcutmanagertest/
DShortcutManagerTestUtils.java109 public static List<String> readAll(ParcelFileDescriptor pfd) { in readAll() argument
114 new FileReader(pfd.getFileDescriptor()))) { in readAll()
123 pfd.close(); in readAll()
611 public static Bitmap pfdToBitmap(ParcelFileDescriptor pfd) { in pfdToBitmap() argument
612 assertNotNull(pfd); in pfdToBitmap()
615 return BitmapFactory.decodeFileDescriptor(pfd.getFileDescriptor()); in pfdToBitmap()
617 pfd.close(); in pfdToBitmap()

123