/frameworks/base/core/java/android/app/backup/ |
H A D | BackupDataInput.java | 76 public BackupDataInput(FileDescriptor fd) { argument 77 if (fd == null) throw new NullPointerException(); 78 mBackupReader = ctor(fd); 80 throw new RuntimeException("Native initialization failed with fd=" + fd); 192 private native static long ctor(FileDescriptor fd); argument
|
H A D | BackupDataOutput.java | 71 public BackupDataOutput(FileDescriptor fd) { argument 72 if (fd == null) throw new NullPointerException(); 73 mBackupWriter = ctor(fd); 75 throw new RuntimeException("Native initialization failed with fd=" + fd); 129 private native static long ctor(FileDescriptor fd); argument
|
/frameworks/base/core/jni/ |
H A D | android_hardware_SerialPort.cpp | 135 int fd = jniGetFDFromFileDescriptor(env, fileDescriptor); local 137 fd = dup(fd); 138 if (fd < 0) { 142 env->SetIntField(thiz, field_context, fd); 145 if (tcgetattr(fd, &tio)) 156 tcsetattr(fd, TCSANOW, &tio); 157 tcflush(fd, TCIFLUSH); 163 int fd = env->GetIntField(thiz, field_context); local 164 close(fd); 171 int fd = env->GetIntField(thiz, field_context); local 193 int fd = env->GetIntField(thiz, field_context); local 210 int fd = env->GetIntField(thiz, field_context); local 227 int fd = env->GetIntField(thiz, field_context); local 242 int fd = env->GetIntField(thiz, field_context); local [all...] |
H A D | android_backup_BackupHelperDispatcher.cpp | 51 int fd = jniGetFDFromFileDescriptor(env, fdObj); local 53 amt = read(fd, &flattenedHeader.headerSize, sizeof(flattenedHeader.headerSize)); 63 lseek(fd, remainingHeader, SEEK_CUR); 69 amt = read(fd, &flattenedHeader.version, 81 lseek(fd, remainingHeader, SEEK_CUR); 108 amt = read(fd, buf, flattenedHeader.nameLength); 116 lseek(fd, remainingHeader, SEEK_CUR); 128 int fd = jniGetFDFromFileDescriptor(env, fdObj); local 130 lseek(fd, bytesToSkip, SEEK_CUR); 151 int fd local 177 int fd = jniGetFDFromFileDescriptor(env, fdObj); local [all...] |
H A D | android_util_FileObserver.cpp | 53 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);
|
/frameworks/av/media/libcpustats/ |
H A D | ThreadCpuUsage.cpp | 174 int fd = open("/sys/devices/system/cpu/kernel_max", O_RDONLY); local 175 if (fd >= 0) { 178 ssize_t actual = read(fd, kernelMax, sizeof(kernelMax)); 194 (void) close(fd); 210 // double-checked locking idiom is not broken for atomic values such as fd 211 int fd = sScalingFds[cpuNum]; local 212 if (fd < 0) { 215 fd = sScalingFds[cpuNum]; 216 if (fd < 0) { 224 fd [all...] |
/frameworks/av/media/libmediaplayerservice/ |
H A D | ActivityManager.cpp | 33 int fd = -1; local 45 // Success is indicated here by a nonzero int followed by the fd; 48 fd = dup(reply.readFileDescriptor()); 58 return fd;
|
/frameworks/base/core/jni/android/graphics/ |
H A D | Utils.h | 75 AutoFDSeek(int fd) : fFD(fd) { argument 76 fCurr = ::lseek(fd, 0, SEEK_CUR);
|
/frameworks/base/libs/usb/tests/accessorytest/ |
H A D | hid.c | 50 int fd = (int)arg; local 59 fprintf(stderr, "hid_thread start fd: %d\n", fd); 61 if (ioctl(fd, HIDIOCGRDESCSIZE, &desc_length)) { 63 close(fd); 68 if (ioctl(fd, HIDIOCGRDESC, &desc)) { 70 close(fd); 75 fprintf(stderr, "waiting for device fd: %d\n", fd); 109 ret = read(fd, buffe 137 int fd = open(path, O_RDWR); local [all...] |
/frameworks/base/packages/SystemUI/src/com/android/systemui/ |
H A D | SystemUIService.java | 40 protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) { argument 45 ui.dump(fd, pw, args); 52 ui.dump(fd, pw, args);
|
/frameworks/native/include/android/ |
H A D | looper.h | 159 typedef int (*ALooper_callbackFunc)(int fd, int events, void* data); 182 * events and data associated with the fd, otherwise they will be set to NULL. 208 * "fd" is the file descriptor to be added. 230 int ALooper_addFd(ALooper* looper, int fd, int ident, int events, 250 int ALooper_removeFd(ALooper* looper, int fd);
|
/frameworks/av/media/mtp/ |
H A D | MtpResponsePacket.cpp | 38 int MtpResponsePacket::write(int fd) { argument 41 int ret = ::write(fd, mBuffer, mPacketSize);
|
H A D | MtpEventPacket.h | 33 int write(int fd);
|
H A D | MtpRequestPacket.h | 35 int read(int fd);
|
H A D | MtpResponsePacket.h | 33 int write(int fd);
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/ |
H A D | DebugService.java | 45 public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { argument 47 PhoneFactory.dump(fd, pw, args);
|
/frameworks/base/cmds/screencap/ |
H A D | screencap.cpp | 114 int fd = -1; local 116 fd = dup(STDOUT_FILENO); 119 fd = open(fn, O_WRONLY | O_CREAT | O_TRUNC, 0664); 120 if (fd == -1) { 130 if (fd == -1) { 185 write(fd, streamData->data(), streamData->size()); 188 write(fd, &w, 4); 189 write(fd, &h, 4); 190 write(fd, &f, 4); 193 write(fd, bas [all...] |
/frameworks/native/cmds/dumpstate/ |
H A D | utils.c | 91 int fd; local 101 if ((fd = open(cmdpath, O_RDONLY)) < 0) { 104 read(fd, cmdline, sizeof(cmdline) - 1); 105 close(fd); 139 int fd; local 152 if ((fd = open(commpath, O_RDONLY)) < 0) { 156 read(fd, comm, sizeof(comm) - 1); 157 close(fd); 177 int fd; local 183 if ((fd 255 int fd = open(path, O_RDONLY); local 266 dump_file_from_fd(const char *title, const char *path, int fd) argument 417 int fd = accept(s, &addr, &alen); local 446 int fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); local 539 int fd = open(traces_path, O_CREAT | O_WRONLY | O_TRUNC | O_NOFOLLOW, 0666); /* -rw-rw-rw- */ local [all...] |
/frameworks/native/opengl/libs/EGL/ |
H A D | egl_cache.cpp | 225 int fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0); local 226 if (fd == -1) { 236 fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0); 238 if (fd == -1) { 251 close(fd); 261 close(fd); 271 if (write(fd, buf, fileSize) == -1) { 275 close(fd); 281 fchmod(fd, S_IRUSR); 282 close(fd); 290 int fd = open(mFilename.string(), O_RDONLY, 0); local [all...] |
/frameworks/base/cmds/backup/ |
H A D | backup.cpp | 58 int fd; local 60 fd = open(filename, O_RDONLY); 61 if (fd == -1) { 66 BackupDataReader reader(fd);
|
/frameworks/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/ |
H A D | UsbAccessoryStreamTransport.java | 37 public UsbAccessoryStreamTransport(Logger logger, ParcelFileDescriptor fd) { argument 39 mFd = fd; 40 mInputStream = new FileInputStream(fd.getFileDescriptor()); 41 mOutputStream = new FileOutputStream(fd.getFileDescriptor());
|
/frameworks/base/tools/aapt/ |
H A D | printapk.cpp | 28 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 D | StagefrightMediaScanner.cpp | 77 file.fd = 0; 147 int fd = open(path, O_RDONLY | O_LARGEFILE); local 149 if (fd < 0) { 153 status = mRetriever->setDataSource(fd, 0, 0x7ffffffffffffffL); 154 close(fd); 206 MediaAlbumArt *StagefrightMediaScanner::extractAlbumArt(int fd) { argument 207 ALOGV("extractAlbumArt %d", fd); 209 off64_t size = lseek64(fd, 0, SEEK_END); 213 lseek64(fd, 0, SEEK_SET); 216 if (mRetriever->setDataSource(fd, [all...] |
/frameworks/base/cmds/bu/src/com/android/commands/bu/ |
H A D | Backup.java | 122 ParcelFileDescriptor fd = null; 124 fd = ParcelFileDescriptor.adoptFd(socketFd); 126 mBackupManager.fullBackup(fd, saveApks, saveObbs, saveShared, doWidgets, 131 if (fd != null) { 133 fd.close(); 141 ParcelFileDescriptor fd = null; 143 fd = ParcelFileDescriptor.adoptFd(socketFd); 144 mBackupManager.fullRestore(fd); 148 if (fd != null) { 150 fd [all...] |
/frameworks/base/packages/PrintSpooler/jni/ |
H A D | com_android_printspooler_util_BitmapSerializeUtils.cpp | 29 static bool writeAllBytes(const int fd, void* buffer, const size_t byteCount) { argument 33 ssize_t writtenByteCount = write(fd, writeBuffer, remainingBytes); 48 static bool readAllBytes(const int fd, void* buffer, const size_t byteCount) { argument 52 ssize_t readByteCount = read(fd, readBuffer, remainingBytes); 82 static void readBitmapPixels(JNIEnv* env, jclass clazz, jobject jbitmap, jint fd) { argument 85 bool read = readAllBytes(fd, (void*) &readInfo, sizeof(AndroidBitmapInfo)); 117 read = readAllBytes(fd, (void*) pixels, byteCount); 130 static void writeBitmapPixels(JNIEnv* env, jclass clazz, jobject jbitmap, jint fd) { argument 140 bool written = writeAllBytes(fd, (void*) &info, sizeof(AndroidBitmapInfo)); 156 written = writeAllBytes(fd, (voi [all...] |