Home
last modified time | relevance | path

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

123

/frameworks/base/media/java/android/media/midi/
DMidiInputPort.java51 ParcelFileDescriptor pfd, int portNumber) { in MidiInputPort() argument
56 mParcelFileDescriptor = pfd; in MidiInputPort()
58 mOutputStream = new FileOutputStream(pfd.getFileDescriptor()); in MidiInputPort()
62 /* package */ MidiInputPort(ParcelFileDescriptor pfd, int portNumber) { in MidiInputPort() argument
63 this(null, null, pfd, portNumber); in MidiInputPort()
107 ParcelFileDescriptor pfd; in claimFileDescriptor() local
109 pfd = mParcelFileDescriptor; in claimFileDescriptor()
110 if (pfd == null) return null; in claimFileDescriptor()
119 return pfd; in claimFileDescriptor()
DMidiDevice.java132 ParcelFileDescriptor pfd = mDeviceServer.openInputPort(token, portNumber); in openInputPort() local
133 if (pfd == null) { in openInputPort()
136 return new MidiInputPort(mDeviceServer, token, pfd, portNumber); in openInputPort()
158 ParcelFileDescriptor pfd = mDeviceServer.openOutputPort(token, portNumber); in openOutputPort() local
159 if (pfd == null) { in openOutputPort()
162 return new MidiOutputPort(mDeviceServer, token, pfd, portNumber); in openOutputPort()
189 ParcelFileDescriptor pfd = inputPort.claimFileDescriptor(); in connectPorts() local
190 if (pfd == null) { in connectPorts()
195 int calleePid = mDeviceServer.connectPorts(token, pfd, outputPortNumber); in connectPorts()
202 IoUtils.closeQuietly(pfd); in connectPorts()
DMidiOutputPort.java94 ParcelFileDescriptor pfd, int portNumber) { in MidiOutputPort() argument
98 mInputStream = new ParcelFileDescriptor.AutoCloseInputStream(pfd); in MidiOutputPort()
103 /* package */ MidiOutputPort(ParcelFileDescriptor pfd, int portNumber) { in MidiOutputPort() argument
104 this(null, null, pfd, portNumber); in MidiOutputPort()
DIMidiDeviceServer.aidl32 int connectPorts(IBinder token, in ParcelFileDescriptor pfd, int outputPortNumber); in connectPorts() argument
/frameworks/support/v4/ics/android/support/v4/net/
DTrafficStatsCompatIcs.java59 final ParcelFileDescriptor pfd = ParcelFileDescriptor.fromDatagramSocket(socket); in tagDatagramSocket() local
60 TrafficStats.tagSocket(new DatagramSocketWrapper(socket, pfd.getFileDescriptor())); in tagDatagramSocket()
65 pfd.detachFd(); in tagDatagramSocket()
69 final ParcelFileDescriptor pfd = ParcelFileDescriptor.fromDatagramSocket(socket); in untagDatagramSocket() local
70 TrafficStats.untagSocket(new DatagramSocketWrapper(socket, pfd.getFileDescriptor())); in untagDatagramSocket()
75 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/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.java68 ParcelFileDescriptor pfd = mService.openSerialPort(name); in openSerialPort() local
69 if (pfd != null) { in openSerialPort()
71 port.open(pfd, speed); in openSerialPort()
/frameworks/base/native/android/
Dsensor.cpp137 struct pollfd pfd; in ASensorEventQueue_hasEvents() local
138 pfd.fd = static_cast<SensorEventQueue*>(queue)->getFd(); in ASensorEventQueue_hasEvents()
139 pfd.events = POLLIN; in ASensorEventQueue_hasEvents()
140 pfd.revents = 0; in ASensorEventQueue_hasEvents()
142 int nfd = poll(&pfd, 1, 0); in ASensorEventQueue_hasEvents()
147 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/java/android/hardware/usb/
DUsbDeviceConnection.java45 /* package */ boolean open(String name, ParcelFileDescriptor pfd) { in open() argument
46 return native_open(name, pfd.getFileDescriptor()); in open()
252 private native boolean native_open(String deviceName, FileDescriptor pfd); in native_open() argument
DUsbManager.java329 ParcelFileDescriptor pfd = mService.openDevice(deviceName); in openDevice() local
330 if (pfd != null) { in openDevice()
332 boolean result = connection.open(deviceName, pfd); in openDevice()
333 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.java336 protected void verifyFileSize(ParcelFileDescriptor pfd, long size) { in verifyFileSize() argument
337 assertEquals(pfd.getStatSize(), size); in verifyFileSize()
384 protected void verifyFileContents(ParcelFileDescriptor pfd, File file) throws IOException { in verifyFileContents() argument
388 AutoCloseInputStream input = new ParcelFileDescriptor.AutoCloseInputStream(pfd); in verifyFileContents()
390 assertEquals(file.length(), pfd.getStatSize()); in verifyFileContents()
484 ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(requestId); in verifyAndCleanupSingleFileDownload() local
491 verifyFileSize(pfd, fileSize); in verifyAndCleanupSingleFileDownload()
492 verifyFileContents(pfd, fileData); in verifyAndCleanupSingleFileDownload()
494 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/os/
DParcelFileDescriptor.java250 final ParcelFileDescriptor pfd = new ParcelFileDescriptor(fd, comm[0]); in fromFd() local
273 return pfd; in fromFd()
854 public AutoCloseInputStream(ParcelFileDescriptor pfd) { in AutoCloseInputStream() argument
855 super(pfd.getFileDescriptor()); in AutoCloseInputStream()
856 mPfd = pfd; in AutoCloseInputStream()
905 public AutoCloseOutputStream(ParcelFileDescriptor pfd) { in AutoCloseOutputStream() argument
906 super(pfd.getFileDescriptor()); in AutoCloseOutputStream()
907 mPfd = pfd; in AutoCloseOutputStream()
/frameworks/base/core/java/android/content/res/
DAssetManager.java363 ParcelFileDescriptor pfd = openAssetFd(fileName, mOffsets); in openFd() local
364 if (pfd != null) { in openFd()
365 return new AssetFileDescriptor(pfd, mOffsets[0], mOffsets[1]); in openFd()
460 ParcelFileDescriptor pfd = openNonAssetFdNative(cookie, in openNonAssetFd() local
462 if (pfd != null) { in openNonAssetFd()
463 return new AssetFileDescriptor(pfd, mOffsets[0], mOffsets[1]); in openNonAssetFd()
/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/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/base/core/tests/coretests/src/android/print/
DBasePrintTest.java84 ParcelFileDescriptor pfd = getInstrumentation().getUiAutomation() in getEnabledImes() local
87 new InputStreamReader(new FileInputStream(pfd.getFileDescriptor())))) { in getEnabledImes()
237 ParcelFileDescriptor pfd = instrumentation.getUiAutomation().executeShellCommand(cmd); in runShellCommand() local
240 FileInputStream fis = new ParcelFileDescriptor.AutoCloseInputStream(pfd); in runShellCommand()
/frameworks/base/services/core/java/com/android/server/
DGraphicsStatsService.java83 ParcelFileDescriptor pfd = null; in requestBufferForProcess() local
88 pfd = requestBufferForProcessLocked(token, uid, pid, packageName); in requestBufferForProcess()
93 return pfd; in requestBufferForProcess()
/frameworks/base/core/java/android/util/
DMemoryIntArray.java148 ParcelFileDescriptor pfd = mFd; in close() local
150 nativeClose(pfd.getFd(), mMemoryAddr, isOwner()); in close()
/frameworks/native/cmds/dumpsys/
Ddumpsys.cpp215 struct pollfd pfd = { in main() local
230 int rc = TEMP_FAILURE_RETRY(poll(&pfd, 1, time_left_ms())); in main()

123