/frameworks/native/cmds/dumpstate/ |
H A D | DumpstateService.cpp | 80 status_t DumpstateService::dump(int fd, const Vector<String16>&) { argument 81 dprintf(fd, "id: %d\n", ds_.id_); 82 dprintf(fd, "pid: %d\n", ds_.pid_); 83 dprintf(fd, "update_progress: %s\n", ds_.update_progress_ ? "true" : "false"); 84 dprintf(fd, "update_progress_threshold: %d\n", ds_.update_progress_threshold_); 85 dprintf(fd, "last_updated_progress: %d\n", ds_.last_updated_progress_); 86 dprintf(fd, "progress:\n"); 87 ds_.progress_->Dump(fd, " "); 88 dprintf(fd, "args: %s\n", ds_.args_.c_str()); 89 dprintf(fd, "extra_option [all...] |
/frameworks/native/include/android/ |
H A D | sharedmem.h | 75 * \param fd file descriptor of the shared memory region 76 * \return size in bytes; 0 if fd is not a valid shared memory file descriptor. 78 size_t ASharedMemory_getSize(int fd); 92 * int fd = ASharedMemory_create("memory", 128); 95 * char *buffer = (char *) mmap(NULL, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); 100 * ASharedMemory_setProt(fd, PROT_READ); 102 * // share fd with another process here and the other process can only map with PROT_READ. 104 * \param fd file descriptor of the shared memory region. 109 int ASharedMemory_setProt(int fd, int prot);
|
/frameworks/base/core/jni/ |
H A D | android_util_MemoryIntArray.cpp | 39 int fd = ashmem_create_region(nameStr, ashmemSize); local 42 if (fd < 0) { 47 int setProtResult = ashmem_set_prot_region(fd, PROT_READ | PROT_WRITE); 53 return fd; 56 static jlong android_util_MemoryIntArray_open(JNIEnv* env, jobject clazz, jint fd, argument 59 if (fd < 0) { 64 if (!ashmem_valid(fd)) { 69 int ashmemSize = ashmem_get_size_region(fd); 84 void* ashmemAddr = mmap(NULL, ashmemSize, protMode, MAP_SHARED, fd, 0); 91 int mmapedSize = ashmem_get_size_region(fd); 114 android_util_MemoryIntArray_close(JNIEnv* env, jobject clazz, jint fd, jlong ashmemAddr, jboolean owner) argument 149 android_util_MemoryIntArray_get(JNIEnv* env, jobject clazz, jint fd, jlong address, jint index) argument 171 android_util_MemoryIntArray_set(JNIEnv* env, jobject clazz, jint fd, jlong address, jint index, jint newValue) argument 193 android_util_MemoryIntArray_size(JNIEnv* env, jobject clazz, jint fd) argument [all...] |
H A D | android_os_MemoryFile.cpp | 31 int fd = jniGetFDFromFileDescriptor(env, fileDescriptor); local 32 int result = (pin ? ashmem_pin_region(fd, 0, 0) : ashmem_unpin_region(fd, 0, 0)); 41 int fd = jniGetFDFromFileDescriptor(env, fileDescriptor); local 42 // Use ASHMEM_GET_SIZE to find out if the fd refers to an ashmem region. 45 int result = ashmem_get_size_region(fd);
|
H A D | fd_utils.cpp | 47 static const char kFdPath[] = "/proc/self/fd"; 132 static FileDescriptorInfo* CreateFromFd(int fd, std::string* error_msg); 140 const int fd; member in class:FileDescriptorInfo 150 FileDescriptorInfo(int fd); 152 FileDescriptorInfo(struct stat stat, const std::string& file_path, int fd, int open_flags, 155 // Returns the locally-bound name of the socket |fd|. Returns true 162 static bool GetSocketName(const int fd, std::string* result); 170 FileDescriptorInfo* FileDescriptorInfo::CreateFromFd(int fd, std::string* error_msg) { argument 174 if (TEMP_FAILURE_RETRY(fstat(fd, &f_stat)) == -1) { 175 *error_msg = android::base::StringPrintf("Unable to stat %d", fd); 344 FileDescriptorInfo(int fd) argument 354 FileDescriptorInfo(struct stat stat, const std::string& file_path, int fd, int open_flags, int fd_flags, int fs_flags, off_t offset) argument 368 GetSocketName(const int fd, std::string* result) argument 446 const int fd = ParseFd(e, dir_fd); local 487 const int fd = ParseFd(e, dir_fd); local 591 const int fd = (*it); local 610 const int fd = strtol(e->d_name, &end, 10); local [all...] |
/frameworks/base/services/core/jni/ |
H A D | com_android_server_UsbDeviceManager.cpp | 45 static void set_accessory_string(JNIEnv *env, int fd, int cmd, jobjectArray strArray, int index) argument 50 ioctl(fd, cmd, buffer); 62 int fd = open(DRIVER_NAME, O_RDWR); local 63 if (fd < 0) { 70 set_accessory_string(env, fd, ACCESSORY_GET_STRING_MANUFACTURER, strArray, 0); 71 set_accessory_string(env, fd, ACCESSORY_GET_STRING_MODEL, strArray, 1); 72 set_accessory_string(env, fd, ACCESSORY_GET_STRING_DESCRIPTION, strArray, 2); 73 set_accessory_string(env, fd, ACCESSORY_GET_STRING_VERSION, strArray, 3); 74 set_accessory_string(env, fd, ACCESSORY_GET_STRING_URI, strArray, 4); 75 set_accessory_string(env, fd, ACCESSORY_GET_STRING_SERIA 84 int fd = open(DRIVER_NAME, O_RDWR); local 100 int fd = open(DRIVER_NAME, O_RDWR); local 112 int fd = open(DRIVER_NAME, O_RDWR); local 125 int fd = -1; local [all...] |
H A D | com_android_server_PersistentDataBlockService.cpp | 35 uint64_t get_block_device_size(int fd) argument 40 ret = ioctl(fd, BLKGETSIZE64, &size); 48 int wipe_block_device(int fd) argument 52 uint64_t len = get_block_device_size(fd); 60 ret = ioctl(fd, BLKSECDISCARD, &range); 65 ret = ioctl(fd, BLKDISCARD, &range); 82 int fd = open(path.c_str(), O_RDONLY); local 84 if (fd < 0) 87 const uint64_t size = get_block_device_size(fd); 89 close(fd); 96 int fd = open(path.c_str(), O_WRONLY); local [all...] |
/frameworks/base/core/tests/utiltests/jni/ |
H A D | android_util_MemoryIntArrayTest.cpp | 39 int fd = ashmem_create_region(nameStr, ashmemSize); local 42 if (fd < 0) { 46 int setProtResult = ashmem_set_prot_region(fd, PROT_READ | PROT_WRITE); 51 return fd; 55 __attribute__((unused)) jobject clazz, jint fd, jint size) 57 if (fd < 0) { 65 ioctl(fd, ASHMEM_SET_SIZE, size); 54 android_util_MemoryIntArrayTest_setAshmemSize(__attribute__((unused)) JNIEnv* env, __attribute__((unused)) jobject clazz, jint fd, jint size) argument
|
/frameworks/base/libs/androidfw/ |
H A D | ObbFile.cpp | 88 int fd; local 91 fd = ::open(filename, O_RDONLY); 92 if (fd < 0) { 96 success = readFrom(fd); 97 close(fd); 100 ALOGW("failed to read from %s (fd=%d)\n", filename, fd); 107 bool ObbFile::readFrom(int fd) argument 109 if (fd < 0) { 110 ALOGW("attempt to read from invalid fd\ 117 parseObbFile(int fd) argument 228 int fd; local 245 writeTo(int fd) argument 313 int fd; local 330 removeFrom(int fd) argument [all...] |
/frameworks/base/native/android/ |
H A D | sharedmem.cpp | 54 size_t ASharedMemory_getSize(int fd) { argument 55 return ashmem_valid(fd) ? ashmem_get_size_region(fd) : 0; 58 int ASharedMemory_setProt(int fd, int prot) { argument 59 return ashmem_set_prot_region(fd, prot); 72 int fd = env->CallIntMethod(javaSharedMemory, sSharedMemory.getFd); local 73 if (fd != -1) { 74 fd = dup(fd); 76 return fd; [all...] |
/frameworks/base/core/java/android/net/ |
H A D | LocalSocketImpl.java | 44 private FileDescriptor fd; field in class:LocalSocketImpl 45 /** whether fd is created internally */ 62 FileDescriptor myFd = fd; 85 FileDescriptor myFd = fd; 103 FileDescriptor myFd = fd; 138 FileDescriptor myFd = fd; 152 FileDescriptor myFd = fd; 166 FileDescriptor myFd = fd; 193 private native int read_native(FileDescriptor fd) throws IOException; argument 195 FileDescriptor fd) throw 194 readba_native(byte[] b, int off, int len, FileDescriptor fd) argument 196 writeba_native(byte[] b, int off, int len, FileDescriptor fd) argument 198 write_native(int b, FileDescriptor fd) argument 200 connectLocal(FileDescriptor fd, String name, int namespace) argument 202 bindLocal(FileDescriptor fd, String name, int namespace) argument 204 getPeerCredentials_native( FileDescriptor fd) argument 221 LocalSocketImpl(FileDescriptor fd) argument [all...] |
/frameworks/native/services/utils/tests/ |
H A D | PriorityDumper_test.cpp | 50 PriorityDumperTest() : dumper_(), dumpAlldumper_(), fd(1) {} 53 int fd; member in class:PriorityDumperTest 64 EXPECT_CALL(dumper_, dumpAll(fd, ElementsAreArray(args), /*asProto=*/false)); 65 dumper_.priorityDump(fd, args); 71 EXPECT_CALL(dumper_, dumpAll(fd, ElementsAreArray(args), /*asProto=*/false)); 72 dumper_.priorityDump(fd, args); 79 EXPECT_CALL(dumper_, dumpCritical(fd, ElementsAreArray(strippedArgs), /*asProto=*/false)); 80 dumper_.priorityDump(fd, args); 89 EXPECT_CALL(dumper_, dumpCritical(fd, ElementsAreArray(strippedArgs), /*asProto=*/false)); 90 dumper_.priorityDump(fd, arg [all...] |
/frameworks/base/core/java/android/app/backup/ |
H A D | FullBackupDataOutput.java | 54 public FullBackupDataOutput(ParcelFileDescriptor fd, long quota) { argument 55 mData = new BackupDataOutput(fd.getFileDescriptor(), quota, 0); 61 public FullBackupDataOutput(ParcelFileDescriptor fd, long quota, int transportFlags) { argument 62 mData = new BackupDataOutput(fd.getFileDescriptor(), quota, transportFlags); 68 public FullBackupDataOutput(ParcelFileDescriptor fd) { argument 69 this(fd, /*quota=*/ -1, /*transportFlags=*/ 0);
|
H A D | BackupDataOutput.java | 77 public BackupDataOutput(FileDescriptor fd) { argument 78 this(fd, /*quota=*/ -1, /*transportFlags=*/ 0); 83 public BackupDataOutput(FileDescriptor fd, long quota) { argument 84 this(fd, quota, /*transportFlags=*/ 0); 88 public BackupDataOutput(FileDescriptor fd, long quota, int transportFlags) { argument 89 if (fd == null) throw new NullPointerException(); 92 mBackupWriter = ctor(fd); 94 throw new RuntimeException("Native initialization failed with fd=" + fd); 168 private native static long ctor(FileDescriptor fd); argument [all...] |
/frameworks/base/core/java/com/android/internal/os/ |
H A D | AppFuseMount.java | 32 final public ParcelFileDescriptor fd; field in class:AppFuseMount 37 * @param fd File descriptor pointing /dev/fuse and tagged with the mount point. 39 public AppFuseMount(int mountPointId, ParcelFileDescriptor fd) { argument 40 Preconditions.checkNotNull(fd); 42 this.fd = fd; 53 dest.writeParcelable(fd, flags);
|
/frameworks/av/media/libmediaplayerservice/ |
H A D | ActivityManager.cpp | 29 int fd = -1; local 35 fd = am->openContentUri(uri); 38 return fd;
|
/frameworks/av/services/audiopolicy/common/managerdefinitions/src/ |
H A D | AudioCollections.cpp | 38 status_t AudioRouteVector::dump(int fd, int spaces) const argument 47 write(fd, buffer, strlen(buffer)); 50 write(fd, buffer, strlen(buffer)); 51 itemAt(i)->dump(fd, 4);
|
H A D | AudioSourceDescriptor.cpp | 32 status_t AudioSourceDescriptor::dump(int fd) argument 42 write(fd, result.string(), result.size()); 43 mDevice->dump(fd, 2 , 0); 48 status_t AudioSourceCollection::dump(int fd) const 54 write(fd, buffer, strlen(buffer)); 57 write(fd, buffer, strlen(buffer)); 58 valueAt(i)->dump(fd);
|
/frameworks/native/services/surfaceflinger/tests/waitforvsync/ |
H A D | waitforvsync.cpp | 33 int fd = open("/dev/graphics/fb0", O_RDWR); local 34 if (fd >= 0) { 37 int err = ioctl(fd, FBIO_WAITFORVSYNC, &crt); 43 close(fd);
|
/frameworks/native/libs/binder/ |
H A D | IShellCallback.cpp | 51 int fd = reply.readParcelFileDescriptor(); local 52 return fd >= 0 ? fcntl(fd, F_DUPFD_CLOEXEC, 0) : fd; 70 int fd = openFile(path, seLinuxContext, mode); local 73 if (fd >= 0) { 75 reply->writeParcelFileDescriptor(fd, true); 79 } else if (fd >= 0) { 80 close(fd);
|
H A D | MemoryHeapBase.cpp | 49 int fd = ashmem_create_region(name == NULL ? "MemoryHeapBase" : name, size); local 50 ALOGE_IF(fd<0, "error creating ashmem region: %s", strerror(errno)); 51 if (fd >= 0) { 52 if (mapfd(fd, size) == NO_ERROR) { 54 ashmem_set_prot_region(fd, PROT_READ); 68 int fd = open(device, open_flags); local 69 ALOGE_IF(fd<0, "error opening %s: %s", device, strerror(errno)); 70 if (fd >= 0) { 73 if (mapfd(fd, size) == NO_ERROR) { 79 MemoryHeapBase::MemoryHeapBase(int fd, size_ argument 88 init(int fd, void *base, int size, int flags, const char* device) argument 101 mapfd(int fd, size_t size, uint32_t offset) argument 140 int fd = android_atomic_or(-1, &mFD); local [all...] |
/frameworks/native/opengl/libs/EGL/ |
H A D | FileBlobCache.cpp | 55 int fd = open(mFilename.c_str(), O_RDONLY, 0); local 56 if (fd == -1) { 65 if (fstat(fd, &statBuf) == -1) { 67 close(fd); 76 close(fd); 81 PROT_READ, MAP_PRIVATE, fd, 0)); 85 close(fd); 93 close(fd); 99 close(fd); 108 close(fd); 125 int fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0); local [all...] |
/frameworks/native/cmds/lshal/ |
H A D | PipeRelay.cpp | 26 explicit RelayThread(int fd, std::ostream &os); 39 PipeRelay::RelayThread::RelayThread(int fd, std::ostream &os) argument 40 : mFd(fd), 72 void PipeRelay::CloseFd(int *fd) { argument 73 if (*fd >= 0) { 74 close(*fd); 75 *fd = -1; 101 int PipeRelay::fd() const { function in class:android::lshal::PipeRelay
|
/frameworks/base/cmds/incidentd/src/ |
H A D | FdBuffer.cpp | 41 status_t FdBuffer::read(int fd, int64_t timeout) { argument 42 struct pollfd pfds = {.fd = fd, .events = POLLIN}; 45 fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK); 74 ssize_t amt = ::read(fd, mBuffer.writeBuffer(), mBuffer.currentToWrite()); 79 VLOG("Fail to read %d: %s", fd, strerror(errno)); 83 VLOG("Reached EOF of fd=%d", fd); 94 status_t FdBuffer::readFully(int fd) { argument 123 readProcessedDataInStream(int fd, unique_fd toFd, unique_fd fromFd, int64_t timeoutMs, const bool isSysfs) argument [all...] |
/frameworks/base/services/core/java/com/android/server/utils/ |
H A D | PriorityDump.java | 41 public void dumpCritical(FileDescriptor fd, PrintWriter pw, String[] args, boolean asProto) { 43 ProtoOutputStream proto = new ProtoOutputStream(fd); 52 public void dumpNormal(FileDescriptor fd, PrintWriter pw, String[] args) { 54 ProtoOutputStream proto = new ProtoOutputStream(fd); 64 protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) { 65 PriorityDump.dump(mPriorityDumper, fd, pw, args); 133 * <code>dumper.dumpHigh(fd, pw, {"arg1", "arg2", "arg3"}, false) </code> 139 public static void dump(PriorityDumper dumper, FileDescriptor fd, PrintWriter pw, argument 145 dumper.dump(fd, pw, args, asProto); 170 dumper.dumpCritical(fd, p 220 dumpCritical(FileDescriptor fd, PrintWriter pw, String[] args, boolean asProto) argument 228 dumpHigh(FileDescriptor fd, PrintWriter pw, String[] args, boolean asProto) argument 235 dumpNormal(FileDescriptor fd, PrintWriter pw, String[] args, boolean asProto) argument 247 dump(FileDescriptor fd, PrintWriter pw, String[] args, boolean asProto) argument [all...] |