/frameworks/base/core/java/android/net/ |
D | LocalSocketImpl.java | 41 private FileDescriptor fd; field in LocalSocketImpl 59 FileDescriptor myFd = fd; in available() 76 FileDescriptor myFd = fd; in read() 94 FileDescriptor myFd = fd; in read() 129 FileDescriptor myFd = fd; in write() 143 FileDescriptor myFd = fd; in write() 157 FileDescriptor myFd = fd; in flush() 169 private native int pending_native(FileDescriptor fd) throws IOException; in pending_native() argument 170 private native int available_native(FileDescriptor fd) throws IOException; in available_native() argument 171 private native int read_native(FileDescriptor fd) throws IOException; in read_native() argument [all …]
|
/frameworks/base/libs/androidfw/ |
D | ObbFile.cpp | 88 int fd; in readFrom() local 91 fd = ::open(filename, O_RDONLY); in readFrom() 92 if (fd < 0) { in readFrom() 96 success = readFrom(fd); in readFrom() 97 close(fd); in readFrom() 100 ALOGW("failed to read from %s (fd=%d)\n", filename, fd); in readFrom() 107 bool ObbFile::readFrom(int fd) in readFrom() argument 109 if (fd < 0) { in readFrom() 114 return parseObbFile(fd); in readFrom() 117 bool ObbFile::parseObbFile(int fd) in parseObbFile() argument [all …]
|
D | BackupHelpers.cpp | 87 read_snapshot_file(int fd, KeyedVector<String8,FileState>* snapshot) in read_snapshot_file() argument 93 amt = read(fd, &header, sizeof(header)); in read_snapshot_file() 108 amt = read(fd, &file, sizeof(FileState)); in read_snapshot_file() 120 amt = read(fd, filename, nameBufSize); in read_snapshot_file() 144 write_snapshot_file(int fd, const KeyedVector<String8,FileRec>& snapshot) in write_snapshot_file() argument 159 LOGP("write_snapshot_file fd=%d\n", fd); in write_snapshot_file() 164 amt = write(fd, &header, sizeof(header)); in write_snapshot_file() 176 amt = write(fd, &r.s, sizeof(FileState)); in write_snapshot_file() 183 amt = write(fd, name.string(), nameLen); in write_snapshot_file() 191 amt = write(fd, &padding, paddingLen); in write_snapshot_file() [all …]
|
D | Asset.cpp | 132 int fd; in createFromFile() local 134 fd = open(fileName, O_RDONLY | O_BINARY); in createFromFile() 135 if (fd < 0) in createFromFile() 146 length = lseek64(fd, 0, SEEK_END); in createFromFile() 148 ::close(fd); in createFromFile() 151 (void) lseek64(fd, 0, SEEK_SET); in createFromFile() 154 if (fstat(fd, &st) < 0) { in createFromFile() 155 ::close(fd); in createFromFile() 160 ::close(fd); in createFromFile() 166 result = pAsset->openChunk(fileName, fd, 0, length); in createFromFile() [all …]
|
/frameworks/base/services/core/jni/ |
D | com_android_server_UsbDeviceManager.cpp | 44 static void set_accessory_string(JNIEnv *env, int fd, int cmd, jobjectArray strArray, int index) in set_accessory_string() argument 49 ioctl(fd, cmd, buffer); in set_accessory_string() 61 int fd = open(DRIVER_NAME, O_RDWR); in android_server_UsbDeviceManager_getAccessoryStrings() local 62 if (fd < 0) { in android_server_UsbDeviceManager_getAccessoryStrings() 69 set_accessory_string(env, fd, ACCESSORY_GET_STRING_MANUFACTURER, strArray, 0); in android_server_UsbDeviceManager_getAccessoryStrings() 70 set_accessory_string(env, fd, ACCESSORY_GET_STRING_MODEL, strArray, 1); in android_server_UsbDeviceManager_getAccessoryStrings() 71 set_accessory_string(env, fd, ACCESSORY_GET_STRING_DESCRIPTION, strArray, 2); in android_server_UsbDeviceManager_getAccessoryStrings() 72 set_accessory_string(env, fd, ACCESSORY_GET_STRING_VERSION, strArray, 3); in android_server_UsbDeviceManager_getAccessoryStrings() 73 set_accessory_string(env, fd, ACCESSORY_GET_STRING_URI, strArray, 4); in android_server_UsbDeviceManager_getAccessoryStrings() 74 set_accessory_string(env, fd, ACCESSORY_GET_STRING_SERIAL, strArray, 5); in android_server_UsbDeviceManager_getAccessoryStrings() [all …]
|
D | com_android_server_PersistentDataBlockService.cpp | 34 uint64_t get_block_device_size(int fd) in get_block_device_size() argument 39 ret = ioctl(fd, BLKGETSIZE64, &size); in get_block_device_size() 47 int wipe_block_device(int fd) in wipe_block_device() argument 51 uint64_t len = get_block_device_size(fd); in wipe_block_device() 59 ret = ioctl(fd, BLKSECDISCARD, &range); in wipe_block_device() 64 ret = ioctl(fd, BLKDISCARD, &range); in wipe_block_device() 81 int fd = open(path, O_RDONLY); in com_android_server_PersistentDataBlockService_getBlockDeviceSize() local 83 if (fd < 0) in com_android_server_PersistentDataBlockService_getBlockDeviceSize() 86 return get_block_device_size(fd); in com_android_server_PersistentDataBlockService_getBlockDeviceSize() 91 int fd = open(path, O_WRONLY); in com_android_server_PersistentDataBlockService_wipe() local [all …]
|
/frameworks/native/libs/binder/ |
D | MemoryHeapBase.cpp | 50 int fd = ashmem_create_region(name == NULL ? "MemoryHeapBase" : name, size); in MemoryHeapBase() local 51 ALOGE_IF(fd<0, "error creating ashmem region: %s", strerror(errno)); in MemoryHeapBase() 52 if (fd >= 0) { in MemoryHeapBase() 53 if (mapfd(fd, size) == NO_ERROR) { in MemoryHeapBase() 55 ashmem_set_prot_region(fd, PROT_READ); in MemoryHeapBase() 69 int fd = open(device, open_flags); in MemoryHeapBase() local 70 ALOGE_IF(fd<0, "error opening %s: %s", device, strerror(errno)); in MemoryHeapBase() 71 if (fd >= 0) { in MemoryHeapBase() 74 if (mapfd(fd, size) == NO_ERROR) { in MemoryHeapBase() 80 MemoryHeapBase::MemoryHeapBase(int fd, size_t size, uint32_t flags, uint32_t offset) in MemoryHeapBase() argument [all …]
|
/frameworks/base/core/jni/ |
D | android_net_LocalSocketImpl.cpp | 59 int fd; in socket_connect_local() local 61 fd = jniGetFDFromFileDescriptor(env, fileDescriptor); in socket_connect_local() 70 fd, in socket_connect_local() 92 int fd; in socket_bind_local() local 99 fd = jniGetFDFromFileDescriptor(env, fileDescriptor); in socket_bind_local() 107 ret = socket_local_server_bind(fd, nameUtf8.c_str(), namespaceId); in socket_bind_local() 120 int fd; in socket_listen() local 122 fd = jniGetFDFromFileDescriptor(env, fileDescriptor); in socket_listen() 128 ret = listen(fd, backlog); in socket_listen() 150 int fd; in socket_accept() local [all …]
|
D | android_os_MemoryFile.cpp | 49 int fd = jniGetFDFromFileDescriptor(env, fileDescriptor); in android_os_MemoryFile_mmap() local 50 void* result = mmap(NULL, length, prot, MAP_SHARED, fd, 0); in android_os_MemoryFile_mmap() 66 int fd = jniGetFDFromFileDescriptor(env, fileDescriptor); in android_os_MemoryFile_close() local 67 if (fd >= 0) { in android_os_MemoryFile_close() 69 close(fd); in android_os_MemoryFile_close() 77 int fd = jniGetFDFromFileDescriptor(env, fileDescriptor); in android_os_MemoryFile_read() local 78 if (unpinned && ashmem_pin_region(fd, 0, 0) == ASHMEM_WAS_PURGED) { in android_os_MemoryFile_read() 79 ashmem_unpin_region(fd, 0, 0); in android_os_MemoryFile_read() 87 ashmem_unpin_region(fd, 0, 0); in android_os_MemoryFile_read() 96 int fd = jniGetFDFromFileDescriptor(env, fileDescriptor); in android_os_MemoryFile_write() local [all …]
|
D | android_hardware_SerialPort.cpp | 135 int fd = jniGetFDFromFileDescriptor(env, fileDescriptor); in android_hardware_SerialPort_open() local 137 fd = dup(fd); in android_hardware_SerialPort_open() 138 if (fd < 0) { in android_hardware_SerialPort_open() 142 env->SetIntField(thiz, field_context, fd); in android_hardware_SerialPort_open() 145 if (tcgetattr(fd, &tio)) in android_hardware_SerialPort_open() 156 tcsetattr(fd, TCSANOW, &tio); in android_hardware_SerialPort_open() 157 tcflush(fd, TCIFLUSH); in android_hardware_SerialPort_open() 163 int fd = env->GetIntField(thiz, field_context); in android_hardware_SerialPort_close() local 164 close(fd); in android_hardware_SerialPort_close() 171 int fd = env->GetIntField(thiz, field_context); in android_hardware_SerialPort_read_array() local [all …]
|
D | android_backup_BackupHelperDispatcher.cpp | 52 int fd = jniGetFDFromFileDescriptor(env, fdObj); in readHeader_native() local 54 amt = read(fd, &flattenedHeader.headerSize, sizeof(flattenedHeader.headerSize)); in readHeader_native() 64 lseek(fd, remainingHeader, SEEK_CUR); in readHeader_native() 70 amt = read(fd, &flattenedHeader.version, in readHeader_native() 82 lseek(fd, remainingHeader, SEEK_CUR); in readHeader_native() 109 amt = read(fd, buf, flattenedHeader.nameLength); in readHeader_native() 117 lseek(fd, remainingHeader, SEEK_CUR); in readHeader_native() 129 int fd = jniGetFDFromFileDescriptor(env, fdObj); in skipChunk_native() local 131 lseek(fd, bytesToSkip, SEEK_CUR); in skipChunk_native() 152 int fd = jniGetFDFromFileDescriptor(env, fdObj); in allocateHeader_native() local [all …]
|
/frameworks/base/cmds/idmap/ |
D | create.cpp | 35 int fd = TEMP_FAILURE_RETRY(open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644)); in open_idmap() local 36 if (fd == -1) { in open_idmap() 40 if (fchmod(fd, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) < 0) { in open_idmap() 44 if (TEMP_FAILURE_RETRY(flock(fd, LOCK_EX | LOCK_NB)) != 0) { in open_idmap() 49 return fd; in open_idmap() 51 if (fd != -1) { in open_idmap() 52 close(fd); in open_idmap() 58 int write_idmap(int fd, const uint32_t *data, size_t size) in write_idmap() argument 60 if (lseek(fd, SEEK_SET, 0) < 0) { in write_idmap() 65 ssize_t w = TEMP_FAILURE_RETRY(write(fd, data + size - bytesLeft, bytesLeft)); in write_idmap() [all …]
|
/frameworks/base/libs/androidfw/tests/ |
D | BackupData_test.cpp | 60 int fd = ::open(mFilename.string(), O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); in SetUp() local 61 if (fd < 0) { in SetUp() 75 int fd = ::open(mFilename.string(), O_WRONLY); in TEST_F() local 76 BackupDataWriter* writer = new BackupDataWriter(fd); in TEST_F() 83 ::close(fd); in TEST_F() 84 fd = ::open(mFilename.string(), O_RDONLY); in TEST_F() 85 BackupDataReader* reader = new BackupDataReader(fd); in TEST_F() 117 int fd = ::open(mFilename.string(), O_WRONLY); in TEST_F() local 118 BackupDataWriter* writer = new BackupDataWriter(fd); in TEST_F() 124 ::close(fd); in TEST_F() [all …]
|
/frameworks/native/cmds/dumpstate/ |
D | utils.c | 97 int fd; in __for_each_pid() local 107 if ((fd = TEMP_FAILURE_RETRY(open(cmdpath, O_RDONLY | O_CLOEXEC))) < 0) { in __for_each_pid() 110 read(fd, cmdline, sizeof(cmdline) - 1); in __for_each_pid() 111 close(fd); in __for_each_pid() 145 int fd; in for_each_tid_helper() local 158 if ((fd = TEMP_FAILURE_RETRY(open(commpath, O_RDONLY | O_CLOEXEC))) < 0) { in for_each_tid_helper() 162 read(fd, comm, sizeof(comm) - 1); in for_each_tid_helper() 163 close(fd); in for_each_tid_helper() 183 int fd; in show_wchan() local 189 if ((fd = TEMP_FAILURE_RETRY(open(path, O_RDONLY | O_CLOEXEC))) < 0) { in show_wchan() [all …]
|
/frameworks/rs/driver/ |
D | rsdShader.cpp | 311 void RsdShader::logUniform(const Element *field, const float *fd, uint32_t arraySize ) { in logUniform() argument 320 ALOGV("{%f, %f, %f, %f", fd[0], fd[4], fd[8], fd[12]); in logUniform() 321 ALOGV(" %f, %f, %f, %f", fd[1], fd[5], fd[9], fd[13]); in logUniform() 322 ALOGV(" %f, %f, %f, %f", fd[2], fd[6], fd[10], fd[14]); in logUniform() 323 ALOGV(" %f, %f, %f, %f}", fd[3], fd[7], fd[11], fd[15]); in logUniform() 326 ALOGV("{%f, %f, %f", fd[0], fd[3], fd[6]); in logUniform() 327 ALOGV(" %f, %f, %f", fd[1], fd[4], fd[7]); in logUniform() 328 ALOGV(" %f, %f, %f}", fd[2], fd[5], fd[8]); in logUniform() 331 ALOGV("{%f, %f", fd[0], fd[2]); in logUniform() 332 ALOGV(" %f, %f}", fd[1], fd[3]); in logUniform() [all …]
|
/frameworks/base/core/java/com/android/server/ |
D | NetworkManagementSocketTagger.java | 66 public void tag(FileDescriptor fd) throws SocketException { in tag() argument 69 Log.d(TAG, "tagSocket(" + fd.getInt$() + ") with statsTag=0x" in tag() 73 tagSocketFd(fd, options.statsTag, options.statsUid); in tag() 76 private void tagSocketFd(FileDescriptor fd, int tag, int uid) { in tagSocketFd() argument 80 final int errno = native_tagSocketFd(fd, tag, uid); in tagSocketFd() 82 Log.i(TAG, "tagSocketFd(" + fd.getInt$() + ", " in tagSocketFd() 90 public void untag(FileDescriptor fd) throws SocketException { in untag() argument 92 Log.i(TAG, "untagSocket(" + fd.getInt$() + ")"); in untag() 94 unTagSocketFd(fd); in untag() 97 private void unTagSocketFd(FileDescriptor fd) { in unTagSocketFd() argument [all …]
|
/frameworks/av/drm/common/ |
D | ReadWriteUtils.cpp | 41 int fd = fileno(file); in readBytes() local 44 if (fstat(fd, &sb) == 0 && sb.st_size > 0) { in readBytes() 47 if (length == read(fd, (void*) bytes, length)) { in readBytes() 63 int fd = fileno(file); in readBytes() local 66 if (fstat(fd, &sb) == 0 && sb.st_size > 0) { in readBytes() 69 if (length != read(fd, (void*) *buffer, length)) { in readBytes() 83 int fd = fileno(file); in writeToFile() local 86 if (FAILURE != ftruncate(fd, size)) { in writeToFile() 87 if (size != write(fd, data.string(), size)) { in writeToFile() 100 int fd = fileno(file); in appendToFile() local [all …]
|
/frameworks/native/opengl/libs/EGL/ |
D | egl_cache.cpp | 225 int fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0); in saveBlobCacheLocked() local 226 if (fd == -1) { in saveBlobCacheLocked() 236 fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0); in saveBlobCacheLocked() 238 if (fd == -1) { in saveBlobCacheLocked() 251 close(fd); in saveBlobCacheLocked() 261 close(fd); in saveBlobCacheLocked() 271 if (write(fd, buf, fileSize) == -1) { in saveBlobCacheLocked() 275 close(fd); in saveBlobCacheLocked() 281 fchmod(fd, S_IRUSR); in saveBlobCacheLocked() 282 close(fd); in saveBlobCacheLocked() [all …]
|
/frameworks/base/media/java/android/media/ |
D | MediaMetadataRetriever.java | 70 FileDescriptor fd = is.getFD(); in setDataSource() local 71 setDataSource(fd, 0, 0x7ffffffffffffffL); in setDataSource() 129 public native void setDataSource(FileDescriptor fd, long offset, long length) in setDataSource() argument 141 public void setDataSource(FileDescriptor fd) in setDataSource() argument 144 setDataSource(fd, 0, 0x7ffffffffffffffL); in setDataSource() 169 AssetFileDescriptor fd = null; in setDataSource() local 173 fd = resolver.openAssetFileDescriptor(uri, "r"); in setDataSource() 177 if (fd == null) { in setDataSource() 180 FileDescriptor descriptor = fd.getFileDescriptor(); in setDataSource() 187 if (fd.getDeclaredLength() < 0) { in setDataSource() [all …]
|
D | MediaExtractor.java | 101 AssetFileDescriptor fd = null; in setDataSource() local 104 fd = resolver.openAssetFileDescriptor(uri, "r"); in setDataSource() 105 if (fd == null) { in setDataSource() 111 if (fd.getDeclaredLength() < 0) { in setDataSource() 112 setDataSource(fd.getFileDescriptor()); in setDataSource() 115 fd.getFileDescriptor(), in setDataSource() 116 fd.getStartOffset(), in setDataSource() 117 fd.getDeclaredLength()); in setDataSource() 123 if (fd != null) { in setDataSource() 124 fd.close(); in setDataSource() [all …]
|
/frameworks/av/services/audioflinger/ |
D | FastMixerDumpState.cpp | 59 void FastMixerDumpState::dump(int fd) const in dump() 62 dprintf(fd, " FastMixer not initialized\n"); in dump() 68 dprintf(fd, " FastMixer command=%s writeSequence=%u framesWritten=%u\n" in dump() 123 dprintf(fd, " Simple moving statistics over last %.1f seconds:\n", in dump() 125 dprintf(fd, " wall clock time in ms per mix cycle:\n" in dump() 129 dprintf(fd, " raw CPU load in us per mix cycle:\n" in dump() 134 dprintf(fd, " No FastMixer statistics available currently\n"); in dump() 137 dprintf(fd, " CPU clock frequency in MHz:\n" in dump() 140 dprintf(fd, " adjusted CPU load in MHz (i.e. normalized for CPU clock frequency):\n" in dump() 153 dprintf(fd, " Distribution of mix cycle times in ms for the tails " in dump() [all …]
|
/frameworks/base/core/java/android/os/ |
D | ParcelFileDescriptor.java | 169 public ParcelFileDescriptor(FileDescriptor fd) { in ParcelFileDescriptor() argument 170 this(fd, null); in ParcelFileDescriptor() 174 public ParcelFileDescriptor(FileDescriptor fd, FileDescriptor commChannel) { in ParcelFileDescriptor() argument 175 if (fd == null) { in ParcelFileDescriptor() 179 mFd = fd; in ParcelFileDescriptor() 200 final FileDescriptor fd = openInternal(file, mode); in open() local 201 if (fd == null) return null; in open() 203 return new ParcelFileDescriptor(fd); in open() 233 final FileDescriptor fd = openInternal(file, mode); in open() local 234 if (fd == null) return null; in open() [all …]
|
/frameworks/base/libs/usb/tests/accessorytest/ |
D | hid.c | 50 int fd = (int)arg; in hid_thread() local 59 fprintf(stderr, "hid_thread start fd: %d\n", fd); in hid_thread() 61 if (ioctl(fd, HIDIOCGRDESCSIZE, &desc_length)) { in hid_thread() 63 close(fd); in hid_thread() 68 if (ioctl(fd, HIDIOCGRDESC, &desc)) { in hid_thread() 70 close(fd); in hid_thread() 75 fprintf(stderr, "waiting for device fd: %d\n", fd); in hid_thread() 109 ret = read(fd, buffer, sizeof(buffer)); in hid_thread() 111 fprintf(stderr, "read failed, errno: %d, fd: %d\n", errno, fd); in hid_thread() 137 int fd = open(path, O_RDWR); in open_hid() local [all …]
|
/frameworks/base/core/java/android/content/res/ |
D | AssetFileDescriptor.java | 57 public AssetFileDescriptor(ParcelFileDescriptor fd, long startOffset, in AssetFileDescriptor() argument 59 this(fd, startOffset, length, null); in AssetFileDescriptor() 73 public AssetFileDescriptor(ParcelFileDescriptor fd, long startOffset, in AssetFileDescriptor() argument 75 if (fd == null) { in AssetFileDescriptor() 82 mFd = fd; in AssetFileDescriptor() 204 public AutoCloseInputStream(AssetFileDescriptor fd) throws IOException { in AutoCloseInputStream() argument 205 super(fd.getParcelFileDescriptor()); in AutoCloseInputStream() 206 super.skip(fd.getStartOffset()); in AutoCloseInputStream() 207 mRemaining = (int)fd.getLength(); in AutoCloseInputStream() 291 public AutoCloseOutputStream(AssetFileDescriptor fd) throws IOException { in AutoCloseOutputStream() argument [all …]
|
/frameworks/av/media/libcpustats/ |
D | ThreadCpuUsage.cpp | 174 int fd = open("/sys/devices/system/cpu/kernel_max", O_RDONLY); in init() local 175 if (fd >= 0) { in init() 178 ssize_t actual = read(fd, kernelMax, sizeof(kernelMax)); in init() 194 (void) close(fd); in init() 211 int fd = sScalingFds[cpuNum]; in getCpukHz() local 212 if (fd < 0) { in getCpukHz() 215 fd = sScalingFds[cpuNum]; in getCpukHz() 216 if (fd < 0) { in getCpukHz() 224 fd = open(freq_path, O_RDONLY | O_CLOEXEC); in getCpukHz() 226 sScalingFds[cpuNum] = fd; in getCpukHz() [all …]
|