Home
last modified time | relevance | path

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

12345

/frameworks/native/libs/binder/
DFdTrigger.cpp70 pollfd pfd[]{ in triggerablePoll() local
83 int ret = TEMP_FAILURE_RETRY(poll(pfd, countof(pfd), -1)); in triggerablePoll()
93 if (pfd[1].revents & POLLHUP) { in triggerablePoll()
98 if (pfd[1].revents != 0) { in triggerablePoll()
99 ALOGE("Unknown revents on trigger FD %d: revents = %d", pfd[1].fd, pfd[1].revents); in triggerablePoll()
108 if (pfd[0].revents & POLLNVAL) { in triggerablePoll()
115 if (pfd[0].revents & POLLERR) { in triggerablePoll()
116 LOG_RPC_DETAIL("poll() incoming FD %d results in revents = %d", pfd[0].fd, pfd[0].revents); in triggerablePoll()
122 if (pfd[0].revents & event) { in triggerablePoll()
DRpcTransportTipcAndroid.cpp47 pollfd pfd{.fd = mSocket.fd.get(), .events = static_cast<int16_t>(POLLIN), .revents = 0}; in pollRead() local
48 ssize_t ret = TEMP_FAILURE_RETRY(::poll(&pfd, 1, 0)); in pollRead()
59 if (pfd.revents & POLLNVAL) { in pollRead()
62 if (pfd.revents & POLLERR) { in pollRead()
65 if (pfd.revents & POLLIN) { in pollRead()
70 if (pfd.revents & POLLHUP) { in pollRead()
/frameworks/native/cmds/lshal/
DPipeRelay.cpp58 pollfd pfd[2]; in thread() local
59 pfd[0] = {.fd = rfd.get(), .events = POLLIN}; in thread()
60 pfd[1] = {.fd = rfdTrigger.get(), .events = 0}; in thread()
62 int pollRes = poll(pfd, arraysize(pfd), -1 /* infinite timeout */); in thread()
70 if (pfd[0].revents & POLLIN) { in thread()
87 if (pfd[0].revents & POLLHUP) { in thread()
90 if (pfd[1].revents & POLLHUP) { in thread()
93 if ((pfd[0].revents & POLLIN) == 0) { in thread()
/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.java56 public void open(ParcelFileDescriptor pfd, int speed) throws IOException { in open() argument
57 native_open(pfd.getFileDescriptor(), speed); in open()
58 mFileDescriptor = pfd; in open()
126 private native void native_open(FileDescriptor pfd, int speed) throws IOException; in native_open() argument
DSerialManager.java77 ParcelFileDescriptor pfd = mService.openSerialPort(name); in openSerialPort() local
78 if (pfd != null) { in openSerialPort()
80 port.open(pfd, speed); in openSerialPort()
/frameworks/base/core/java/android/os/
DShellCommand.java65 ParcelFileDescriptor pfd = getShellCallback().openFile(path, in openFileForSystem() local
67 if (pfd != null) { in openFileForSystem()
68 if (DEBUG) Slog.d(TAG, "Got file: " + pfd); in openFileForSystem()
69 return pfd; in openFileForSystem()
DVintfObject.java128 var pfd = automation.executeShellCommand(command); in runShellCommand() local
129 try (var is = new ParcelFileDescriptor.AutoCloseInputStream(pfd)) { in runShellCommand()
/frameworks/base/core/java/android/util/
DMemoryIntArray.java87 … ParcelFileDescriptor pfd = parcel.readParcelable(null, android.os.ParcelFileDescriptor.class); in MemoryIntArray() local
88 if (pfd == null) { in MemoryIntArray()
91 mFd = pfd.detachFd(); in MemoryIntArray()
183 try (ParcelFileDescriptor pfd = ParcelFileDescriptor.fromFd(mFd)) { in writeToParcel() argument
184 parcel.writeParcelable(pfd, flags); in writeToParcel()
/frameworks/base/services/core/java/com/android/server/os/
DNativeTombstoneManager.java178 ParcelFileDescriptor pfd; in handleProtoTombstone() local
180 pfd = ParcelFileDescriptor.open(path, MODE_READ_WRITE); in handleProtoTombstone()
186 final Optional<TombstoneFile> parsedTombstone = TombstoneFile.parse(pfd); in handleProtoTombstone()
188 IoUtils.closeQuietly(pfd); in handleProtoTombstone()
362 TombstoneFile(ParcelFileDescriptor pfd) { in TombstoneFile() argument
363 mPfd = pfd; in TombstoneFile()
429 static Optional<TombstoneFile> parse(ParcelFileDescriptor pfd) { in parse() argument
430 final FileInputStream is = new FileInputStream(pfd.getFileDescriptor()); in parse()
497 StructStat stat = Os.fstat(pfd.getFileDescriptor()); in parse()
511 TombstoneFile result = new TombstoneFile(pfd); in parse()
[all …]
/frameworks/base/services/core/java/com/android/server/net/watchlist/
DNetworkWatchlistShellCommand.java72 final ParcelFileDescriptor pfd = openFileForSystem(configXmlPath, "r"); in runSetTestConfig() local
73 if (pfd == null) { in runSetTestConfig()
77 try (InputStream inputStream = new ParcelFileDescriptor.AutoCloseInputStream(pfd)) { in runSetTestConfig()
/frameworks/base/services/core/java/com/android/server/security/
DFileIntegrity.java49 try (ParcelFileDescriptor pfd = ParcelFileDescriptor.open(file, MODE_READ_ONLY)) { in setUpFsVerity() argument
50 setUpFsVerity(pfd); in setUpFsVerity()
/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/drm/java/android/drm/
DDrmOutputStream.java59 public DrmOutputStream(DrmManagerClient client, ParcelFileDescriptor pfd, String mimeType) in DrmOutputStream() argument
62 mPfd = pfd; in DrmOutputStream()
63 mFd = pfd.getFileDescriptor(); in DrmOutputStream()
/frameworks/base/native/android/
Dsensor.cpp265 struct pollfd pfd; in ASensorEventQueue_hasEvents() local
266 pfd.fd = static_cast<SensorEventQueue*>(queue)->getFd(); in ASensorEventQueue_hasEvents()
267 pfd.events = POLLIN; in ASensorEventQueue_hasEvents()
268 pfd.revents = 0; in ASensorEventQueue_hasEvents()
270 int nfd = poll(&pfd, 1, 0); in ASensorEventQueue_hasEvents()
275 if (pfd.revents != POLLIN) in ASensorEventQueue_hasEvents()
/frameworks/base/tools/incident_report/
Dmain.cpp369 int pfd[2]; in main() local
370 if (pipe(pfd) != 0) { in main()
381 dup2(pfd[1], STDOUT_FILENO); in main()
382 close(pfd[0]); in main()
383 close(pfd[1]); in main()
411 inFd = pfd[0]; in main()
412 close(pfd[1]); in main()
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/
DInstallStaging.java138 ParcelFileDescriptor pfd = afd != null ? afd.getParcelFileDescriptor() : null; in onResume() local
140 mInstaller, getIntent(), pfd, packageUri.toString()); in onResume()
185 @Nullable ParcelFileDescriptor pfd, @NonNull String debugPathName) { in createSessionParams() argument
205 if (pfd != null) { in createSessionParams()
207 final PackageInstaller.InstallInfo result = installer.readInstallInfo(pfd, in createSessionParams()
211 params.setSize(result.calculateInstalledSize(params, pfd)); in createSessionParams()
217 params.setSize(pfd.getStatSize()); in createSessionParams()
/frameworks/base/core/java/android/service/ondeviceintelligence/
DOnDeviceIntelligenceService.java450 pfds.forEach(pfd -> {
452 pfd.close();
469 ParcelFileDescriptor pfd = null;
471 pfd = ParcelFileDescriptor.open(f, ParcelFileDescriptor.MODE_READ_ONLY);
477 future.complete(pfd);
478 if (pfd != null) {
479 pfd.close();
/frameworks/base/core/java/android/app/wearable/
DWearableSensingManager.java538 ParcelFileDescriptor pfd = null; in createWearableSensingCallback() local
540 pfd = in createWearableSensingCallback()
552 future.complete(pfd); in createWearableSensingCallback()
553 if (pfd != null) { in createWearableSensingCallback()
555 pfd.close(); in createWearableSensingCallback()
/frameworks/base/services/core/java/com/android/server/pm/
DPackageManagerShellCommandDataLoader.java389 ParcelFileDescriptor pfd = getStdInPFD(shellCommand); in getStdIn() local
390 return pfd == null ? -1 : pfd.detachFd(); in getStdIn()
394 ParcelFileDescriptor pfd = getLocalFilePFD(shellCommand, filePath); in getLocalFile() local
395 return pfd == null ? -1 : pfd.detachFd(); in getLocalFile()
/frameworks/base/services/core/java/com/android/server/ondeviceintelligence/
DBundleUtil.java350 for (Parcelable pfd : pfds) {
351 validatePfdReadOnly((ParcelFileDescriptor) pfd);
355 public static void validatePfdReadOnly(ParcelFileDescriptor pfd) {
356 if (pfd == null) {
360 int readMode = Os.fcntlInt(pfd.getFileDescriptor(), F_GETFL, 0) & O_ACCMODE;
/frameworks/base/services/core/java/com/android/server/resources/
DResourcesManagerShellCommand.java65 try (ParcelFileDescriptor pfd = ParcelFileDescriptor.dup(getOutFileDescriptor())) { in dumpResources() argument
70 if (!mInterface.dumpResources(processId, pfd, finishCallback)) { in dumpResources()
DResourcesManagerService.java77 try (ParcelFileDescriptor pfd = ParcelFileDescriptor.dup(fd)) {
78 mActivityManagerService.dumpAllResources(pfd, pw);
/frameworks/av/media/codec2/vndk/
DC2Fence.cpp640 struct pollfd pfd; in waitEvent() local
641 pfd.fd = mPipeFd.get(); in waitEvent()
642 pfd.events = POLLIN; in waitEvent()
643 pfd.revents = 0; in waitEvent()
654 int ret = ::ppoll(&pfd, 1, &ts, nullptr); in waitEvent()
656 if (pfd.revents) { in waitEvent()
657 if (pfd.revents & ~POLLIN) { in waitEvent()
/frameworks/base/core/tests/coretests/src/android/app/
DDownloadManagerBaseTest.java343 protected void verifyFileSize(ParcelFileDescriptor pfd, long size) { in verifyFileSize() argument
344 assertEquals(pfd.getStatSize(), size); in verifyFileSize()
391 protected void verifyFileContents(ParcelFileDescriptor pfd, File file) throws IOException { in verifyFileContents() argument
395 AutoCloseInputStream input = new ParcelFileDescriptor.AutoCloseInputStream(pfd); in verifyFileContents()
397 assertEquals(file.length(), pfd.getStatSize()); in verifyFileContents()
491 ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(requestId); in verifyAndCleanupSingleFileDownload() local
498 verifyFileSize(pfd, fileSize); in verifyAndCleanupSingleFileDownload()
499 verifyFileContents(pfd, fileData); in verifyAndCleanupSingleFileDownload()
501 pfd.close(); in verifyAndCleanupSingleFileDownload()

12345