Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 127) sorted by relevance

123456

/packages/providers/MediaProvider/src/com/android/providers/media/util/
DIsoInterface.java116 private static int readInt(@NonNull FileDescriptor fd) in readInt() argument
119 if (Os.read(fd, buf, 0, 4) == 4) { in readInt()
126 private static @NonNull UUID readUuid(@NonNull FileDescriptor fd) in readUuid() argument
128 final long high = (((long) readInt(fd)) << 32L) | ((long) readInt(fd)) & 0xffffffffL; in readUuid()
129 final long low = (((long) readInt(fd)) << 32L) | ((long) readInt(fd)) & 0xffffffffL; in readUuid()
133 private static @Nullable Box parseNextBox(@NonNull FileDescriptor fd, long end, in parseNextBox() argument
135 final long pos = Os.lseek(fd, 0, OsConstants.SEEK_CUR); in parseNextBox()
140 final long len = Integer.toUnsignedLong(readInt(fd)); in parseNextBox()
148 final int type = readInt(fd); in parseNextBox()
150 readInt(fd); in parseNextBox()
[all …]
/packages/apps/Test/connectivity/sl4n/rapidjson/test/perftest/
Dplatformtest.cpp116 int fd = _open(filename_, _O_BINARY | _O_RDONLY); in TEST_F() local
117 ASSERT_NE(-1, fd); in TEST_F()
118 ASSERT_EQ(length_, _read(fd, temp_, length_)); in TEST_F()
120 _close(fd); in TEST_F()
126 int fd = open(filename_, O_RDONLY); in TEST_F() local
127 ASSERT_NE(-1, fd); in TEST_F()
128 ASSERT_EQ(length_, read(fd, temp_, length_)); in TEST_F()
130 close(fd); in TEST_F()
155 int fd = open(filename_, O_RDONLY); in TEST_F() local
156 ASSERT_NE(-1, fd); in TEST_F()
[all …]
/packages/apps/TV/jni/
DDvbManager.cpp70 pollFd.fd = mFeFd; in isFeLocked()
267 int fd = (int) env->CallIntMethod(thiz, mOpenDvbFrontEndMethodID); in openDvbFeFromSystemApi() local
268 fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK); in openDvbFeFromSystemApi()
269 return fd; in openDvbFeFromSystemApi()
273 int fd = (int) env->CallIntMethod(thiz, mOpenDvbDemuxMethodID); in openDvbDemuxFromSystemApi() local
274 fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK); in openDvbDemuxFromSystemApi()
275 return fd; in openDvbDemuxFromSystemApi()
279 int fd = (int) env->CallIntMethod(thiz, mOpenDvbDvrMethodID); in openDvbDvrFromSystemApi() local
280 fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK); in openDvbDvrFromSystemApi()
281 return fd; in openDvbDvrFromSystemApi()
[all …]
/packages/modules/NetworkStack/src/android/net/util/
DNetworkStackUtils.java125 public static void closeSocketQuietly(FileDescriptor fd) { in closeSocketQuietly() argument
127 SocketUtils.closeSocket(fd); in closeSocketQuietly()
202 public static native void attachDhcpFilter(FileDescriptor fd) throws SocketException; in attachDhcpFilter() argument
209 public static native void attachRaFilter(FileDescriptor fd, int packetType) in attachRaFilter() argument
220 public static native void attachControlPacketFilter(FileDescriptor fd, int packetType) in attachControlPacketFilter() argument
227 String ifname, FileDescriptor fd) throws IOException { in addArpEntry() argument
228 addArpEntry(ethAddr.toByteArray(), ipv4Addr.getAddress(), ifname, fd); in addArpEntry() local
232 FileDescriptor fd) throws IOException; in addArpEntry() argument
DFdEventsReader.java82 protected static void closeFd(FileDescriptor fd) { in closeFd() argument
84 SocketUtils.closeSocket(fd); in closeFd()
156 protected abstract int readPacket(@NonNull FileDescriptor fd, @NonNull BufferType buffer) in readPacket() argument
197 (fd, events) -> { in createAndRegisterFd()
/packages/modules/NetworkStack/jni/
Dnetwork_stack_utils_jni.cpp85 int fd = jniGetFDFromFileDescriptor(env, javaFd); in network_stack_utils_addArpEntry() local
86 if (fd < 0) { in network_stack_utils_addArpEntry()
91 if (ioctl(fd, SIOCSARP, &req)) { in network_stack_utils_addArpEntry()
123 int fd = jniGetFDFromFileDescriptor(env, javaFd); in network_stack_utils_attachDhcpFilter() local
124 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &filter, sizeof(filter)) != 0) { in network_stack_utils_attachDhcpFilter()
156 int fd = jniGetFDFromFileDescriptor(env, javaFd); in network_stack_utils_attachRaFilter() local
157 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &filter, sizeof(filter)) != 0) { in network_stack_utils_attachRaFilter()
231 int fd = jniGetFDFromFileDescriptor(env, javaFd); in network_stack_utils_attachControlPacketFilter() local
232 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &filter, sizeof(filter)) != 0) { in network_stack_utils_attachControlPacketFilter()
/packages/services/Car/tools/keventreader/server/
Deventgatherer.cpp49 for (auto& fd : mFds) { in read() local
50 if (fd.revents != 0) { in read()
51 if (fd.revents == POLLIN) { in read()
52 if (auto dev = mDevices[fd.fd].get()) { in read()
59 fd.revents = 0; in read()
/packages/apps/Dialer/java/com/android/voicemail/impl/
DVvmLog.java39 public static void dump(FileDescriptor fd, PrintWriter printwriter, String[] args) { in dump() argument
42 localLog.dump(fd, indentingPrintWriter, args); in dump()
143 public synchronized void dump(FileDescriptor fd, PrintWriter pw, String[] args) { in dump() argument
150 public synchronized void reverseDump(FileDescriptor fd, PrintWriter pw, String[] args) { in reverseDump() argument
165 public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { in dump() argument
166 log.dump(fd, pw, args); in dump()
169 public void reverseDump(FileDescriptor fd, PrintWriter pw, String[] args) { in reverseDump() argument
170 log.reverseDump(fd, pw, args); in reverseDump()
/packages/apps/Gallery2/src/com/android/gallery3d/data/
DDecodeUtils.java60 public static Bitmap decode(JobContext jc, FileDescriptor fd, Options options) { in decode() argument
65 BitmapFactory.decodeFileDescriptor(fd, null, options)); in decode()
68 public static void decodeBounds(JobContext jc, FileDescriptor fd, in decodeBounds() argument
73 BitmapFactory.decodeFileDescriptor(fd, null, options); in decodeBounds()
104 FileDescriptor fd = fis.getFD(); in decodeThumbnail() local
105 return decodeThumbnail(jc, fd, options, targetSize, type); in decodeThumbnail()
115 JobContext jc, FileDescriptor fd, Options options, int targetSize, int type) { in decodeThumbnail() argument
120 BitmapFactory.decodeFileDescriptor(fd, null, options); in decodeThumbnail()
148 Bitmap result = BitmapFactory.decodeFileDescriptor(fd, null, options); in decodeThumbnail()
227 JobContext jc, FileDescriptor fd, boolean shareable) { in createBitmapRegionDecoder() argument
[all …]
/packages/services/BuiltInPrintService/jni/plugins/
Dplugin_pdf.c73 int fd; in _print_page() local
91 fd = open(pathname, O_RDONLY); in _print_page()
92 if (fd != ERROR) { in _print_page()
93 rbytes = read(fd, buff, BUFF_SIZE); in _print_page()
99 rbytes = read(fd, buff, BUFF_SIZE); in _print_page()
107 close(fd); in _print_page()
/packages/apps/UnifiedEmail/src/com/android/mail/ui/
DThumbnailLoadTask.java113 AssetFileDescriptor fd = null; in loadBitmap() local
115 fd = mHolder.getResolver().openAssetFileDescriptor(thumbnailUri, "r"); in loadBitmap()
116 if (isCancelled() || fd == null) { in loadBitmap()
124 BitmapFactory.decodeFileDescriptor(fd.getFileDescriptor(), null, opts); in loadBitmap()
141 fd.getFileDescriptor(), null, opts); in loadBitmap()
153 if (fd != null) { in loadBitmap()
155 fd.close(); in loadBitmap()
DAbstractMailActivity.java94 public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) { in dump() argument
95 super.dump(prefix, fd, writer, args); in dump()
98 getLoaderManager().dump(prefix, fd, writer, args); in dump()
99 getFragmentManager().dump(prefix, fd, writer, args); in dump()
/packages/services/Car/car-bugreportd/
Dmain.cpp90 int fd = accept(s, &addr, &alen); in openSocket() local
91 if (fd < 0) { in openSocket()
95 return fd; in openSocket()
135 android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(filepath.c_str(), O_RDONLY))); in zipFilesToFd() local
136 if (fd == -1) { in zipFilesToFd()
142 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fd, buffer, sizeof(buffer))); in zipFilesToFd()
198 android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(zip_path.c_str(), O_RDONLY))); in copyFile() local
199 if (fd == -1) { in copyFile()
204 int bytes_copied = copyTo(fd, output_socket, buffer, sizeof(buffer)); in copyFile()
/packages/modules/NetworkStack/src/android/net/ip/
DIpNeighborMonitor.java148 FileDescriptor fd = null; in createFd() local
151 fd = Os.socket(AF_NETLINK, SOCK_DGRAM | SOCK_NONBLOCK, NETLINK_ROUTE); in createFd()
152 Os.bind(fd, makeNetlinkSocketAddress(0, OsConstants.RTMGRP_NEIGH)); in createFd()
153 NetlinkSocket.connectToKernel(fd); in createFd()
156 final SocketAddress nlAddr = Os.getsockname(fd); in createFd()
161 NetworkStackUtils.closeSocketQuietly(fd); in createFd()
165 return fd; in createFd()
/packages/apps/Bluetooth/src/com/android/bluetooth/opp/
DBluetoothOppSendFileInfo.java177 AssetFileDescriptor fd = contentResolver.openAssetFileDescriptor(uri, "r"); in generateFileInfo() local
178 long statLength = fd.getLength(); in generateFileInfo()
189 is = fd.createInputStream(); in generateFileInfo()
197 fd = contentResolver.openAssetFileDescriptor(uri, "r"); in generateFileInfo()
198 is = fd.createInputStream(); in generateFileInfo()
202 fd.close(); in generateFileInfo()
/packages/inputmethods/LatinIME/native/jni/src/dictionary/utils/
Dfile_utils.cpp32 const int fd = open(filePath, O_RDONLY); in getFileSize() local
33 if (fd == -1) { in getFileSize()
37 if (fstat(fd, &statBuf) != 0) { in getFileSize()
38 close(fd); in getFileSize()
41 close(fd); in getFileSize()
Ddict_file_writing_utils.cpp104 const int fd = open(filePath, O_WRONLY | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); in flushBufferToFile() local
105 if (fd == -1) { in flushBufferToFile()
110 FILE *const file = fdopen(fd, "wb"); in flushBufferToFile()
/packages/apps/Nfc/src/com/android/nfc/cardemulation/
DCardEmulationManager.java183 public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { in dump() argument
184 mServiceCache.dump(fd, pw, args); in dump()
185 mNfcFServicesCache.dump(fd, pw ,args); in dump()
186 mPreferredServices.dump(fd, pw, args); in dump()
187 mEnabledNfcFServices.dump(fd, pw, args); in dump()
188 mAidCache.dump(fd, pw, args); in dump()
189 mT3tIdentifiersCache.dump(fd, pw, args); in dump()
190 mHostEmulationManager.dump(fd, pw, args); in dump()
191 mHostNfcFEmulationManager.dump(fd, pw, args); in dump()
/packages/apps/Camera2/src/com/android/camera/
DThumbnail.java25 public static Bitmap createVideoThumbnailBitmap(FileDescriptor fd, int targetWidth) { in createVideoThumbnailBitmap() argument
26 return createVideoThumbnailBitmap(null, fd, targetWidth); in createVideoThumbnailBitmap()
33 private static Bitmap createVideoThumbnailBitmap(String filePath, FileDescriptor fd, in createVideoThumbnailBitmap() argument
41 retriever.setDataSource(fd); in createVideoThumbnailBitmap()
/packages/services/Car/evs/sampleDriver/
DEvsEnumerator.cpp338 FileHandleWrapper(int fd) { mFd = fd; } in qualifyCaptureDevice() argument
346 FileHandleWrapper fd = open(deviceName, O_RDWR, 0); in qualifyCaptureDevice() local
347 if (fd < 0) { in qualifyCaptureDevice()
352 int result = ioctl(fd, VIDIOC_QUERYCAP, &caps); in qualifyCaptureDevice()
367 if (ioctl(fd, VIDIOC_ENUM_FMT, &formatDescription) == 0) { in qualifyCaptureDevice()
/packages/apps/Messaging/src/com/android/messaging/util/
DMediaMetadataRetrieverWrapper.java40 AssetFileDescriptor fd = resolver.openAssetFileDescriptor(uri, "r"); in setDataSource() local
41 if (fd == null) { in setDataSource()
45 mRetriever.setDataSource(fd.getFileDescriptor()); in setDataSource()
50 fd.close(); in setDataSource()
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/storagelifetime/
DStorageLifetimeFragment.java143 FileDescriptor fd = Os.open(filePath.toString(), O_APPEND | O_RDWR, 0); in fsyncFile() local
144 if (!fd.valid()) { in fsyncFile()
150 Os.write(fd, byteBuffer); in fsyncFile()
151 Os.fsync(fd); in fsyncFile()
152 Os.close(fd); in fsyncFile()
/packages/services/Telephony/src/com/android/phone/
DDumpsysHandler.java16 public static void dump(Context context, FileDescriptor fd, PrintWriter writer, in dump() argument
18 PhoneGlobals.getInstance().dump(fd, writer, args); in dump()
20 VvmDumpHandler.dump(context, fd, writer, args); in dump()
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/archives/
DResourcesProvider.java143 AssetFileDescriptor fd = null; in includeDocument() local
145 fd = getContext().getResources().openRawResourceFd(resourceId); in includeDocument()
157 row.add(Document.COLUMN_SIZE, fd.getLength()); in includeDocument()
160 FileUtils.closeQuietly(fd); in includeDocument()
/packages/apps/WallpaperPicker/src/com/android/gallery3d/common/
DUtils.java92 public static void closeSilently(ParcelFileDescriptor fd) { in closeSilently() argument
94 if (fd != null) fd.close(); in closeSilently()

123456