Searched refs:fd (Results 1 - 25 of 759) sorted by relevance

1234567891011>>

/frameworks/base/services/core/jni/
H A Dcom_android_server_UsbDeviceManager.cpp44 static void set_accessory_string(JNIEnv *env, int fd, int cmd, jobjectArray strArray, int index) argument
49 ioctl(fd, cmd, buffer);
61 int fd = open(DRIVER_NAME, O_RDWR); local
62 if (fd < 0) {
69 set_accessory_string(env, fd, ACCESSORY_GET_STRING_MANUFACTURER, strArray, 0);
70 set_accessory_string(env, fd, ACCESSORY_GET_STRING_MODEL, strArray, 1);
71 set_accessory_string(env, fd, ACCESSORY_GET_STRING_DESCRIPTION, strArray, 2);
72 set_accessory_string(env, fd, ACCESSORY_GET_STRING_VERSION, strArray, 3);
73 set_accessory_string(env, fd, ACCESSORY_GET_STRING_URI, strArray, 4);
74 set_accessory_string(env, fd, ACCESSORY_GET_STRING_SERIA
83 int fd = open(DRIVER_NAME, O_RDWR); local
99 int fd = open(DRIVER_NAME, O_RDWR); local
111 int fd = open(DRIVER_NAME, O_RDWR); local
[all...]
H A Dcom_android_server_PersistentDataBlockService.cpp35 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/libs/androidfw/
H A DObbFile.cpp88 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/core/java/android/net/
H A DLocalSocketImpl.java44 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/surfaceflinger/tests/waitforvsync/
H A Dwaitforvsync.cpp33 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/base/core/jni/
H A Dandroid_util_MemoryIntArray.cpp39 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 int ashmemSize = ashmem_get_size_region(fd);
71 void* ashmemAddr = mmap(NULL, ashmemSize, protMode, MAP_SHARED, fd, 0);
83 int setProtResult = ashmem_set_prot_region(fd, PROT_READ);
93 static void android_util_MemoryIntArray_close(JNIEnv* env, jobject clazz, jint fd, argument
123 android_util_MemoryIntArray_get(JNIEnv* env, jobject clazz, jint fd, jlong address, jint index, jboolean owner) argument
140 android_util_MemoryIntArray_set(JNIEnv* env, jobject clazz, jint fd, jlong address, jint index, jint newValue, jboolean owner) argument
157 android_util_MemoryIntArray_size(JNIEnv* env, jobject clazz, jint fd) argument
[all...]
H A Dandroid_os_MemoryFile.cpp49 int fd = jniGetFDFromFileDescriptor(env, fileDescriptor); local
50 void* result = mmap(NULL, length, prot, MAP_SHARED, fd, 0);
66 int fd = jniGetFDFromFileDescriptor(env, fileDescriptor); local
67 if (fd >= 0) {
69 close(fd);
77 int fd = jniGetFDFromFileDescriptor(env, fileDescriptor); local
78 if (unpinned && ashmem_pin_region(fd, 0, 0) == ASHMEM_WAS_PURGED) {
79 ashmem_unpin_region(fd, 0, 0);
87 ashmem_unpin_region(fd, 0, 0);
96 int fd local
113 int fd = jniGetFDFromFileDescriptor(env, fileDescriptor); local
122 int fd = jniGetFDFromFileDescriptor(env, fileDescriptor); local
[all...]
H A Dandroid_util_FileObserver.cpp49 static void android_os_fileobserver_observe(JNIEnv* env, jobject object, jint fd) argument
59 int num_bytes = read(fd, event_buf, sizeof(event_buf));
101 static jint android_os_fileobserver_startWatching(JNIEnv* env, jobject object, jint fd, jstring pathString, jint mask) argument
107 if (fd >= 0)
111 res = inotify_add_watch(fd, path, mask);
121 static void android_os_fileobserver_stopWatching(JNIEnv* env, jobject object, jint fd, jint wfd) argument
125 inotify_rm_watch((int)fd, (uint32_t)wfd);
/frameworks/native/libs/binder/
H A DMemoryHeapBase.cpp50 int fd = ashmem_create_region(name == NULL ? "MemoryHeapBase" : name, size); local
51 ALOGE_IF(fd<0, "error creating ashmem region: %s", strerror(errno));
52 if (fd >= 0) {
53 if (mapfd(fd, size) == NO_ERROR) {
55 ashmem_set_prot_region(fd, PROT_READ);
69 int fd = open(device, open_flags); local
70 ALOGE_IF(fd<0, "error opening %s: %s", device, strerror(errno));
71 if (fd >= 0) {
74 if (mapfd(fd, size) == NO_ERROR) {
80 MemoryHeapBase::MemoryHeapBase(int fd, size_ argument
89 init(int fd, void *base, int size, int flags, const char* device) argument
102 mapfd(int fd, size_t size, uint32_t offset) argument
141 int fd = android_atomic_or(-1, &mFD); local
[all...]
/frameworks/base/core/java/android/app/backup/
H A DFullBackupDataOutput.java22 public FullBackupDataOutput(ParcelFileDescriptor fd) { argument
23 mData = new BackupDataOutput(fd.getFileDescriptor());
/frameworks/base/core/java/com/android/server/
H A DNetworkManagementSocketTagger.java66 public void tag(FileDescriptor fd) throws SocketException { argument
69 Log.d(TAG, "tagSocket(" + fd.getInt$() + ") with statsTag=0x"
73 tagSocketFd(fd, options.statsTag, options.statsUid);
76 private void tagSocketFd(FileDescriptor fd, int tag, int uid) { argument
80 final int errno = native_tagSocketFd(fd, tag, uid);
82 Log.i(TAG, "tagSocketFd(" + fd.getInt$() + ", "
90 public void untag(FileDescriptor fd) throws SocketException { argument
92 Log.i(TAG, "untagSocket(" + fd.getInt$() + ")");
94 unTagSocketFd(fd);
97 private void unTagSocketFd(FileDescriptor fd) { argument
146 native_tagSocketFd(FileDescriptor fd, int tag, int uid) argument
147 native_untagSocketFd(FileDescriptor fd) argument
[all...]
/frameworks/base/cmds/idmap/
H A Dcreate.cpp35 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
171 create_and_write_idmap(const char *target_apk_path, const char *overlay_apk_path, int fd, bool check_if_stale) argument
206 int fd = open_idmap(idmap_path); local
219 idmap_create_fd(const char *target_apk_path, const char *overlay_apk_path, int fd) argument
[all...]
/frameworks/av/services/audiopolicy/common/managerdefinitions/src/
H A DAudioSourceDescriptor.cpp32 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);
H A DAudioCollections.cpp40 status_t AudioRouteVector::dump(int fd, int spaces) const argument
49 write(fd, buffer, strlen(buffer));
52 write(fd, buffer, strlen(buffer));
53 itemAt(i)->dump(fd, 4);
H A DVolumeCurve.cpp63 void VolumeCurve::dump(int fd) const
76 write(fd, result.string(), result.size());
79 void VolumeCurvesForStream::dump(int fd, int spaces = 0, bool curvePoints) const argument
94 write(fd, result.string(), result.size());
103 write(fd, buffer, strlen(buffer));
104 valueAt(i)->dump(fd);
107 write(fd, result.string(), result.size());
110 status_t VolumeCurvesCollection::dump(int fd) const
116 write(fd, buffer, strlen(buffer));
119 write(fd, buffe
[all...]
/frameworks/av/services/camera/libcameraservice/utils/
H A DCameraTraces.cpp67 status_t CameraTraces::dump(int fd, const Vector<String16> &args __attribute__((unused))) { argument
68 ALOGV("%s: fd = %d", __FUNCTION__, fd);
72 if (fd < 0) {
73 ALOGW("%s: Negative FD (%d)", __FUNCTION__, fd);
77 dprintf(fd, "Camera traces (%zu):\n", pcsList.size());
80 dprintf(fd, " No camera traces collected.\n");
87 pcs.dump(fd, DUMP_INDENT);
/frameworks/av/services/audioflinger/
H A DFastCaptureDumpState.cpp36 void FastCaptureDumpState::dump(int fd) const
39 dprintf(fd, " FastCapture not initialized\n");
45 dprintf(fd, " FastCapture command=%s readSequence=%u framesRead=%u\n"
/frameworks/base/graphics/tests/graphicstests/src/android/graphics/
H A DBitmapFactoryTest.java38 FileDescriptor fd = pfd.getFileDescriptor();
39 assertNotNull("Got null FileDescriptor", fd);
40 assertTrue("Got invalid FileDescriptor", fd.valid());
41 Bitmap bitmap = BitmapFactory.decodeFileDescriptor(fd);
/frameworks/minikin/tests/
H A DICUTestBase.h33 int fd = open(fn, O_RDONLY); variable
34 ASSERT_NE(-1, fd);
36 ASSERT_EQ(0, fstat(fd, &sb));
37 void* data = mmap(NULL, sb.st_size, PROT_READ, MAP_SHARED, fd, 0);
/frameworks/av/drm/common/
H A DReadWriteUtils.cpp41 int fd = fileno(file); local
44 if (fstat(fd, &sb) == 0 && sb.st_size > 0) {
47 if (length == read(fd, (void*) bytes, length)) {
63 int fd = fileno(file); local
66 if (fstat(fd, &sb) == 0 && sb.st_size > 0) {
69 if (length != read(fd, (void*) *buffer, length)) {
83 int fd = fileno(file); local
86 if (FAILURE != ftruncate(fd, size)) {
87 if (size != write(fd, data.string(), size)) {
100 int fd local
[all...]
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/util/
H A DBitmapSerializeUtils.java57 private static native void nativeReadBitmapPixels(Bitmap bitmap, int fd); argument
59 private static native void nativeWriteBitmapPixels(Bitmap bitmap, int fd); argument
/frameworks/support/v4/honeycomb/android/support/v4/app/
H A DActivityCompatHoneycomb.java32 static void dump(Activity activity, String prefix, FileDescriptor fd, argument
34 activity.dump(prefix, fd, writer, args);
/frameworks/base/tools/obbtool/
H A Dpbkdf2gen.cpp44 int fd = open("/dev/urandom", O_RDONLY); local
45 if (fd < 0) {
47 close(fd);
53 if (read(fd, &salt, SALT_LEN) != SALT_LEN) {
55 close(fd);
58 close(fd);
/frameworks/base/media/java/android/media/
H A DMediaMetadataRetriever.java68 FileDescriptor fd = is.getFD();
69 setDataSource(fd, 0, 0x7ffffffffffffffL);
114 * @param fd the FileDescriptor for the file you want to play
121 public native void setDataSource(FileDescriptor fd, long offset, long length) argument
130 * @param fd the FileDescriptor for the file you want to play
133 public void setDataSource(FileDescriptor fd) argument
136 setDataSource(fd, 0, 0x7ffffffffffffffL);
161 AssetFileDescriptor fd = null;
165 fd = resolver.openAssetFileDescriptor(uri, "r");
169 if (fd
[all...]
/frameworks/base/libs/androidfw/tests/
H A DBackupData_test.cpp60 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...]

Completed in 1579 milliseconds

1234567891011>>