Home
last modified time | relevance | path

Searched refs:mFd (Results 1 – 25 of 78) sorted by relevance

1234

/frameworks/base/services/tests/servicestests/src/com/android/server/utils/
DPriorityDumpTest.java55 private final FileDescriptor mFd = FileDescriptor.err; field in PriorityDumpTest
64 dump(mDumper, mFd, mPw, null); in testNullArgs()
65 verify(mDumper).dump(same(mFd), same(mPw), eq(null), /* asProto= */ eq(false)); in testNullArgs()
70 dump(mDumper, mFd, mPw, EMPTY_ARGS); in testNoArgs()
71 verify(mDumper).dump(same(mFd), same(mPw), eq(EMPTY_ARGS), /* asProto= */ eq(false)); in testNoArgs()
79 dump(mDumper, mFd, mPw, args); in testNonPriorityArgs()
80 verify(mDumper).dump(same(mFd), same(mPw), eq(args), /* asProto= */ eq(false)); in testNonPriorityArgs()
88 dump(mDumper, mFd, mPw, args); in testMissingPriority()
89 verify(mDumper).dump(same(mFd), same(mPw), eq(EMPTY_ARGS), /* asProto= */ eq(false)); in testMissingPriority()
97 dump(mDumper, mFd, mPw, args); in testInvalidPriorityNoExtraArgs()
[all …]
/frameworks/av/media/libstagefright/
DClearFileSource.cpp33 : mFd(-1), in ClearFileSource()
42 mFd = open(filename, O_LARGEFILE | O_RDONLY); in ClearFileSource()
44 if (mFd >= 0) { in ClearFileSource()
45 mLength = lseek64(mFd, 0, SEEK_END); in ClearFileSource()
52 : mFd(fd), in ClearFileSource()
93 if (mFd >= 0) { in ~ClearFileSource()
94 ::close(mFd); in ~ClearFileSource()
95 mFd = -1; in ~ClearFileSource()
100 return mFd >= 0 ? OK : NO_INIT; in initCheck()
104 if (mFd < 0) { in readAt()
[all …]
DAACWriter.cpp40 : mFd(dup(fd)), in AACWriter()
41 mInitCheck(mFd < 0? NO_INIT: OK), in AACWriter()
59 if (mFd != -1) { in ~AACWriter()
60 close(mFd); in ~AACWriter()
61 mFd = -1; in ~AACWriter()
240 write(mFd, &data, 1); in writeAdtsHeader()
249 write(mFd, &data, 1); in writeAdtsHeader()
260 write(mFd, &data, 1); in writeAdtsHeader()
268 write(mFd, &data, 1); in writeAdtsHeader()
271 write(mFd, &data, 1); in writeAdtsHeader()
[all …]
DAMRWriter.cpp35 : mFd(dup(fd)), in AMRWriter()
36 mInitCheck(mFd < 0? NO_INIT: OK), in AMRWriter()
47 if (mFd != -1) { in ~AMRWriter()
48 close(mFd); in ~AMRWriter()
49 mFd = -1; in ~AMRWriter()
90 if (write(mFd, kHeader, n) != n) { in addSource()
239 ssize_t n = write(mFd, in threadFunc()
266 close(mFd); in threadFunc()
267 mFd = -1; in threadFunc()
DOggWriter.cpp54 : mFd(dup(fd)), in OggWriter()
56 mInitCheck(mFd < 0 ? NO_INIT : OK) { in OggWriter()
65 if (mFd != -1) { in ~OggWriter()
66 close(mFd); in ~OggWriter()
67 mFd = -1; in ~OggWriter()
148 write(mFd, og.header, og.header_len); in writeOggHeaderPackets()
149 write(mFd, og.body, og.body_len); in writeOggHeaderPackets()
178 write(mFd, og.header, og.header_len); in writeOggHeaderPackets()
179 write(mFd, og.body, og.body_len); in writeOggHeaderPackets()
387 write(mFd, og.header, og.header_len); in threadFunc()
[all …]
/frameworks/av/media/mtp/
DMtpDevHandle.cpp39 : mFd(-1) {}; in MtpDevHandle()
44 return ::read(mFd, data, len); in read()
48 return ::write(mFd, data, len); in write()
52 return ioctl(mFd, MTP_RECEIVE_FILE, reinterpret_cast<unsigned long>(&mfr)); in receiveFile()
56 return ioctl(mFd, MTP_SEND_FILE_WITH_HEADER, reinterpret_cast<unsigned long>(&mfr)); in sendFile()
60 return ioctl(mFd, MTP_SEND_EVENT, reinterpret_cast<unsigned long>(&me)); in sendEvent()
64 mFd.reset(TEMP_FAILURE_RETRY(open(mtp_dev_path, O_RDWR))); in start()
65 if (mFd == -1) return -1; in start()
70 mFd.reset(); in close()
/frameworks/base/core/java/android/util/
DMemoryIntArray.java59 private int mFd = -1; field in MemoryIntArray
74 mFd = nativeCreate(name, size); in MemoryIntArray()
75 mMemoryAddr = nativeOpen(mFd, mIsOwner); in MemoryIntArray()
85 mFd = pfd.detachFd(); in MemoryIntArray()
86 mMemoryAddr = nativeOpen(mFd, mIsOwner); in MemoryIntArray()
108 return nativeGet(mFd, mMemoryAddr, index); in get()
124 nativeSet(mFd, mMemoryAddr, index, value); in set()
134 return nativeSize(mFd); in size()
145 nativeClose(mFd, mMemoryAddr, mIsOwner); in close()
146 mFd = -1; in close()
[all …]
/frameworks/av/media/libstagefright/foundation/include/media/stagefright/foundation/
DFileDescriptor.h51 : mFd(fd) { in Autoclose()
57 ::close(mFd); in ~Autoclose()
58 mFd = kInvalidFileDescriptor; in ~Autoclose()
67 int managedFd = mFd; in release()
68 mFd = kInvalidFileDescriptor; in release()
76 return mFd >= 0; in isValid()
89 return mFd; in get()
93 int mFd;
/frameworks/av/media/libmedia/
DMidiIoWrapper.cpp39 mFd = open(path, O_RDONLY | O_LARGEFILE); in MidiIoWrapper()
41 mLength = lseek(mFd, 0, SEEK_END); in MidiIoWrapper()
47 mFd = fd < 0 ? -1 : dup(fd); in MidiIoWrapper()
91 mFd = -1; in MidiIoWrapper()
104 if (mFd >= 0) { in ~MidiIoWrapper()
105 close(mFd); in ~MidiIoWrapper()
116 if (mFd < 0) { in readAt()
120 lseek(mFd, mBase + offset, SEEK_SET); in readAt()
124 return read(mFd, buffer, size); in readAt()
/frameworks/native/libs/binder/include/binder/
DParcelFileDescriptor.h34 ParcelFileDescriptor(ParcelFileDescriptor&& other) : mFd(std::move(other.mFd)) { } in ParcelFileDescriptor()
37 int get() const { return mFd.get(); } in get()
38 android::base::unique_fd release() { return std::move(mFd); } in release()
39 void reset(android::base::unique_fd fd = android::base::unique_fd()) { mFd = std::move(fd); }
46 android::base::unique_fd mFd;
/frameworks/base/core/java/android/content/res/
DAssetFileDescriptor.java45 private final ParcelFileDescriptor mFd; field in AssetFileDescriptor
86 mFd = fd; in AssetFileDescriptor()
98 return mFd; in getParcelFileDescriptor()
106 return mFd.getFileDescriptor(); in getFileDescriptor()
139 long len = mFd.getStatSize(); in getLength()
160 mFd.close(); in close()
173 return new ParcelFileDescriptor.AutoCloseInputStream(mFd); in createInputStream()
188 return new ParcelFileDescriptor.AutoCloseOutputStream(mFd); in createOutputStream()
195 return "{AssetFileDescriptor: " + mFd in toString()
346 return mFd.describeContents(); in describeContents()
[all …]
/frameworks/native/cmds/lshal/
DPipeRelay.cpp41 int mFd; member
56 : mFd(fd), mOutStream(os), mFinished(false) {} in RelayThread()
63 FD_SET(mFd, &set); in threadLoop()
67 int res = TEMP_FAILURE_RETRY(select(mFd + 1, &set, nullptr, nullptr, &timeout)); in threadLoop()
73 if (res == 0 || !FD_ISSET(mFd, &set)) { in threadLoop()
83 ssize_t n = TEMP_FAILURE_RETRY(read(mFd, buffer, sizeof(buffer))); in threadLoop()
/frameworks/av/media/libaaudio/src/binding/
DSharedMemoryParcelable.cpp45 mFd.reset(dup(fd.get())); // store a duplicate fd in setup()
46 ALOGV("setup(fd = %d -> %d, size = %d) this = %p\n", fd.get(), mFd.get(), sizeInBytes, this); in setup()
57 ALOGV("writeToParcel() mFd = %d, this = %p\n", mFd.get(), this); in writeToParcel()
58 status = parcel->writeUniqueFileDescriptor(mFd); in writeToParcel()
129 if (mFd.get() != -1) { in resolve()
130 result = resolveSharedMemory(mFd); in resolve()
158 ALOGD("mFd = %d", mFd.get()); in dump()
/frameworks/native/libs/ui/
DBufferHubEventFd.cpp24 BufferHubEventFd::BufferHubEventFd() : mFd(eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK)) {} in BufferHubEventFd()
26 BufferHubEventFd::BufferHubEventFd(int fd) : mFd(fd) {} in BufferHubEventFd()
34 eventfd_write(mFd.get(), 1); in signal()
45 eventfd_read(mFd.get(), &value); in clear()
/frameworks/av/media/libstagefright/webm/
DWebmWriter.cpp58 : mFd(dup(fd)), in WebmWriter()
59 mInitCheck(mFd < 0 ? NO_INIT : OK), in WebmWriter()
78 mFd, in WebmWriter()
314 close(mFd); in release()
315 mFd = -1; in release()
377 mCuesOffset = ::lseek(mFd, 0, SEEK_CUR); in reset()
378 cues->write(mFd, cuesSize); in reset()
381 ::lseek(mFd, mCuesOffset, SEEK_SET); in reset()
382 cues->write(mFd, cuesSize); in reset()
384 space->write(mFd, spaceSize); in reset()
[all …]
/frameworks/base/libs/services/src/os/
DDropBoxManager.cpp39 mFd() in Entry()
49 mFd() in Entry()
58 mFd(fd) in Entry()
81 if (mFd.get() != -1) { in writeToParcel()
86 ALOGD("writing fd %d\n", mFd.get()); in writeToParcel()
87 err = out->writeParcelFileDescriptor(mFd); in writeToParcel()
140 mFd.reset(fd); in readFromParcel()
155 return mFd; in getFd()
/frameworks/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/
DUsbAccessoryStreamTransport.java33 private ParcelFileDescriptor mFd; field in UsbAccessoryStreamTransport
39 mFd = fd; in UsbAccessoryStreamTransport()
47 mFd.close(); in ioClose()
50 mFd = null; in ioClose()
/frameworks/base/libs/hwui/service/
DGraphicsStatsService.cpp51 explicit FileDescriptor(int fd) : mFd(fd) {} in FileDescriptor()
53 if (mFd != -1) { in ~FileDescriptor()
54 close(mFd); in ~FileDescriptor()
55 mFd = -1; in ~FileDescriptor()
58 bool valid() { return mFd != -1; } in valid()
59 operator int() { return mFd; } // NOLINT(google-explicit-constructor) in operator int()
62 int mFd; member in android::uirenderer::FileDescriptor
82 int mFd; member
85 explicit FDAdapter(int fd) : mFd(fd) {} in FDAdapter()
91 ret = TEMP_FAILURE_RETRY(write(mFd, buffer, size)); in Write()
[all …]
/frameworks/base/drm/java/android/drm/
DDrmOutputStream.java49 private final FileDescriptor mFd; field in DrmOutputStream
60 mFd = pfd.getFileDescriptor(); in DrmOutputStream()
72 Os.lseek(mFd, status.offset, SEEK_SET); in finish()
76 IoBridge.write(mFd, status.convertedData, 0, status.convertedData.length); in finish()
106 IoBridge.write(mFd, status.convertedData, 0, status.convertedData.length); in write()
/frameworks/base/core/java/android/util/apk/
DMemoryMappedFileDataSource.java36 private final FileDescriptor mFd; field in MemoryMappedFileDataSource
47 mFd = fd; in MemoryMappedFileDataSource()
85 mFd, in feedIntoDataDigester()
90 mFd, // not really needed, but just in case in feedIntoDataDigester()
/frameworks/native/libs/binder/
DParcelFileDescriptor.cpp24 ParcelFileDescriptor::ParcelFileDescriptor(android::base::unique_fd fd) : mFd(std::move(fd)) {} in ParcelFileDescriptor()
29 return parcel->writeDupParcelFileDescriptor(mFd.get()); in writeToParcel()
33 return parcel->readUniqueParcelFileDescriptor(&mFd); in readFromParcel()
/frameworks/base/tests/UsbHostExternalManagmentTest/AoapTestDevice/src/com/android/hardware/usb/aoapdevicetest/
DUsbAoapDeviceTestActivity.java45 private ParcelFileDescriptor mFd; field in UsbAoapDeviceTestActivity
81 IoUtils.closeQuietly(mFd); in onDestroy()
106 mFd = mUsbManager.openAccessory(accessory); in onAccessoryAttached()
107 if (mFd == null) { in onAccessoryAttached()
113 mReaderThread = new ReaderThread(mFd); in onAccessoryAttached()
/frameworks/native/services/inputflinger/
DTouchVideoDevice.h42 bool hasValidFd() const { return mFd.get() != INVALID_FD; } in hasValidFd()
47 int getFd() const { return mFd.get(); } in getFd()
86 android::base::unique_fd mFd;
/frameworks/base/core/java/android/os/
DParcelFileDescriptor.java71 private final FileDescriptor mFd; field in ParcelFileDescriptor
176 mFd = null; in ParcelFileDescriptor()
193 mFd = fd; in ParcelFileDescriptor()
194 IoUtils.setFdOwner(mFd, this); in ParcelFileDescriptor()
634 return mFd; in getFileDescriptor()
647 final StructStat st = Os.fstat(mFd); in getStatSize()
671 return Os.lseek(mFd, pos, SEEK_SET); in seekTo()
693 return mFd.getInt$(); in getFd()
715 int fd = IoUtils.acquireRawFd(mFd); in detachFd()
774 IoUtils.closeQuietly(mFd); in closeWithStatus()
[all …]
/frameworks/base/cmds/hid/jni/
Dcom_android_commands_hid_Device.cpp145 mId(id), mFd(fd), mDeviceCallback(std::move(callback)) { in Device()
158 ALooper_removeFd(looper, mFd); in ~Device()
164 TEMP_FAILURE_RETRY(::write(mFd, &ev, sizeof(ev))); in ~Device()
165 ::close(mFd); in ~Device()
166 mFd = -1; in ~Device()
179 ssize_t ret = TEMP_FAILURE_RETRY(::write(mFd, &ev, sizeof(ev))); in sendReport()
193 ssize_t ret = TEMP_FAILURE_RETRY(::write(mFd, &ev, sizeof(ev))); in sendGetFeatureReportReply()
206 ssize_t ret = TEMP_FAILURE_RETRY(::read(mFd, &ev, sizeof(ev))); in handleEvents()

1234