Home
last modified time | relevance | path

Searched refs:stat (Results 1 – 25 of 148) sorted by relevance

123456

/frameworks/native/libs/binder/ndk/tests/
Diface.cpp47 binder_status_t stat = STATUS_FAILED_TRANSACTION; in IFoo_Class_onTransact() local
56 stat = AParcel_readInt32(in, &valueIn); in IFoo_Class_onTransact()
57 if (stat != STATUS_OK) break; in IFoo_Class_onTransact()
58 stat = foo->doubleNumber(valueIn, &valueOut); in IFoo_Class_onTransact()
59 if (stat != STATUS_OK) break; in IFoo_Class_onTransact()
60 stat = AParcel_writeInt32(out, valueOut); in IFoo_Class_onTransact()
64 stat = foo->die(); in IFoo_Class_onTransact()
69 return stat; in IFoo_Class_onTransact()
81 binder_status_t stat = STATUS_OK; in doubleNumber() local
84 stat = AIBinder_prepareTransaction(mBinder, &parcelIn); in doubleNumber()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/am/
DMemoryStatUtilTest.java253 MemoryStat stat = parseMemoryStatFromMemcg(MEMORY_STAT_CONTENTS); in testParseMemoryStatFromMemcg_parsesCorrectValues() local
254 assertEquals(1, stat.pgfault); in testParseMemoryStatFromMemcg_parsesCorrectValues()
255 assertEquals(2, stat.pgmajfault); in testParseMemoryStatFromMemcg_parsesCorrectValues()
256 assertEquals(3, stat.rssInBytes); in testParseMemoryStatFromMemcg_parsesCorrectValues()
257 assertEquals(4, stat.cacheInBytes); in testParseMemoryStatFromMemcg_parsesCorrectValues()
258 assertEquals(5, stat.swapInBytes); in testParseMemoryStatFromMemcg_parsesCorrectValues()
263 MemoryStat stat = parseMemoryStatFromMemcg(""); in testParseMemoryStatFromMemcg_emptyMemoryStatContents() local
264 assertNull(stat); in testParseMemoryStatFromMemcg_emptyMemoryStatContents()
266 stat = parseMemoryStatFromMemcg(null); in testParseMemoryStatFromMemcg_emptyMemoryStatContents()
267 assertNull(stat); in testParseMemoryStatFromMemcg_emptyMemoryStatContents()
[all …]
/frameworks/base/services/core/java/com/android/server/power/batterysaver/
DBatterySavingStats.java221 Stat stat = mStats.get(stateIndex); in getStat() local
222 if (stat == null) { in getStat()
223 stat = new Stat(); in getStat()
224 mStats.put(stateIndex, stat); in getStat()
226 return stat; in getStat()
313 final Stat stat = getStat(mCurrentState); in endLastStateLocked() local
315 stat.endBatteryLevel = batteryLevel; in endLastStateLocked()
316 stat.endBatteryPercent = batteryPercent; in endLastStateLocked()
317 stat.endTime = now; in endLastStateLocked()
319 final long deltaTime = stat.endTime - stat.startTime; in endLastStateLocked()
[all …]
/frameworks/base/services/core/java/com/android/server/storage/
DDiskStatsFileLogger.java127 PackageStats stat = entry.getValue(); in addAppsToJson() local
128 long appSize = stat.codeSize; in addAppsToJson()
129 long appDataSize = stat.dataSize; in addAppsToJson()
130 long cacheSize = stat.cacheSize; in addAppsToJson()
132 appSize += stat.externalCodeSize; in addAppsToJson()
133 appDataSize += stat.externalDataSize; in addAppsToJson()
134 cacheSize += stat.externalCacheSize; in addAppsToJson()
140 names.put(stat.packageName); in addAppsToJson()
161 for (PackageStats stat : mPackageStats) { in filterOnlyPrimaryUser()
162 if (stat.userHandle != UserHandle.USER_SYSTEM) { in filterOnlyPrimaryUser()
[all …]
/frameworks/av/media/mtp/
DMtpStorage.cpp63 struct statfs stat; in getMaxCapacity() local
64 if (statfs(getPath(), &stat)) in getMaxCapacity()
66 mMaxCapacity = (uint64_t)stat.f_blocks * (uint64_t)stat.f_bsize; in getMaxCapacity()
72 struct statfs stat; in getFreeSpace() local
73 if (statfs(getPath(), &stat)) in getFreeSpace()
75 return (uint64_t)stat.f_bavail * (uint64_t)stat.f_bsize; in getFreeSpace()
DMtpUtils.cpp171 struct stat sstat = {}; in copyFile()
172 if (stat(fromPath, &sstat) == -1) in copyFile()
232 struct stat statbuf; in deletePath()
234 if (stat(path, &statbuf) == 0) { in deletePath()
/frameworks/native/cmds/installd/tests/
Dinstalld_service_test.cpp88 struct stat buf; in stat_gid()
89 EXPECT_EQ(::stat(get_full_path(path).c_str(), &buf), 0); in stat_gid()
94 struct stat buf; in stat_mode()
95 EXPECT_EQ(::stat(get_full_path(path).c_str(), &buf), 0); in stat_mode()
252 struct stat sb; in mkdirs()
253 if (stat(path.c_str(), &sb) != -1 && S_ISDIR(sb.st_mode)) { in mkdirs()
326 struct stat buf; in TEST_F()
328 ASSERT_EQ(0, stat((rollback_ce_dir + "/com.foo").c_str(), &buf)); in TEST_F()
450 struct stat sb; in TEST_F()
451 ASSERT_EQ(-1, stat((rollback_ce_dir + "/com.foo").c_str(), &sb)); in TEST_F()
[all …]
/frameworks/base/cmds/incidentd/src/
Dreport_directory.cpp36 static bool stat_mtime_cmp(const std::pair<String8, struct stat>& a, in stat_mtime_cmp()
37 const std::pair<String8, struct stat>& b) { in stat_mtime_cmp()
44 struct stat st; in clean_directory()
46 std::vector<std::pair<String8, struct stat>> files; in clean_directory()
65 if (stat(filename.string(), &st) != 0) { in clean_directory()
72 files.push_back(std::pair<String8, struct stat>(filename, st)); in clean_directory()
89 for (std::vector<std::pair<String8, struct stat>>::iterator it = files.begin(); in clean_directory()
/frameworks/base/tests/LowStorageTest/src/com/android/lowstoragetest/
DLowStorageTest.java52 StatFs stat = new StatFs(path.getPath()); in onCreate() local
53 int totalBlocks = stat.getBlockCount(); in onCreate()
54 mBlockSize = (int) (stat.getBlockSize()); in onCreate()
80 StatFs stat = new StatFs(path.getPath()); in fillupdisk() local
81 int totalBlocks = stat.getBlockCount(); in fillupdisk()
82 int noOfBlockToFill = stat.getAvailableBlocks(); in fillupdisk()
122 StatFs stat = new StatFs(path.getPath()); in updateInfo() local
123 long availableBlocks = stat.getAvailableBlocks(); in updateInfo()
/frameworks/base/tools/aapt/
DFileFinder.cpp24 struct stat fileStat; in isDirectory()
25 if (stat(filename, &fileStat) == -1) { in isDirectory()
34 struct stat fileStat; in isFile()
35 if (stat(filename, &fileStat) == -1) { in isFile()
80 void SystemFileFinder::checkAndAddFile(const String8& path, const struct stat* stats, in checkAndAddFile()
DDirectoryWalker.h33 virtual struct stat* entryStats() = 0;
43 struct stat mStats;
81 stat(fullPath.string(),&mStats); in nextEntry()
85 virtual struct stat* entryStats() { in entryStats()
DCacheUpdater.h64 struct stat s; in ensureDirectoriesExist()
69 if (stat(path.string(),&s) == -1) { in ensureDirectoriesExist()
77 } while (stat(existsPath.string(),&s) == -1); in ensureDirectoriesExist()
/frameworks/base/libs/androidfw/
Dmisc.cpp38 struct stat sb; in getFileType()
40 if (stat(fileName, &sb) < 0) { in getFileType()
77 struct stat sb; in getFileModDate()
79 if (stat(fileName, &sb) < 0) in getFileModDate()
/frameworks/base/core/tests/coretests/src/android/widget/espresso/
DMouseClickAction.java47 Tapper.Status stat = sendSingleTap(uiController, coordinates, precision, in sendTap() local
50 if (stat == Tapper.Status.FAILURE) { in sendTap()
52 } else if (stat == Tapper.Status.WARNING) { in sendTap()
61 stat = sendSingleTap(uiController, coordinates, precision, inputDevice, in sendTap()
63 if (stat == Tapper.Status.FAILURE) { in sendTap()
65 } else if (stat == Tapper.Status.WARNING) { in sendTap()
/frameworks/base/core/jni/
Dfd_utils.cpp186 const struct stat stat; member in FileDescriptorInfo
197 FileDescriptorInfo(struct stat stat, const std::string& file_path, int fd, int open_flags,
216 struct stat f_stat; in CreateFromFd()
322 struct stat f_stat; in RefersToSameFile()
328 return f_stat.st_ino == stat.st_ino && f_stat.st_dev == stat.st_dev; in RefersToSameFile()
395 stat(), in FileDescriptorInfo()
403 FileDescriptorInfo::FileDescriptorInfo(struct stat stat, const std::string& file_path, in FileDescriptorInfo() argument
407 stat(stat), in FileDescriptorInfo()
/frameworks/base/core/java/android/app/
DSharedPreferencesImpl.java148 StructStat stat = null; in loadFromDisk() local
151 stat = Os.stat(mFile.getPath()); in loadFromDisk()
182 mStatTimestamp = stat.st_mtim; in loadFromDisk()
183 mStatSize = stat.st_size; in loadFromDisk()
224 final StructStat stat; in hasFileChangedUnexpectedly() local
231 stat = Os.stat(mFile.getPath()); in hasFileChangedUnexpectedly()
237 return !stat.st_mtim.equals(mStatTimestamp) || mStatSize != stat.st_size; in hasFileChangedUnexpectedly()
794 final StructStat stat = Os.stat(mFile.getPath()); in writeToFile() local
796 mStatTimestamp = stat.st_mtim; in writeToFile()
797 mStatSize = stat.st_size; in writeToFile()
/frameworks/base/core/java/android/net/
DTrafficStats.java495 private static long addIfSupported(long stat) { in addIfSupported() argument
496 return (stat == UNSUPPORTED) ? 0 : stat; in addIfSupported()
572 long stat = UNSUPPORTED; in getMobileTcpRxPackets() local
574 stat = getStatsService().getIfaceStats(iface, TYPE_TCP_RX_PACKETS); in getMobileTcpRxPackets()
578 total += addIfSupported(stat); in getMobileTcpRxPackets()
588 long stat = UNSUPPORTED; in getMobileTcpTxPackets() local
590 stat = getStatsService().getIfaceStats(iface, TYPE_TCP_TX_PACKETS); in getMobileTcpTxPackets()
594 total += addIfSupported(stat); in getMobileTcpTxPackets()
/frameworks/base/services/voiceinteraction/java/com/android/server/soundtrigger/
DSoundTriggerService.java129 SoundModelStat stat = mModelStats.get(id); in onStart() local
130 if (stat == null) { in onStart()
131 stat = new SoundModelStat(); in onStart()
132 mModelStats.put(id, stat); in onStart()
135 if (stat.mIsStarted) { in onStart()
140 stat.mStartCount++; in onStart()
141 stat.mLastStartTimestampMsec = SystemClock.elapsedRealtime(); in onStart()
142 stat.mIsStarted = true; in onStart()
146 SoundModelStat stat = mModelStats.get(id); in onStop() local
147 if (stat == null) { in onStop()
[all …]
/frameworks/base/core/java/com/android/internal/os/
DBinderCallsStats.java290 for (CallStat stat : entry.getCallStatsList()) { in getExportedCallStats()
293 exported.callingUid = stat.callingUid; in getExportedCallStats()
294 exported.className = stat.binderClass.getName(); in getExportedCallStats()
295 exported.binderClass = stat.binderClass; in getExportedCallStats()
296 exported.transactionCode = stat.transactionCode; in getExportedCallStats()
297 exported.screenInteractive = stat.screenInteractive; in getExportedCallStats()
298 exported.cpuTimeMicros = stat.cpuTimeMicros; in getExportedCallStats()
299 exported.maxCpuTimeMicros = stat.maxCpuTimeMicros; in getExportedCallStats()
300 exported.latencyMicros = stat.latencyMicros; in getExportedCallStats()
301 exported.maxLatencyMicros = stat.maxLatencyMicros; in getExportedCallStats()
[all …]
/frameworks/native/libs/vr/libpdx_default_transport/
Dpdx_tool.cpp98 typedef int (*CallbackType)(const char* path, const struct stat* sb,
101 int ReloadCommandCallback(const char* path, const struct stat* sb,
103 int DumpCommandCallback(const char* path, const struct stat* sb, int type_flag,
158 int ReloadCommandCallback(const char* path, const struct stat*, int type_flag, in ReloadCommandCallback() argument
165 int DumpCommandCallback(const char* path, const struct stat*, int type_flag, in DumpCommandCallback() argument
/frameworks/native/libs/diskusage/
Ddirsize.c25 int64_t stat_size(struct stat *s) in stat_size()
33 struct stat s; in calculate_dir_size()
/frameworks/base/services/core/jni/
Dcom_android_server_am_AppCompactor.cpp60 struct stat status_info; in com_android_server_am_AppCompactor_compactSystem()
62 if (stat(status_name.c_str(), &status_info) != 0) { in com_android_server_am_AppCompactor_compactSystem()
/frameworks/compile/libbcc/bcinfo/Wrap/
Dfile_wrapper_input.cpp49 struct stat st; in Size()
50 if (stat(_name, &st) == 0) { in Size()
/frameworks/av/media/libmedia/
DMediaScanner.cpp175 struct stat statbuf; in doProcessDirectoryEntry()
195 if (stat(path, &statbuf) == 0) { in doProcessDirectoryEntry()
213 if (stat(path, &statbuf) == 0) { in doProcessDirectoryEntry()
229 stat(path, &statbuf); in doProcessDirectoryEntry()
/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DBinderCallsStatsTest.java515 BinderCallsStats.ExportedCallStat stat = bcs.getExportedCallStats().get(0); in testGetExportedStatsWhenDetailedTrackingEnabled() local
516 assertEquals(WORKSOURCE_UID, stat.workSourceUid); in testGetExportedStatsWhenDetailedTrackingEnabled()
517 assertEquals(CALLING_UID, stat.callingUid); in testGetExportedStatsWhenDetailedTrackingEnabled()
518 assertEquals("android.os.Binder", stat.className); in testGetExportedStatsWhenDetailedTrackingEnabled()
519 assertEquals("1", stat.methodName); in testGetExportedStatsWhenDetailedTrackingEnabled()
520 assertEquals(true, stat.screenInteractive); in testGetExportedStatsWhenDetailedTrackingEnabled()
521 assertEquals(10, stat.cpuTimeMicros); in testGetExportedStatsWhenDetailedTrackingEnabled()
522 assertEquals(10, stat.maxCpuTimeMicros); in testGetExportedStatsWhenDetailedTrackingEnabled()
523 assertEquals(20, stat.latencyMicros); in testGetExportedStatsWhenDetailedTrackingEnabled()
524 assertEquals(20, stat.maxLatencyMicros); in testGetExportedStatsWhenDetailedTrackingEnabled()
[all …]

123456