/frameworks/base/cmds/idmap/ |
H A D | create.cpp | 35 int fd = TEMP_FAILURE_RETRY(open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644)); local 36 if (fd == -1) { 40 if (fchmod(fd, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) < 0) { 44 if (TEMP_FAILURE_RETRY(flock(fd, LOCK_EX)) != 0) { 49 return fd; 51 if (fd != -1) { 52 close(fd); 58 int write_idmap(int fd, const uint32_t *data, size_t size) argument 60 if (lseek(fd, 0, SEEK_SET) < 0) { 65 ssize_t w = TEMP_FAILURE_RETRY(write(fd, dat 175 create_and_write_idmap(const char *target_apk_path, const char *overlay_apk_path, int fd, bool check_if_stale) argument 210 int fd = open_idmap(idmap_path); local 223 idmap_create_fd(const char *target_apk_path, const char *overlay_apk_path, int fd) argument 229 idmap_verify_fd(const char *target_apk_path, const char *overlay_apk_path, int fd) argument [all...] |
H A D | idmap.h | 26 int idmap_create_fd(const char *target_apk_path, const char *overlay_apk_path, int fd); 28 int idmap_verify_fd(const char *target_apk_path, const char *overlay_apk_path, int fd);
|
/frameworks/ml/nn/driver/cache/nnCache/ |
H A D | nnCache.cpp | 172 int fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0); local 173 if (fd == -1) { 183 fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0); 185 if (fd == -1) { 198 close(fd); 208 close(fd); 218 if (write(fd, buf, fileSize) == -1) { 222 close(fd); 228 fchmod(fd, S_IRUSR); 229 close(fd); 237 int fd = open(mFilename.c_str(), O_RDONLY, 0); local [all...] |
/frameworks/base/libs/androidfw/tests/ |
H A D | BackupData_test.cpp | 60 int fd = ::open(mFilename.string(), O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); local 61 if (fd < 0) { 75 int fd = ::open(mFilename.string(), O_WRONLY); local 76 BackupDataWriter* writer = new BackupDataWriter(fd); 83 ::close(fd); 84 fd = ::open(mFilename.string(), O_RDONLY); 85 BackupDataReader* reader = new BackupDataReader(fd); 117 int fd = ::open(mFilename.string(), O_WRONLY); local 118 BackupDataWriter* writer = new BackupDataWriter(fd); 124 ::close(fd); 165 int fd = ::open(mFilename.string(), O_WRONLY); local 220 int fd = ::open(mFilename.string(), O_WRONLY); local 259 int fd = ::open(mFilename.string(), O_WRONLY); local 320 int fd = ::open(mFilename.string(), O_WRONLY); local 388 int fd = ::open(mFilename.string(), O_WRONLY); local [all...] |
/frameworks/av/media/libstagefright/ |
H A D | StagefrightMediaScanner.cpp | 90 int fd = open(path, O_RDONLY | O_LARGEFILE); local 92 if (fd < 0) { 97 status = mRetriever->setDataSource(fd, 0, 0x7ffffffffffffffL); 98 close(fd); 151 MediaAlbumArt *StagefrightMediaScanner::extractAlbumArt(int fd) { argument 152 ALOGV("extractAlbumArt %d", fd); 154 off64_t size = lseek64(fd, 0, SEEK_END); 158 lseek64(fd, 0, SEEK_SET); 161 if (mRetriever->setDataSource(fd, 0, size) == OK) {
|
/frameworks/base/cmds/incident_helper/tests/ |
H A D | KernelWakesParser_test.cpp | 42 ASSERT_TRUE(tf.fd != -1); 67 int fd = open(testFile.c_str(), O_RDONLY); local 68 ASSERT_TRUE(fd != -1); 71 ASSERT_EQ(NO_ERROR, parser.Parse(fd, STDOUT_FILENO)); 73 close(fd); 105 int fd = open(testFile.c_str(), O_RDONLY); local 106 ASSERT_TRUE(fd != -1); 109 ASSERT_EQ(NO_ERROR, parser.Parse(fd, STDOUT_FILENO)); 111 close(fd);
|
H A D | BatteryTypeParser_test.cpp | 42 ASSERT_TRUE(tf.fd != -1); 59 int fd = open(testFile.c_str(), O_RDONLY); local 60 ASSERT_TRUE(fd != -1); 63 ASSERT_EQ(NO_ERROR, parser.Parse(fd, STDOUT_FILENO)); 65 close(fd);
|
/frameworks/base/media/java/android/media/midi/ |
H A D | MidiInputPort.java | 51 FileDescriptor fd, int portNumber) { 56 mFileDescriptor = fd; 58 mOutputStream = new FileOutputStream(fd); 62 /* package */ MidiInputPort(FileDescriptor fd, int portNumber) { argument 63 this(null, null, fd, portNumber); 107 FileDescriptor fd; 109 fd = mFileDescriptor; 110 if (fd == null) return null; 119 return fd; 50 MidiInputPort(IMidiDeviceServer server, IBinder token, FileDescriptor fd, int portNumber) argument
|
/frameworks/av/services/mediaextractor/ |
H A D | MediaExtractorService.cpp | 52 sp<IDataSource> MediaExtractorService::makeIDataSource(int fd, int64_t offset, int64_t length) argument 54 sp<DataSource> source = DataSourceFactory::CreateFromFd(fd, offset, length); 58 status_t MediaExtractorService::dump(int fd, const Vector<String16>& args) { argument 59 return MediaExtractorFactory::dump(fd, args) || dumpExtractors(fd, args);
|
/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
|
/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 | 52 int fd = jniGetFDFromFileDescriptor(env, fdObj); local 54 amt = read(fd, &flattenedHeader.headerSize, sizeof(flattenedHeader.headerSize)); 64 lseek(fd, remainingHeader, SEEK_CUR); 70 amt = read(fd, &flattenedHeader.version, 82 lseek(fd, remainingHeader, SEEK_CUR); 109 amt = read(fd, buf, flattenedHeader.nameLength); 117 lseek(fd, remainingHeader, SEEK_CUR); 129 int fd = jniGetFDFromFileDescriptor(env, fdObj); local 131 lseek(fd, bytesToSkip, SEEK_CUR); 152 int fd local 178 int fd = jniGetFDFromFileDescriptor(env, fdObj); local [all...] |
/frameworks/minikin/tests/unittest/ |
H A D | ICUEnvironment.h | 41 int fd = open(fn, O_RDONLY); variable 42 LOG_ALWAYS_FATAL_IF(fd == -1); 44 LOG_ALWAYS_FATAL_IF(fstat(fd, &sb) != 0); 47 void* mData = mmap(nullptr, mSize, PROT_READ, MAP_SHARED, fd, 0); 48 close(fd); variable
|
/frameworks/base/libs/hwui/service/ |
H A D | GraphicsStatsService.cpp | 51 FileDescriptor(int fd) : mFd(fd) {} argument 67 FileOutputStreamLite(int fd) : mCopyAdapter(fd), mImpl(&mCopyAdapter) {} argument 85 FDAdapter(int fd) : mFd(fd) {} argument 108 FileDescriptor fd{open(path.c_str(), O_RDONLY)}; 109 if (!fd.valid()) { 119 if (fstat(fd, &sb) || sb.st_size < sHeaderSize) { 129 void* addr = mmap(nullptr, sb.st_size, PROT_READ, MAP_SHARED, fd, 227 dumpAsTextToFd(protos::GraphicsStatsProto* proto, int fd) argument 311 int fd() { return mFd; } function in class:android::uirenderer::GraphicsStatsService::Dump [all...] |
/frameworks/av/media/libcpustats/ |
H A D | ThreadCpuUsage.cpp | 179 int fd = open("/sys/devices/system/cpu/kernel_max", O_RDONLY); local 180 if (fd >= 0) { 183 ssize_t actual = read(fd, kernelMax, sizeof(kernelMax)); 199 (void) close(fd); 215 // double-checked locking idiom is not broken for atomic values such as fd 216 int fd = sScalingFds[cpuNum]; local 217 if (fd < 0) { 220 fd = sScalingFds[cpuNum]; 221 if (fd < 0) { 229 fd [all...] |
/frameworks/base/cmds/incidentd/src/ |
H A D | FdBuffer.h | 33 * Reads data from fd into a buffer, fd must be closed explicitly. 45 status_t read(int fd, int64_t timeoutMs); 51 status_t readFully(int fd); 56 * reads original data in 'fd' and writes to parsing process through 'toFd', then it reads 61 * Poll will return POLLERR if fd is from sysfs, handle this edge case. 63 status_t readProcessedDataInStream(int fd, unique_fd toFd, unique_fd fromFd, int64_t timeoutMs,
|
/frameworks/base/libs/hwui/ |
H A D | ProfileData.cpp | 103 void ProfileData::dump(int fd) const { 104 dprintf(fd, "\nStats since: %" PRIu64 "ns", mStatStartTime); 105 dprintf(fd, "\nTotal frames rendered: %u", mTotalFrameCount); 106 dprintf(fd, "\nJanky frames: %u (%.2f%%)", mJankFrameCount, 109 dprintf(fd, "\n50th percentile: %ums", findPercentile(50)); 110 dprintf(fd, "\n90th percentile: %ums", findPercentile(90)); 111 dprintf(fd, "\n95th percentile: %ums", findPercentile(95)); 112 dprintf(fd, "\n99th percentile: %ums", findPercentile(99)); 114 dprintf(fd, "\nNumber %s: %u", JANK_TYPE_NAMES[i], mJankTypeCounts[i]); 116 dprintf(fd, "\nHISTOGRA [all...] |
/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/native/include/android/ |
H A D | looper.h | 168 typedef int (*ALooper_callbackFunc)(int fd, int events, void* data); 193 * fd, otherwise they will be set to NULL. 219 * "fd" is the file descriptor to be added. 241 int ALooper_addFd(ALooper* looper, int fd, int ident, int events, 261 int ALooper_removeFd(ALooper* looper, int fd);
|
/frameworks/native/include_sensor/android/ |
H A D | looper.h | 168 typedef int (*ALooper_callbackFunc)(int fd, int events, void* data); 193 * fd, otherwise they will be set to NULL. 219 * "fd" is the file descriptor to be added. 241 int ALooper_addFd(ALooper* looper, int fd, int ident, int events, 261 int ALooper_removeFd(ALooper* looper, 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 51 TelephonyMetrics.getInstance().dump(fd, pw, args); 56 PhoneFactory.dump(fd, pw, args);
|
/frameworks/base/services/core/jni/ |
H A D | com_android_server_UsbDescriptorParser.cpp | 42 int fd = usb_device_get_fd(device); local 43 if (fd < 0) { 50 lseek(fd, 0, SEEK_SET); 51 int numBytes = read(fd, buffer, sizeof(buffer)); 77 int fd = usb_device_get_fd(device); local 78 if (fd < 0) {
|
/frameworks/av/media/libmedia/ |
H A D | IMediaExtractorService.cpp | 57 virtual sp<IDataSource> makeIDataSource(int fd, int64_t offset, int64_t length) argument 61 data.writeFileDescriptor(fd); 65 ALOGV("fd:%d offset:%lld length:%lld ret:%d", 66 fd, (long long)offset, (long long)length, ret); 103 const int fd = dup(data.readFileDescriptor()); // -1 fd checked in makeIDataSource local 106 ALOGV("fd %d offset%lld length:%lld", fd, (long long)offset, (long long)length); 107 sp<IDataSource> source = makeIDataSource(fd, offset, length); 111 if (source.get() == nullptr && fd ! [all...] |
/frameworks/base/core/java/android/bluetooth/ |
H A D | BluetoothHealthCallback.java | 58 * @param fd The Parcel File Descriptor when the channel state is connected. 64 BluetoothDevice device, int prevState, int newState, ParcelFileDescriptor fd, 67 + "prevState:" + prevState + "newState:" + newState + "ParcelFd:" + fd 63 onHealthChannelStateChange(BluetoothHealthAppConfiguration config, BluetoothDevice device, int prevState, int newState, ParcelFileDescriptor fd, int channelId) argument
|
/frameworks/ml/nn/runtime/test/ |
H A D | TestMemory.cpp | 46 int fd = mkstemp(path); local 50 lseek(fd, offsetForMatrix2, SEEK_SET); 51 write(fd, matrix2, sizeof(matrix2)); 52 lseek(fd, offsetForMatrix3, SEEK_SET); 53 write(fd, matrix3, sizeof(matrix3)); 54 fsync(fd); 56 WrapperMemory weights(offsetForMatrix3 + sizeof(matrix3), PROT_READ, fd, 0); 90 close(fd);
|