Home
last modified time | relevance | path

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

123

/frameworks/base/core/java/android/net/
DIpSecManager.java255 try (ParcelFileDescriptor pfd = ParcelFileDescriptor.fromSocket(socket)) { in applyTransportModeTransform() argument
256 applyTransportModeTransform(pfd, transform); in applyTransportModeTransform()
275 try (ParcelFileDescriptor pfd = ParcelFileDescriptor.fromDatagramSocket(socket)) { in applyTransportModeTransform() argument
276 applyTransportModeTransform(pfd, transform); in applyTransportModeTransform()
298 try (ParcelFileDescriptor pfd = ParcelFileDescriptor.dup(socket)) { in applyTransportModeTransform() argument
299 applyTransportModeTransform(pfd, transform); in applyTransportModeTransform()
304 private void applyTransportModeTransform(ParcelFileDescriptor pfd, IpSecTransform transform) { in applyTransportModeTransform() argument
306 mService.applyTransportModeTransform(pfd, transform.getResourceId()); in applyTransportModeTransform()
338 try (ParcelFileDescriptor pfd = ParcelFileDescriptor.fromSocket(socket)) { in removeTransportModeTransform() argument
339 removeTransportModeTransform(pfd, transform); in removeTransportModeTransform()
[all …]
/frameworks/support/compat/java/android/support/v4/net/
DTrafficStatsCompat.java138 final ParcelFileDescriptor pfd = ParcelFileDescriptor.fromDatagramSocket(socket); in tagDatagramSocket() local
139 TrafficStats.tagSocket(new DatagramSocketWrapper(socket, pfd.getFileDescriptor())); in tagDatagramSocket()
144 pfd.detachFd(); in tagDatagramSocket()
155 final ParcelFileDescriptor pfd = ParcelFileDescriptor.fromDatagramSocket(socket); in untagDatagramSocket() local
156 TrafficStats.untagSocket(new DatagramSocketWrapper(socket, pfd.getFileDescriptor())); in untagDatagramSocket()
161 pfd.detachFd(); in untagDatagramSocket()
/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/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()
362 close(pfd[1]); in adb_incident_workaround()
366 ssize_t amt = read(pfd[0], buffer + size, maxAllowedSize - size); in adb_incident_workaround()
400 close(pfd[0]); in adb_incident_workaround()
493 int pfd[2]; in main() local
494 if (pipe(pfd) != 0) { in main()
[all …]
/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()
178 ParcelFileDescriptor pfd = ParcelFileDescriptor.adoptFd(mFd); in writeToParcel() local
181 parcel.writeParcelable(pfd, flags & ~Parcelable.PARCELABLE_WRITE_RETURN_VALUE); in writeToParcel()
183 pfd.detachFd(); in writeToParcel()
/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/support/compat/java/android/support/v4/graphics/
DTypefaceCompatApi21Impl.java70 try (ParcelFileDescriptor pfd = in createFromFontInfo() argument
72 final File file = getFile(pfd); in createFromFontInfo()
76 try (FileInputStream fis = new FileInputStream(pfd.getFileDescriptor())) { in createFromFontInfo()
DTypefaceCompatUtil.java97 try (ParcelFileDescriptor pfd = resolver.openFileDescriptor(uri, "r", cancellationSignal); in mmap() argument
98 FileInputStream fis = new FileInputStream(pfd.getFileDescriptor())) { in mmap()
/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/tests/coretests/src/android/app/
DDownloadManagerBaseTest.java339 protected void verifyFileSize(ParcelFileDescriptor pfd, long size) { in verifyFileSize() argument
340 assertEquals(pfd.getStatSize(), size); in verifyFileSize()
387 protected void verifyFileContents(ParcelFileDescriptor pfd, File file) throws IOException { in verifyFileContents() argument
391 AutoCloseInputStream input = new ParcelFileDescriptor.AutoCloseInputStream(pfd); in verifyFileContents()
393 assertEquals(file.length(), pfd.getStatSize()); in verifyFileContents()
487 ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(requestId); in verifyAndCleanupSingleFileDownload() local
494 verifyFileSize(pfd, fileSize); in verifyAndCleanupSingleFileDownload()
495 verifyFileContents(pfd, fileData); in verifyAndCleanupSingleFileDownload()
497 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.java133 ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(requestId); in verifyDownload() local
139 verifyFileSize(pfd, fileSize); in verifyDownload()
140 verifyFileContents(pfd, fileData); in verifyDownload()
143 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.java61 /* package */ boolean open(String name, ParcelFileDescriptor pfd, @NonNull Context context) { in open() argument
63 boolean wasOpened = native_open(name, pfd.getFileDescriptor()); in open()
362 private native boolean native_open(String deviceName, FileDescriptor pfd); in native_open() argument
DUsbManager.java345 ParcelFileDescriptor pfd = mService.openDevice(deviceName); in openDevice() local
346 if (pfd != null) { in openDevice()
348 boolean result = connection.open(deviceName, pfd, mContext); in openDevice()
349 pfd.close(); in openDevice()
/frameworks/native/libs/vr/libpdx_uds/
Dservice_framework_tests.cpp647 pollfd pfd{client->event_fd(), POLLIN, 0}; in TEST_F() local
648 int count = poll(&pfd, 1, 0); in TEST_F()
653 count = poll(&pfd, 1, 10000 /*10s*/); in TEST_F()
655 ASSERT_TRUE((POLLIN & pfd.revents) != 0); in TEST_F()
668 pollfd pfd{client->event_fd(), POLLIN, 0}; in TEST_F() local
669 int count = poll(&pfd, 1, 0); in TEST_F()
674 count = poll(&pfd, 1, 10000 /*10s*/); in TEST_F()
676 auto event_status = client->GetEventMask(pfd.revents); in TEST_F()
/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.cpp223 struct pollfd pfd = { in main() local
238 int rc = TEMP_FAILURE_RETRY(poll(&pfd, 1, time_left_ms())); in main()

123