/frameworks/support/compat/src/main/java/androidx/core/net/ |
H A D | TrafficStatsCompat.java | 140 final ParcelFileDescriptor pfd = ParcelFileDescriptor.fromDatagramSocket(socket); 141 TrafficStats.tagSocket(new DatagramSocketWrapper(socket, pfd.getFileDescriptor())); 146 pfd.detachFd(); 157 final ParcelFileDescriptor pfd = ParcelFileDescriptor.fromDatagramSocket(socket); 158 TrafficStats.untagSocket(new DatagramSocketWrapper(socket, pfd.getFileDescriptor())); 163 pfd.detachFd();
|
/frameworks/base/core/java/android/hardware/ |
H A D | SerialManager.java | 70 ParcelFileDescriptor pfd = mService.openSerialPort(name); 71 if (pfd != null) { 73 port.open(pfd, speed);
|
H A D | SerialPort.java | 54 public void open(ParcelFileDescriptor pfd, int speed) throws IOException { argument 55 native_open(pfd.getFileDescriptor(), speed); 56 mFileDescriptor = pfd; 122 private native void native_open(FileDescriptor pfd, int speed) throws IOException; argument
|
/frameworks/base/core/tests/coretests/src/android/graphics/ |
H A D | BitmapFactoryTest.java | 37 ParcelFileDescriptor pfd = ParcelFileDescriptor.fromData(out.toByteArray(), null); 38 FileDescriptor fd = pfd.getFileDescriptor();
|
/frameworks/base/core/java/android/util/ |
H A D | MemoryIntArray.java | 81 ParcelFileDescriptor pfd = parcel.readParcelable(null); 82 if (pfd == null) { 85 mFd = pfd.detachFd(); 178 ParcelFileDescriptor pfd = ParcelFileDescriptor.adoptFd(mFd); 181 parcel.writeParcelable(pfd, flags & ~Parcelable.PARCELABLE_WRITE_RETURN_VALUE); 183 pfd.detachFd();
|
/frameworks/base/services/core/java/com/android/server/net/watchlist/ |
H A D | NetworkWatchlistShellCommand.java | 76 final ParcelFileDescriptor pfd = openFileForSystem(configXmlPath, "r"); 77 if (pfd != null) { 78 final InputStream fileStream = new FileInputStream(pfd.getFileDescriptor());
|
/frameworks/support/compat/src/main/java/androidx/core/graphics/ |
H A D | TypefaceCompatApi21Impl.java | 71 try (ParcelFileDescriptor pfd = 73 final File file = getFile(pfd); 77 try (FileInputStream fis = new FileInputStream(pfd.getFileDescriptor())) {
|
H A D | TypefaceCompatUtil.java | 98 try (ParcelFileDescriptor pfd = resolver.openFileDescriptor(uri, "r", cancellationSignal)) { 99 if (pfd == null) { 102 try (FileInputStream fis = new FileInputStream(pfd.getFileDescriptor())) {
|
H A D | TypefaceCompatApi26Impl.java | 236 try (ParcelFileDescriptor pfd = 238 if (pfd == null) { 241 return new Typeface.Builder(pfd.getFileDescriptor())
|
/frameworks/base/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/downloadmanagertests/ |
H A D | DownloadManagerTestApp.java | 188 ParcelFileDescriptor pfd = null; 200 pfd = mDownloadManager.openDownloadedFile(dlRequest); 201 verifyFileSize(pfd, filesize); 209 if (pfd != null) { 210 pfd.close(); 239 ParcelFileDescriptor pfd = null; 243 pfd = mDownloadManager.openDownloadedFile(dlRequest); 244 verifyFileSize(pfd, filesize); 246 if (pfd != null) { 247 pfd [all...] |
/frameworks/base/drm/java/android/drm/ |
H A D | DrmOutputStream.java | 54 * @param pfd Opened with "rw" mode. 56 public DrmOutputStream(DrmManagerClient client, ParcelFileDescriptor pfd, String mimeType) argument 59 mPfd = pfd; 60 mFd = pfd.getFileDescriptor();
|
/frameworks/base/tools/incident_report/ |
H A D | main.cpp | 341 int pfd[2]; local 342 if (pipe(pfd) != 0) { 353 dup2(pfd[1], STDOUT_FILENO); 354 close(pfd[0]); 355 close(pfd[1]); 375 close(pfd[1]); 379 ssize_t amt = read(pfd[0], buffer.get() + size, maxAllowedSize - size); 413 close(pfd[0]); 509 int pfd[2]; local 510 if (pipe(pfd) ! [all...] |
/frameworks/base/core/java/android/hardware/usb/ |
H A D | UsbDeviceConnection.java | 61 /* package */ boolean open(String name, ParcelFileDescriptor pfd, @NonNull Context context) { argument 63 boolean wasOpened = native_open(name, pfd.getFileDescriptor()); 372 private native boolean native_open(String deviceName, FileDescriptor pfd); argument
|
H A D | UsbManager.java | 408 ParcelFileDescriptor pfd = mService.openDevice(deviceName, mContext.getPackageName()); 409 if (pfd != null) { 411 boolean result = connection.open(deviceName, pfd, mContext); 412 pfd.close();
|
/frameworks/base/core/tests/coretests/src/android/app/ |
H A D | DownloadManagerStressTest.java | 134 ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(dlRequest); 135 verifyFileContents(pfd, largeFile); 136 verifyFileSize(pfd, largeFile.length());
|
H A D | DownloadManagerBaseTest.java | 336 * @param pfd The input file to compare the size of 339 protected void verifyFileSize(ParcelFileDescriptor pfd, long size) { argument 340 assertEquals(pfd.getStatSize(), size); 383 * @param pfd The file whose data we want to verify 387 protected void verifyFileContents(ParcelFileDescriptor pfd, File file) throws IOException { argument 391 AutoCloseInputStream input = new ParcelFileDescriptor.AutoCloseInputStream(pfd); 393 assertEquals(file.length(), pfd.getStatSize()); 487 ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(requestId); 494 verifyFileSize(pfd, fileSize); 495 verifyFileContents(pfd, fileDat [all...] |
H A D | DownloadManagerFunctionalTest.java | 133 ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(requestId); 139 verifyFileSize(pfd, fileSize); 140 verifyFileContents(pfd, fileData); 143 pfd.close();
|
/frameworks/base/native/android/ |
H A D | sensor.cpp | 254 struct pollfd pfd; local 255 pfd.fd = static_cast<SensorEventQueue*>(queue)->getFd(); 256 pfd.events = POLLIN; 257 pfd.revents = 0; 259 int nfd = poll(&pfd, 1, 0); 264 if (pfd.revents != POLLIN)
|
/frameworks/base/core/java/android/os/ |
H A D | ShellCommand.java | 238 ParcelFileDescriptor pfd = getShellCallback().openFile(path, 240 if (pfd != null) { 241 if (DEBUG) Slog.d(TAG, "Got file: " + pfd); 242 return pfd;
|
H A D | ParcelFileDescriptor.java | 261 final ParcelFileDescriptor pfd = new ParcelFileDescriptor(fd, comm[0]); 284 return pfd; 907 public AutoCloseInputStream(ParcelFileDescriptor pfd) { argument 908 super(pfd.getFileDescriptor()); 909 mPfd = pfd; 958 public AutoCloseOutputStream(ParcelFileDescriptor pfd) { argument 959 super(pfd.getFileDescriptor()); 960 mPfd = pfd;
|
/frameworks/base/media/java/android/media/ |
H A D | ThumbnailUtils.java | 301 * The image data will be read from specified pfd if it's not null, otherwise 308 Uri uri, ContentResolver cr, ParcelFileDescriptor pfd, 312 if (pfd == null) pfd = makeInputStream(uri, cr); 313 if (pfd == null) return null; 316 FileDescriptor fd = pfd.getFileDescriptor(); 335 closeSilently(pfd); 307 makeBitmap(int minSideLength, int maxNumOfPixels, Uri uri, ContentResolver cr, ParcelFileDescriptor pfd, BitmapFactory.Options options) argument
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/ |
H A D | SysuiTestCase.java | 93 ParcelFileDescriptor pfd = mRealInstrumentation.getUiAutomation() 97 FileInputStream fis = new ParcelFileDescriptor.AutoCloseInputStream(pfd);
|
/frameworks/native/libs/vr/libpdx_uds/ |
H A D | service_framework_tests.cpp | 647 pollfd pfd{client->event_fd(), POLLIN, 0}; 648 int count = poll(&pfd, 1, 0); 653 count = poll(&pfd, 1, 10000 /*10s*/); 655 ASSERT_TRUE((POLLIN & pfd.revents) != 0); 668 pollfd pfd{client->event_fd(), POLLIN, 0}; 669 int count = poll(&pfd, 1, 0); 674 count = poll(&pfd, 1, 10000 /*10s*/); 676 auto event_status = client->GetEventMask(pfd.revents);
|
/frameworks/base/services/usb/java/com/android/server/usb/ |
H A D | UsbMidiDevice.java | 223 StructPollfd pfd = mPollFDs[index]; 224 if ((pfd.revents & (OsConstants.POLLERR 227 } else if ((pfd.revents & OsConstants.POLLIN) != 0) { 229 pfd.revents = 0;
|
/frameworks/base/tests/net/java/com/android/server/ |
H A D | IpSecServiceParameterizedTest.java | 471 ParcelFileDescriptor pfd = ParcelFileDescriptor.fromSocket(new Socket()); 474 mIpSecService.applyTransportModeTransform(pfd, IpSecManager.DIRECTION_OUT, resourceId); 478 eq(pfd.getFileDescriptor()), 488 ParcelFileDescriptor pfd = ParcelFileDescriptor.fromSocket(new Socket()); 489 mIpSecService.removeTransportModeTransforms(pfd); 491 verify(mMockNetd).ipSecRemoveTransportModeTransform(pfd.getFileDescriptor());
|