Searched refs:fd (Results 51 - 75 of 486) sorted by relevance

1234567891011>>

/frameworks/base/core/jni/
H A Dandroid_util_FileObserver.cpp53 static void android_os_fileobserver_observe(JNIEnv* env, jobject object, jint fd) argument
63 int num_bytes = read(fd, event_buf, sizeof(event_buf));
105 static jint android_os_fileobserver_startWatching(JNIEnv* env, jobject object, jint fd, jstring pathString, jint mask) argument
111 if (fd >= 0)
115 res = inotify_add_watch(fd, path, mask);
125 static void android_os_fileobserver_stopWatching(JNIEnv* env, jobject object, jint fd, jint wfd) argument
129 inotify_rm_watch((int)fd, (uint32_t)wfd);
H A Dandroid_hardware_UsbDeviceConnection.cpp45 int fd = jniGetFDFromFileDescriptor(env, fileDescriptor); local
47 fd = dup(fd);
48 if (fd < 0)
52 struct usb_device* device = usb_device_new(deviceNameStr, fd);
57 close(fd);
90 int fd = android_hardware_UsbDeviceConnection_get_fd(env, thiz); local
91 if (fd < 0) return NULL;
92 lseek(fd, 0, SEEK_SET);
93 int length = read(fd, buffe
[all...]
/frameworks/base/tools/aapt/
H A Dprintapk.cpp28 int fd; local
44 fd = open(filename, O_RDONLY);
45 if (fd == -1) {
50 size = lseek(fd, 0, SEEK_END);
51 amt = lseek(fd, 0, SEEK_SET);
64 amt = read(fd, buf, size);
70 close(fd);
/frameworks/av/media/libstagefright/
H A DStagefrightMediaScanner.cpp76 file.fd = 0;
146 int fd = open(path, O_RDONLY | O_LARGEFILE); local
148 if (fd < 0) {
152 status = mRetriever->setDataSource(fd, 0, 0x7ffffffffffffffL);
153 close(fd);
205 char *StagefrightMediaScanner::extractAlbumArt(int fd) { argument
206 ALOGV("extractAlbumArt %d", fd);
208 off64_t size = lseek64(fd, 0, SEEK_END);
212 lseek64(fd, 0, SEEK_SET);
215 if (mRetriever->setDataSource(fd,
[all...]
/frameworks/base/libs/androidfw/
H A DBackupHelpers.cpp90 read_snapshot_file(int fd, KeyedVector<String8,FileState>* snapshot) argument
96 amt = read(fd, &header, sizeof(header));
111 amt = read(fd, &file, sizeof(FileState));
123 amt = read(fd, filename, nameBufSize);
147 write_snapshot_file(int fd, const KeyedVector<String8,FileRec>& snapshot) argument
162 LOGP("write_snapshot_file fd=%d\n", fd);
167 amt = write(fd, &header, sizeof(header));
179 amt = write(fd, &r.s, sizeof(FileState));
186 amt = write(fd, nam
215 write_update_file(BackupDataWriter* dataStream, int fd, int mode, const String8& key, char const* realFilename) argument
302 int fd = open(realFilename, O_RDONLY); local
313 compute_crc32(int fd) argument
400 int fd = open(g.file.string(), O_RDONLY); local
540 int fd = open(filepath.string(), O_RDONLY); local
741 int fd; local
816 WriteSnapshot(int fd) argument
829 int fd; local
853 int fd; local
[all...]
H A DAsset.cpp126 int fd; local
128 fd = open(fileName, O_RDONLY | O_BINARY);
129 if (fd < 0)
140 length = lseek64(fd, 0, SEEK_END);
142 ::close(fd);
145 (void) lseek64(fd, 0, SEEK_SET);
148 if (fstat(fd, &st) < 0) {
149 ::close(fd);
154 ::close(fd);
160 result = pAsset->openChunk(fileName, fd,
187 int fd; local
373 openChunk(const char* fileName, int fd, off64_t offset, size_t length) argument
698 openChunk(int fd, off64_t offset, int compressionMethod, size_t uncompressedLen, size_t compressedLen) argument
[all...]
/frameworks/base/core/java/android/os/
H A DBinder.java232 ParcelFileDescriptor fd = data.readFileDescriptor();
234 if (fd != null) {
236 dump(fd.getFileDescriptor(), args);
239 fd.close();
260 public void dump(FileDescriptor fd, String[] args) { argument
261 FileOutputStream fout = new FileOutputStream(fd);
264 dump(fd, pw, args);
274 public void dumpAsync(final FileDescriptor fd, final String[] args) { argument
275 final FileOutputStream fout = new FileOutputStream(fd);
280 dump(fd, p
297 dump(FileDescriptor fd, PrintWriter fout, String[] args) argument
387 dump(FileDescriptor fd, String[] args) argument
401 dumpAsync(FileDescriptor fd, String[] args) argument
[all...]
H A DIBinder.java188 * @param fd The raw file descriptor that the dump is being sent to.
191 public void dump(FileDescriptor fd, String[] args) throws RemoteException; argument
198 * @param fd The raw file descriptor that the dump is being sent to.
201 public void dumpAsync(FileDescriptor fd, String[] args) throws RemoteException; argument
/frameworks/rs/driver/
H A DrsdShader.cpp309 void RsdShader::logUniform(const Element *field, const float *fd, uint32_t arraySize ) { argument
318 ALOGV("{%f, %f, %f, %f", fd[0], fd[4], fd[8], fd[12]);
319 ALOGV(" %f, %f, %f, %f", fd[1], fd[5], fd[9], fd[13]);
320 ALOGV(" %f, %f, %f, %f", fd[
355 setUniform(const Context *rsc, const Element *field, const float *fd, int32_t slot, uint32_t arraySize ) argument
535 const float *fd = reinterpret_cast<const float *>(&data[offset]); local
[all...]
/frameworks/compile/linkloader/
H A Dmain.cpp36 int &fd,
40 void close_mmap_file(int fd,
58 int fd = -1; local
62 if (!open_mmap_file(filename, fd, image, image_size)) {
70 close_mmap_file(fd, image, image_size);
212 int &fd,
230 fd = open(filename, O_RDONLY);
231 if (fd < 0) {
238 mmap(0, size, PROT_READ, MAP_PRIVATE, fd, 0));
242 close(fd);
211 open_mmap_file(char const *filename, int &fd, unsigned char const *&image, size_t &size) argument
249 close_mmap_file(int fd, unsigned char const *image, size_t size) argument
[all...]
/frameworks/av/media/mtp/
H A DMtpEventPacket.cpp43 int MtpEventPacket::write(int fd) { argument
51 int ret = ::ioctl(fd, MTP_SEND_EVENT, (unsigned long)&event);
/frameworks/base/core/java/android/bluetooth/
H A DIBluetoothHealthCallback.aidl31 ParcelFileDescriptor fd, int id);
/frameworks/base/core/java/android/net/
H A DLocalServerSocket.java63 * @param fd bound file descriptor
66 public LocalServerSocket(FileDescriptor fd) throws IOException argument
68 impl = new LocalSocketImpl(fd);
102 * @return fd or null
/frameworks/av/include/media/stagefright/
H A DStagefrightMediaScanner.h33 virtual char *extractAlbumArt(int fd);
/frameworks/base/include/androidfw/
H A DObbFile.h40 bool readFrom(int fd);
42 bool writeTo(int fd);
44 bool removeFrom(int fd);
141 bool parseObbFile(int fd);
/frameworks/av/media/libmediaplayerservice/
H A DMetadataRetrieverClient.cpp59 status_t MetadataRetrieverClient::dump(int fd, const Vector<String16>& args) const argument
67 write(fd, result.string(), result.size());
68 write(fd, "\n", 1);
135 status_t MetadataRetrieverClient::setDataSource(int fd, int64_t offset, int64_t length) argument
137 ALOGV("setDataSource fd=%d, offset=%lld, length=%lld", fd, offset, length);
140 int ret = fstat(fd, &sb);
142 ALOGE("fstat(%d) failed: %d, %s", fd, ret, strerror(errno));
153 ::close(fd);
163 fd,
[all...]
H A DMidiMetadataRetriever.cpp50 status_t MidiMetadataRetriever::setDataSource(int fd, int64_t offset, int64_t length) argument
52 ALOGV("setDataSource: fd(%d), offset(%lld), and length(%lld)", fd, offset, length);
58 return mMidiPlayer->setDataSource(fd, offset, length);;
/frameworks/base/services/jni/
H A Dcom_android_server_SerialService.cpp41 int fd = open(pathStr, O_RDWR | O_NOCTTY); local
42 if (fd < 0) {
49 jobject fileDescriptor = jniCreateFileDescriptor(env, fd);
/frameworks/ex/variablespeed/src/com/android/ex/variablespeed/
H A DVariableSpeedNative.java47 int fd = descriptorField.getInt(fileDescriptor);
48 VariableSpeedNative.playFileDescriptor(fd, afd.getStartOffset(), afd.getLength());
66 /*package*/ static native void playFileDescriptor(int fd, long offset, long length); argument
/frameworks/native/include/binder/
H A DMemoryHeapBase.h42 * maps the memory referenced by fd. but DOESN'T take ownership
45 MemoryHeapBase(int fd, size_t size, uint32_t flags = 0, uint32_t offset = 0);
84 // init() takes ownership of fd
85 status_t init(int fd, void *base, int size,
89 status_t mapfd(int fd, size_t size, uint32_t offset = 0);
/frameworks/wilhelm/src/android/
H A Dandroid_LocAVPlayer.cpp63 } else if (mPlayer->setDataSource(mDataLocator.fdi.fd, mDataLocator.fdi.offset,
68 // Binder dups the fd for use by mediaserver, so if we own the fd then OK to close now
70 (void) ::close(mDataLocator.fdi.fd);
71 mDataLocator.fdi.fd = -1;
/frameworks/base/services/common_time/
H A Ddiag_thread.cpp38 static bool setNonblocking(int fd) { argument
39 int flags = fcntl(fd, F_GETFL);
40 if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0) {
42 fd, errno);
49 static bool setNodelay(int fd) { argument
51 if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &tmp, sizeof(tmp)) < 0) {
53 fd, errno);
213 poll_fds[0].fd = listen_fd_;
216 poll_fds[0].fd = data_fd_;
231 if (poll_fds[0].fd
[all...]
/frameworks/base/media/java/android/media/
H A DSoundPool.java164 ParcelFileDescriptor fd = ParcelFileDescriptor.open(f, ParcelFileDescriptor.MODE_READ_ONLY);
165 if (fd != null) {
166 id = _load(fd.getFileDescriptor(), 0, f.length(), priority);
167 fd.close();
216 throw new AndroidRuntimeException("no length for fd");
231 * @param fd a FileDescriptor object
238 public int load(FileDescriptor fd, long offset, long length, int priority) { argument
239 return _load(fd, offset, length, priority);
244 private native final int _load(FileDescriptor fd, long offset, long length, int priority); argument
/frameworks/native/include/utils/
H A DLooper.h102 virtual int handleEvent(int fd, int events, void* data) = 0;
115 virtual int handleEvent(int fd, int events, void* data);
169 * events and data associated with the fd, otherwise they will be set to NULL.
201 * "fd" is the file descriptor to be added.
228 int addFd(int fd, int ident, int events, ALooper_callbackFunc callback, void* data);
229 int addFd(int fd, int ident, int events, const sp<LooperCallback>& callback, void* data);
251 int removeFd(int fd);
324 int fd; member in struct:android::Looper::Request
/frameworks/native/libs/utils/
H A DTokenizer.cpp58 int fd = ::open(filename.string(), O_RDONLY); local
59 if (fd < 0) {
64 if (fstat(fd, &stat)) {
73 if (fileMap->create(NULL, fd, 0, length, true)) {
85 ssize_t nrd = read(fd, buffer, length);
100 close(fd);

Completed in 593 milliseconds

1234567891011>>