Home
last modified time | relevance | path

Searched refs:mFile (Results 1 – 25 of 60) sorted by relevance

123

/frameworks/av/cmds/stagefright/
DWaveWriter.h27 : mFile(fopen(filename, "wb")), in WaveWriter()
29 fwrite("RIFFxxxxWAVEfmt \x10\x00\x00\x00\x01\x00", 1, 22, mFile); in WaveWriter()
35 fwrite("dataxxxx", 1, 8, mFile); in WaveWriter()
39 fseek(mFile, 40, SEEK_SET); in ~WaveWriter()
42 fseek(mFile, 4, SEEK_SET); in ~WaveWriter()
45 fclose(mFile); in ~WaveWriter()
46 mFile = NULL; in ~WaveWriter()
50 fwrite(data, 1, size, mFile); in Append()
56 fputc(x & 0xff, mFile); in write_u16()
57 fputc(x >> 8, mFile); in write_u16()
[all …]
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/model/
DMutexFileProvider.java42 private final File mFile; field in MutexFileProvider
53 mFile = file; in MutexFileProvider()
64 return mFile; in acquireFile()
69 mOnReleaseRequestCallback.onReleaseRequested(mFile); in acquireFile()
86 Log.i(LOG_TAG, "Acquired file: " + mFile + " by thread: " + mOwnerThread); in acquireFile()
89 return mFile; in acquireFile()
100 Log.i(LOG_TAG, "Released file: " + mFile + " from thread: " + mOwnerThread); in releaseFile()
/frameworks/base/core/tests/coretests/src/android/os/
DRedactingFileDescriptorTest.java46 private File mFile; field in RedactingFileDescriptorTest
51 mFile = File.createTempFile("redacting", "dat"); in setUp()
52 try (FileOutputStream out = new FileOutputStream(mFile)) { in setUp()
61 mFile.delete(); in tearDown()
66 final FileDescriptor fd = RedactingFileDescriptor.open(mContext, mFile, MODE_READ_ONLY, in testSingleByte()
82 final FileDescriptor fd = RedactingFileDescriptor.open(mContext, mFile, MODE_READ_ONLY, in testRanges()
104 final FileDescriptor fd = RedactingFileDescriptor.open(mContext, mFile, MODE_READ_ONLY, in testEntireFile()
117 final FileDescriptor fd = RedactingFileDescriptor.open(mContext, mFile, MODE_READ_WRITE, in testReadWrite()
174 final FileDescriptor fd = RedactingFileDescriptor.open(mContext, mFile, MODE_READ_WRITE, in testFreeAtStart()
186 final FileDescriptor fd = RedactingFileDescriptor.open(mContext, mFile, MODE_READ_WRITE, in testFreeAtOffset()
[all …]
/frameworks/base/services/backup/java/com/android/server/backup/
DDataChangedJournal.java52 private final File mFile; field in DataChangedJournal
58 mFile = Objects.requireNonNull(file); in DataChangedJournal()
69 try (RandomAccessFile out = new RandomAccessFile(mFile, "rws")) { in addPackage()
83 InputStream in = new FileInputStream(mFile); in forEach()
113 return mFile.delete(); in delete()
118 return mFile.hashCode(); in hashCode()
125 return mFile.equals(that.mFile); in equals()
132 return mFile.toString(); in toString()
/frameworks/base/services/core/java/com/android/server/location/settings/
DSettingsStore.java53 private final AtomicFile mFile; field in SettingsStore
61 mFile = new AtomicFile(file); in SettingsStore()
85 if (mFile.exists()) { in initializeCache()
86 try (DataInputStream is = new DataInputStream(mFile.openRead())) { in initializeCache()
90 Log.e(TAG, "error reading location settings (" + mFile in initializeCache()
142 mFile.delete();
152 os = mFile.startWrite();
156 mFile.finishWrite(os);
158 mFile.failWrite(os);
161 mFile.failWrite(os);
/frameworks/av/media/libstagefright/rtsp/
DUDPPusher.cpp33 : mFile(fopen(filename, "rb")), in UDPPusher()
36 CHECK(mFile != NULL); in UDPPusher()
58 fclose(mFile); in ~UDPPusher()
59 mFile = NULL; in ~UDPPusher()
64 CHECK_EQ(fread(&timeMs, 1, sizeof(timeMs), mFile), sizeof(timeMs)); in start()
73 if (fread(&length, 1, sizeof(length), mFile) < sizeof(length)) { in onPush()
83 if (fread(buffer->data(), 1, length, mFile) < length) { in onPush()
95 if (fread(&timeMs, 1, sizeof(timeMs), mFile) < sizeof(timeMs)) { in onPush()
/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/keys/
DTertiaryKeyRotationWindowedCountTest.java46 private File mFile; field in TertiaryKeyRotationWindowedCountTest
53 mFile = mTemporaryFolder.newFile(); in setUp()
54 mWindowedcount = new TertiaryKeyRotationWindowedCount(mFile, mClock); in setUp()
111 assertThat(new TertiaryKeyRotationWindowedCount(mFile, mClock).getCount()).isEqualTo(1); in record_persistsStateToDisk()
119 assertThat(mFile.length()).isEqualTo(TIMESTAMP_SIZE_IN_BYTES); in record_compactsFileToLast24Hours()
122 assertThat(mFile.length()).isEqualTo(2 * TIMESTAMP_SIZE_IN_BYTES); in record_compactsFileToLast24Hours()
125 assertThat(mFile.length()).isEqualTo(2 * TIMESTAMP_SIZE_IN_BYTES); in record_compactsFileToLast24Hours()
/frameworks/base/core/java/android/app/
DSharedPreferencesImpl.java82 private final File mFile; field in SharedPreferencesImpl
124 mFile = file; in SharedPreferencesImpl()
151 mFile.delete(); in loadFromDisk()
152 mBackupFile.renameTo(mFile); in loadFromDisk()
157 if (mFile.exists() && !mFile.canRead()) { in loadFromDisk()
158 Log.w(TAG, "Attempt to read preferences file " + mFile + " without permission"); in loadFromDisk()
165 stat = Os.stat(mFile.getPath()); in loadFromDisk()
166 if (mFile.canRead()) { in loadFromDisk()
170 new FileInputStream(mFile), 16 * 1024); in loadFromDisk()
173 Log.w(TAG, "Cannot read " + mFile.getAbsolutePath(), e); in loadFromDisk()
[all …]
/frameworks/base/tests/BlobStoreTestUtils/src/com/android/utils/blob/
DFakeBlobData.java42 private final File mFile; field in FakeBlobData
52 mFile = new File(builder.getContext().getFilesDir(), builder.getFileName()); in FakeBlobData()
125 try (RandomAccessFile file = new RandomAccessFile(mFile, "rw")) { in prepare()
128 mFileDigest = FileUtils.digest(mFile, "SHA-256"); in prepare()
146 mFile.delete(); in delete()
155 try (FileInputStream in = new FileInputStream(mFile)) { in writeToSession()
162 try (FileInputStream in = new FileInputStream(mFile)) { in writeToSession()
168 try (FileInputStream in = new FileInputStream(mFile)) { in writeToFd()
177 return ParcelFileDescriptor.open(mFile, ParcelFileDescriptor.MODE_READ_ONLY); in openForRead()
183 try (FileInputStream in = new FileInputStream(mFile)) { in readFromSessionAndVerifyBytes()
[all …]
/frameworks/av/services/audioflinger/
DBufLog.cpp141 mFile = fopen(logPath, "wb"); in BufLogStream()
142 if (mFile != NULL) { in BufLogStream()
143 ALOGV("Success creating file at: %p", mFile); in BufLogStream()
151 if (mFile != NULL) { in closeStream_l()
152 fclose(mFile); in closeStream_l()
153 mFile = NULL; in closeStream_l()
166 if (!mPaused && mFile != NULL) { in write()
172 bytes = fwrite(buf, 1, size, mFile); in write()
/frameworks/base/tests/FrameworkPerf/src/com/android/frameworkperf/
DTestService.java967 File mFile; field in TestService.CreateFileOp
974 mFile = context.getFileStreamPath(foreground ? "test-fg.file" : "test-bg.file"); in onInit()
975 mFile.delete(); in onInit()
980 mFile.createNewFile(); in onRun()
982 Log.w(TAG, "Failure creating " + mFile, e); in onRun()
984 mFile.delete(); in onRun()
990 File mFile; field in TestService.CreateWriteFileOp
997 mFile = context.getFileStreamPath(foreground ? "test-fg.file" : "test-bg.file"); in onInit()
998 mFile.delete(); in onInit()
1003 FileOutputStream fos = new FileOutputStream(mFile); in onRun()
[all …]
/frameworks/wilhelm/src/
Dlocks.cpp88 *(void **)&owner, ownerTid, thiz->mFile, thiz->mLine); in object_lock_exclusive_()
108 *(void **)&owner, ownerTid, thiz->mFile, thiz->mLine); in object_lock_exclusive_()
112 thiz, *(void **)&owner, ownerTid, thiz->mFile, thiz->mLine); in object_lock_exclusive_()
117 thiz->mFile = file; in object_lock_exclusive_()
138 assert(NULL != thiz->mFile); in object_unlock_exclusive_()
141 thiz->mFile = file; in object_unlock_exclusive_()
171 assert(NULL != thiz->mFile); in object_unlock_exclusive_attributes_()
238 thiz->mFile = file; in object_unlock_exclusive_attributes_()
292 assert(NULL != thiz->mFile); in object_cond_wait_()
295 thiz->mFile = file; in object_cond_wait_()
[all …]
/frameworks/base/services/backup/java/com/android/server/backup/utils/
DDataStreamFileCodec.java35 private final File mFile; field in DataStreamFileCodec
43 mFile = file; in DataStreamFileCodec()
55 FileInputStream fileInputStream = new FileInputStream(mFile); in deserialize()
70 FileOutputStream fileOutputStream = new FileOutputStream(mFile); in serialize()
/frameworks/layoutlib/bridge/tests/src/com/android/ide/common/resources/deprecated/
DResourceFile.java31 private final TestFileWrapper mFile; field in ResourceFile
35 mFile = file; in ResourceFile()
51 return mFile; in getFile()
75 return mFile.toString(); in toString()
/frameworks/base/services/tests/servicestests/src/com/android/server/backup/
DDataChangedJournalTest.java58 private File mFile; field in DataChangedJournalTest
64 mFile = mTemporaryFolder.newFile(); in setUp()
65 mJournal = new DataChangedJournal(mFile); in setUp()
74 FileInputStream fos = new FileInputStream(mFile); in addPackage_addsPackagesToEndOfFile()
88 assertThat(mFile.exists()).isFalse(); in delete_deletesTheFile()
93 assertEqualsBothWaysAndHashCode(mJournal, new DataChangedJournal(mFile)); in equals_isTrueForTheSameFile()
150 assertThat(mJournal.toString()).isEqualTo(mFile.toString()); in toString_isSameAsFileToString()
/frameworks/base/services/core/java/com/android/server/
DSystemUpdateManagerService.java74 private final AtomicFile mFile; field in SystemUpdateManagerService
81 mFile = new AtomicFile(new File(Environment.getDataSystemDirectory(), INFO_FILE)); in SystemUpdateManagerService()
134 try (FileInputStream fis = mFile.openRead()) { in loadSystemUpdateInfoLocked()
138 Slog.i(TAG, "No existing info file " + mFile.getBaseFile()); in loadSystemUpdateInfoLocked()
218 fos = mFile.startWrite(); in writeInfoFileLocked()
228 mFile.finishWrite(fos); in writeInfoFileLocked()
233 mFile.failWrite(fos); in writeInfoFileLocked()
240 if (mFile.exists()) { in removeInfoFileAndGetDefaultInfoBundleLocked()
242 mFile.delete(); in removeInfoFileAndGetDefaultInfoBundleLocked()
/frameworks/base/packages/BackupEncryption/src/com/android/server/backup/encryption/keys/
DTertiaryKeyRotationWindowedCount.java52 private final File mFile; field in TertiaryKeyRotationWindowedCount
64 mFile = file; in TertiaryKeyRotationWindowedCount()
108 if (!mFile.exists()) { in loadFromFile()
111 try (FileInputStream fis = new FileInputStream(mFile); in loadFromFile()
125 try (FileOutputStream fos = new FileOutputStream(mFile); in saveToFile()
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DWindowTracingTest.java81 private File mFile; field in WindowTracingTest
88 mFile = testContext.getFileStreamPath("tracing_test.dat"); in setUp()
89 mFile.delete(); in setUp()
91 mWindowTracing = new WindowTracing(mFile, mWmMock, mChoreographer, in setUp()
97 mFile.delete(); in tearDown()
136 assertTrue("Trace file should exist", mFile.exists()); in traceFile_startsWithMagicHeader()
139 try (InputStream is = new FileInputStream(mFile)) { in traceFile_startsWithMagicHeader()
161 try (InputStream is = new FileInputStream(mFile)) { in tracing_endsUpInFile()
/frameworks/base/services/core/java/com/android/server/biometrics/sensors/
DBiometricUserState.java59 protected final File mFile; field in BiometricUserState
84 AtomicFile destination = new AtomicFile(mFile); in doWriteStateInternal()
107 throw new IllegalStateException("Failed to write to file: " + mFile.toString(), t); in doWriteStateInternal()
121 mFile = getFileForUser(userId, fileName); in BiometricUserState()
215 if (!mFile.exists()) { in readStateSyncLocked()
219 in = new FileInputStream(mFile); in readStateSyncLocked()
230 + mFile , e); in readStateSyncLocked()
/frameworks/base/tools/aapt/
DOutputSet.h31 : mPath(path), mFile(file) {} in OutputEntry()
34 return mFile; in getFile()
46 android::sp<const AaptFile> mFile; variable
/frameworks/base/core/java/com/android/internal/os/
DKernelCpuProcStringReader.java91 private final Path mFile; field in KernelCpuProcStringReader
100 mFile = Paths.get(file); in KernelCpuProcStringReader()
154 try (BufferedReader r = Files.newBufferedReader(mFile)) { in open()
164 Slog.e(TAG, "Proc file too large: " + mFile); in open()
177 Slog.w(TAG, "File not found. It's normal if not implemented: " + mFile); in open()
180 Slog.e(TAG, "Error reading " + mFile, e); in open()
/frameworks/base/media/jni/
Dandroid_media_Streams.cpp33 mFile = fdopen(fd, "r"); in FileStream()
34 if (mFile == NULL) { in FileStream()
41 mFile = fopen(filename.string(), "r"); in FileStream()
42 if (mFile == NULL) { in FileStream()
48 if (mFile != NULL) { in ~FileStream()
49 fclose(mFile); in ~FileStream()
50 mFile = NULL; in ~FileStream()
56 if (mFile == NULL) { in GetData()
62 fseek(mFile, offset, SEEK_SET); in GetData()
66 size_t size = fread((void*)data, sizeof(std::uint8_t), length, mFile); in GetData()
[all …]
/frameworks/base/core/java/android/content/pm/
DPackagePartitions.java223 private File mFile; field in PackagePartitions.DeferredCanonicalFile
226 mFile = dir; in DeferredCanonicalFile()
230 mFile = new File(dir, fileName); in DeferredCanonicalFile()
236 mFile = canonicalize(mFile); in getFile()
239 return mFile; in getFile()
/frameworks/base/core/tests/coretests/src/android/app/backup/
DBackupDataTest.java51 private File mFile; field in BackupDataTest
74 mFile = new File(mDirectory, "backup_mixed_sinlge.dat"); in testSingle()
93 mFile = new File(mDirectory, "backup_multiple_test.dat"); in testMultiple()
114 mFile = new File(mDirectory, "backup_delete_test.dat"); in testDelete()
135 mFile = new File(mDirectory, "backup_mixed_test.dat"); in testMixed()
223 mFile = new File(mDirectory, destination); in copyAssetToFile()
234 mDataFile = ParcelFileDescriptor.open(mFile, in openForWriting()
241 mDataFile = ParcelFileDescriptor.open(mFile, in openForReading()
/frameworks/base/tests/Internal/src/com/android/internal/protolog/
DProtoLogImplTest.java77 private File mFile; field in ProtoLogImplTest
86 mFile = testContext.getFileStreamPath("tracing_test.dat"); in setUp()
88 mFile.delete(); in setUp()
89 mProtoLog = new ProtoLogImpl(mFile, 1024 * 1024, mReader); in setUp()
94 if (mFile != null) { in tearDown()
96 mFile.delete(); in tearDown()
124 assertTrue("Log file should exist", mFile.exists()); in logFile_startsWithMagicHeader()
127 try (InputStream is = new FileInputStream(mFile)) { in logFile_startsWithMagicHeader()
349 try (InputStream is = new FileInputStream(mFile)) { in log_protoEnabled()
374 try (InputStream is = new FileInputStream(mFile)) { in log_invalidParamsMask()
[all …]

123