Home
last modified time | relevance | path

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

1234

/packages/modules/NetworkStack/src/com/android/networkstack/netlink/
DTcpSocketTracker.java201 final TcpStat stat = new TcpStat(); in pollSocketsInfo() local
248 stat.accumulate( in pollSocketsInfo()
260 mSentSinceLastRecv = (stat.receivedCount == 0) in pollSocketsInfo()
261 ? (mSentSinceLastRecv + stat.sentCount) : 0; in pollSocketsInfo()
262 mLatestReceivedCount = stat.receivedCount; in pollSocketsInfo()
263 mLatestPacketFailPercentage = ((stat.sentCount != 0) in pollSocketsInfo()
264 ? ((stat.retransmitCount + stat.lostCount) * 100 / stat.sentCount) : 0); in pollSocketsInfo()
335 final TcpStat stat = new TcpStat(); in calculateLatestPacketsStat() local
346 stat.sentCount = current.tcpInfo.mSegsOut; in calculateLatestPacketsStat()
347 stat.receivedCount = current.tcpInfo.mSegsIn; in calculateLatestPacketsStat()
[all …]
/packages/modules/adb/sysdeps/
Dstat_test.cpp25 TEST(sysdeps, stat) { in TEST() argument
29 struct stat st; in TEST()
30 ASSERT_EQ(0, stat(td.path, &st)); in TEST()
34 ASSERT_EQ(0, stat((std::string(td.path) + '/').c_str(), &st)); in TEST()
38 ASSERT_EQ(0, stat((std::string(td.path) + '\\').c_str(), &st)); in TEST()
43 ASSERT_EQ(-1, stat(nonexistent_path.c_str(), &st)); in TEST()
46 ASSERT_EQ(-1, stat((nonexistent_path + "/").c_str(), &st)); in TEST()
50 ASSERT_EQ(-1, stat((nonexistent_path + "\\").c_str(), &st)); in TEST()
54 ASSERT_EQ(0, stat(tf.path, &st)); in TEST()
58 ASSERT_EQ(-1, stat((std::string(tf.path) + '/').c_str(), &st)); in TEST()
[all …]
Dstat.h38 struct adb_stat : public stat {};
40 #undef stat
41 #define stat adb_stat macro
/packages/providers/DownloadProvider/src/com/android/providers/downloads/
DStorageUtils.java61 if (uid == -1 || file.stat.st_uid == uid) { in listFilesRecursive()
78 public final StructStat stat; field in StorageUtils.ConcreteFile
82 this.stat = Os.lstat(file.getAbsolutePath()); in ConcreteFile()
88 result = 31 * result + (int) (stat.st_dev ^ (stat.st_dev >>> 32)); in hashCode()
89 result = 31 * result + (int) (stat.st_ino ^ (stat.st_ino >>> 32)); in hashCode()
97 return (f.stat.st_dev == stat.st_dev) && (f.stat.st_ino == stat.st_ino); in equals()
/packages/apps/LegacyCamera/jni/feature_stab/db_vlvm/
Ddb_rob_image_homography.cpp74 …oint_count,double *x_i,double *xp_i,double one_over_scale2,db_Statistics *stat,double thresh=DB_OU… in db_RobImageHomography_Statistics() argument
90 if(stat) in db_RobImageHomography_Statistics()
92 stat->nr_points=point_count; in db_RobImageHomography_Statistics()
93 stat->one_over_scale2=one_over_scale2; in db_RobImageHomography_Statistics()
94 stat->nr_inliers=i; in db_RobImageHomography_Statistics()
95 stat->inlier_fraction=frac; in db_RobImageHomography_Statistics()
97 stat->cost=db_RobImageHomography_Cost(H,point_count,x_i,xp_i,one_over_scale2); in db_RobImageHomography_Statistics()
98 stat->model_dimension=0; in db_RobImageHomography_Statistics()
101 stat->lambda1=log(4.0); in db_RobImageHomography_Statistics()
102 stat->lambda2=log(4.0*((double)db_maxi(1,stat->nr_points))); in db_RobImageHomography_Statistics()
[all …]
/packages/apps/Nfc/nci/jni/
DIntervalTimer.cpp44 int stat = 0; in set() local
52 stat = timer_settime(mTimerId, 0, &ts, 0); in set()
53 if (stat == -1) LOG(ERROR) << StringPrintf("fail set timer"); in set()
54 return stat == 0; in set()
69 int stat = 0; in create() local
81 stat = timer_create(CLOCK_MONOTONIC, &se, &mTimerId); in create()
82 if (stat == -1) LOG(ERROR) << StringPrintf("fail create timer"); in create()
83 return stat == 0; in create()
DNativeLlcpSocket.cpp48 bool stat = PeerToPeer::getInstance().connectConnOriented(jniHandle, nSap); in nativeLlcpSocket_doConnect() local
51 return stat ? JNI_TRUE : JNI_FALSE; in nativeLlcpSocket_doConnect()
76 bool stat = PeerToPeer::getInstance().connectConnOriented( in nativeLlcpSocket_doConnectBy() local
80 return stat ? JNI_TRUE : JNI_FALSE; in nativeLlcpSocket_doConnectBy()
99 bool stat = PeerToPeer::getInstance().disconnectConnOriented(jniHandle); in nativeLlcpSocket_doClose() local
102 return stat ? JNI_TRUE : JNI_FALSE; in nativeLlcpSocket_doClose()
126 bool stat = PeerToPeer::getInstance().send(jniHandle, raw_ptr, bytes.size()); in nativeLlcpSocket_doSend() local
129 return stat ? JNI_TRUE : JNI_FALSE; in nativeLlcpSocket_doSend()
153 bool stat = PeerToPeer::getInstance().receive( in nativeLlcpSocket_doReceive() local
158 if (stat && (actualLen > 0)) { in nativeLlcpSocket_doReceive()
DPowerSwitch.cpp279 tNFA_STATUS stat = NFA_STATUS_FAILED; in setPowerOffSleepState() local
291 stat = NFA_PowerOffSleepMode(TRUE); in setPowerOffSleepState()
292 if (stat == NFA_STATUS_OK) { in setPowerOffSleepState()
296 LOG(ERROR) << StringPrintf("%s: API fail; stat=0x%X", fn, stat); in setPowerOffSleepState()
317 stat = NFA_PowerOffSleepMode(FALSE); in setPowerOffSleepState()
318 if (stat == NFA_STATUS_OK) { in setPowerOffSleepState()
330 LOG(ERROR) << StringPrintf("%s: API fail; stat=0x%X", fn, stat); in setPowerOffSleepState()
DNativeLlcpServiceSocket.cpp55 bool stat = false; in nativeLlcpServiceSocket_doAccept() local
63 stat = PeerToPeer::getInstance().accept(serverHandle, connHandle, miu, rw); in nativeLlcpServiceSocket_doAccept()
65 if (!stat) { in nativeLlcpServiceSocket_doAccept()
116 bool stat = false; in nativeLlcpServiceSocket_doClose() local
120 stat = PeerToPeer::getInstance().deregisterServer(jniServerHandle); in nativeLlcpServiceSocket_doClose()
DNativeNfcManager.cpp1146 tNFA_STATUS stat = NFA_STATUS_OK; in nfcManager_doInitialize() local
1170 stat = NFA_Enable(nfaDeviceManagementCallback, nfaConnectionCallback); in nfcManager_doInitialize()
1171 if (stat == NFA_STATUS_OK) { in nfcManager_doInitialize()
1177 if (stat == NFA_STATUS_OK) { in nfcManager_doInitialize()
1220 stat = NFA_GetConfig(1, configParam); in nfcManager_doInitialize()
1221 if (stat == NFA_STATUS_OK) { in nfcManager_doInitialize()
1241 stat); in nfcManager_doInitialize()
1245 stat = NFA_Disable(FALSE /* ungraceful */); in nfcManager_doInitialize()
1575 tNFA_STATUS stat = NFA_Disable(TRUE /* graceful */); in nfcManager_doDeinitialize() local
1576 if (stat == NFA_STATUS_OK) { in nfcManager_doDeinitialize()
[all …]
DPeerToPeer.cpp617 bool stat = createDataLinkConn(jniHandle, serviceName, 0); in connectConnOriented() local
619 << StringPrintf("%s: exit; h: %u stat: %u", fn, jniHandle, stat); in connectConnOriented()
620 return stat; in connectConnOriented()
639 bool stat = createDataLinkConn(jniHandle, NULL, destinationSap); in connectConnOriented() local
641 << StringPrintf("%s: exit; h: %u stat: %u", fn, jniHandle, stat); in connectConnOriented()
642 return stat; in connectConnOriented()
912 tNFA_STATUS stat = NFA_STATUS_FAILED; in receive() local
929 stat = NFA_P2pReadData(pConn->mNfaConnHandle, bufferLen, &actualDataLen2, in receive()
931 if ((stat == NFA_STATUS_OK) && (actualDataLen2 > 0)) // received some data in receive()
1609 tNFA_STATUS stat = NFA_STATUS_OK; in registerWithStack() local
[all …]
DRouteDataSet.cpp247 int stat = 0; in saveToFile() local
265 stat = chmod(filename.c_str(), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); in saveToFile()
266 if (stat == -1) LOG(ERROR) << StringPrintf("%s: error during chmod", fn); in saveToFile()
456 int stat = remove(filename.c_str()); in deleteFile() local
458 << StringPrintf("%s: exit %u", fn, stat == 0); in deleteFile()
459 return stat == 0; in deleteFile()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/apps/
DRecentAppsPreferenceController.java155 final UsageStats stat = recentApps.get(i); in displayRecentApps() local
157 final String pkgName = stat.getPackageName(); in displayRecentApps()
174 if (stat.getLastTimeUsed() > System.currentTimeMillis()) { in displayRecentApps()
178 System.currentTimeMillis() - stat.getLastTimeUsed(), in displayRecentApps()
236 for (UsageStats stat : packageStats) { in getDisplayableRecentAppList()
238 stat.getPackageName(), mUserId); in getDisplayableRecentAppList()
242 recentApps.add(stat); in getDisplayableRecentAppList()
254 private boolean shouldIncludePkgInRecents(UsageStats stat) { in shouldIncludePkgInRecents() argument
255 final String pkgName = stat.getPackageName(); in shouldIncludePkgInRecents()
256 if (stat.getLastTimeUsed() < mCal.getTimeInMillis()) { in shouldIncludePkgInRecents()
/packages/services/Car/cpp/watchdog/server/src/
DIoPerfCollection.cpp162 for (const auto& stat : data.topNReads) { in toString() local
163 StringAppendF(&buffer, "%" PRIu32 ", %s", stat.userId, stat.packageName.c_str()); in toString()
165 StringAppendF(&buffer, ", %" PRIi64 ", %.2f%%, %" PRIi64 ", %.2f%%", stat.bytes[i], in toString()
166 percentage(stat.bytes[i], data.total[READ_BYTES][i]), stat.fsync[i], in toString()
167 percentage(stat.fsync[i], data.total[FSYNC_COUNT][i])); in toString()
178 for (const auto& stat : data.topNWrites) { in toString() local
179 StringAppendF(&buffer, "%" PRIu32 ", %s", stat.userId, stat.packageName.c_str()); in toString()
181 StringAppendF(&buffer, ", %" PRIi64 ", %.2f%%, %" PRIi64 ", %.2f%%", stat.bytes[i], in toString()
182 percentage(stat.bytes[i], data.total[WRITE_BYTES][i]), stat.fsync[i], in toString()
183 percentage(stat.fsync[i], data.total[FSYNC_COUNT][i])); in toString()
/packages/apps/Car/Settings/src/com/android/car/settings/applications/
DRecentAppsItemManager.java141 for (UsageStats stat : packageStats) { in loadDisplayableRecentApps()
143 stat.getPackageName(), mUserId); in loadDisplayableRecentApps()
147 mRecentApps.add(stat); in loadDisplayableRecentApps()
158 private boolean shouldIncludePkgInRecents(UsageStats stat) { in shouldIncludePkgInRecents() argument
159 String pkgName = stat.getPackageName(); in shouldIncludePkgInRecents()
160 if (stat.getLastTimeUsed() < mCalendar.getTimeInMillis()) { in shouldIncludePkgInRecents()
/packages/apps/Settings/src/com/android/settings/applications/
DRecentAppStatsMixin.java143 for (UsageStats stat : packageStats) { in loadDisplayableRecentApps()
145 stat.getPackageName(), mUserId); in loadDisplayableRecentApps()
149 mRecentApps.add(stat); in loadDisplayableRecentApps()
160 private boolean shouldIncludePkgInRecents(UsageStats stat) { in shouldIncludePkgInRecents() argument
161 final String pkgName = stat.getPackageName(); in shouldIncludePkgInRecents()
162 if (stat.getLastTimeUsed() < mCalendar.getTimeInMillis()) { in shouldIncludePkgInRecents()
/packages/modules/adb/client/
Dfile_sync_client.cpp467 bool FinishStat(struct stat* st) { in FinishStat()
628 struct stat st; in SendLargeFile()
629 if (stat(lpath.c_str(), &st) == -1) { in SendLargeFile()
730 struct stat st; in SendLargeFileLegacy()
731 if (stat(lpath.c_str(), &st) == -1) { in SendLargeFileLegacy()
989 static bool sync_stat(SyncConnection& sc, const std::string& path, struct stat* st) { in sync_stat()
993 static bool sync_lstat(SyncConnection& sc, const std::string& path, struct stat* st) { in sync_lstat()
997 static bool sync_stat_fallback(SyncConnection& sc, const std::string& path, struct stat* st) { in sync_stat_fallback()
1018 struct stat tmp_st; in sync_stat_fallback()
1034 struct stat st; in sync_send()
[all …]
Dincremental.cpp42 struct stat st; in read_signature()
43 if (stat(signature_file.c_str(), &st)) { in read_signature()
122 struct stat st; in start_install()
123 if (stat(file.c_str(), &st)) { in start_install()
155 struct stat st; in can_install()
156 if (stat(file.c_str(), &st)) { in can_install()
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
DCacheStorageUsageInfo.java63 StatFs stat = new StatFs(path); in loadStorageInfo() local
64 long blockSize = stat.getBlockSize(); in loadStorageInfo()
65 long availableBlocks = stat.getAvailableBlocks(); in loadStorageInfo()
66 long totalBlocks = stat.getBlockCount(); in loadStorageInfo()
/packages/services/Car/cpp/watchdog/server/tests/
DProcPidStatTest.cpp39 std::string toString(const PidStat& stat) { in toString() argument
43 stat.pid, stat.ppid, stat.comm.c_str(), stat.state.c_str(), in toString()
44 stat.majorFaults, stat.numThreads, stat.startTime); in toString()
/packages/modules/adb/
Dadb_utils.cpp77 struct stat sb; in directory_exists()
78 return stat(path.c_str(), &sb) != -1 && S_ISDIR(sb.st_mode); in directory_exists()
124 struct stat sb; in mkdirs()
125 if (stat(path.c_str(), &sb) != -1 && S_ISDIR(sb.st_mode)) { in mkdirs()
313 struct stat buf; in adb_get_android_dir_path()
314 if (stat(android_dir.c_str(), &buf) == -1) { in adb_get_android_dir_path()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/data/
DUnusedPackagesLiveData.kt93 for (stat in stats) { in <lambda>() constant
94 val userPackage = stat.packageName to user in <lambda>()
96 (now - stat.lastTimePackageUsed()) < unusedThreshold) { in <lambda>()
/packages/apps/Gallery2/src/com/android/gallery3d/ingest/data/
DImportTask.java114 StatFs stat = new StatFs(path); in hasSpaceForSize() local
115 return stat.getAvailableBlocks() * (long) stat.getBlockSize() > size; in hasSpaceForSize()
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/
DRecentAppStatsMixinTest.java190 final UsageStats stat = new UsageStats(); in loadDisplayableRecentApps_oneInstantAppSet_shouldHaveOneRecentApp() local
191 stat.mLastTimeUsed = System.currentTimeMillis() + 200; in loadDisplayableRecentApps_oneInstantAppSet_shouldHaveOneRecentApp()
192 stat.mPackageName = "com.foo.barinstant"; in loadDisplayableRecentApps_oneInstantAppSet_shouldHaveOneRecentApp()
193 stats.add(stat); in loadDisplayableRecentApps_oneInstantAppSet_shouldHaveOneRecentApp()
198 when(mAppState.getEntry(stat.mPackageName, UserHandle.myUserId())).thenReturn(statEntry); in loadDisplayableRecentApps_oneInstantAppSet_shouldHaveOneRecentApp()
/packages/providers/MediaProvider/jni/
DFuseDaemon.cpp797 struct stat s; in pf_getattr()
808 struct stat* attr, in pf_setattr()
1747 struct stat stat; in pf_access() local
1748 if (lstat(path.c_str(), &stat)) { in pf_access()
1757 bool is_directory = S_ISDIR(stat.st_mode); in pf_access()
2044 struct stat stat; in Start() local
2046 if (lstat(path.c_str(), &stat)) { in Start()
2051 if (!S_ISDIR(stat.st_mode)) { in Start()
2063 struct fuse fuse_default(path, stat.st_ino); in Start()
2123 struct stat s; in GetOriginalMediaFormatFilePath()
[all …]

1234