Lines Matching refs:intervalType
238 private <T> List<T> queryStats(int intervalType, final long beginTime, final long endTime,
240 if (intervalType == UsageStatsManager.INTERVAL_BEST) {
241 intervalType = mDatabase.findBestFitBucket(beginTime, endTime);
242 if (intervalType < 0) {
245 intervalType = UsageStatsManager.INTERVAL_DAILY;
249 if (intervalType < 0 || intervalType >= mCurrentStats.length) {
251 Slog.d(TAG, mLogPrefix + "Bad intervalType used " + intervalType);
256 final IntervalStats currentStats = mCurrentStats[intervalType];
259 Slog.d(TAG, mLogPrefix + "SELECT * FROM " + intervalType + " WHERE beginTime >= "
278 List<T> results = mDatabase.queryUsageStats(intervalType, beginTime,
429 for (int intervalType = 0; intervalType < mCurrentStats.length; intervalType++) {
430 final IntervalStats stats = mDatabase.getLatestUsageStats(intervalType);
432 currentTimeMillis < stats.beginTime + INTERVAL_LENGTH[intervalType]) {
436 ") for interval " + intervalType);
438 mCurrentStats[intervalType] = stats;
444 currentTimeMillis + ") for interval " + intervalType);
447 mCurrentStats[intervalType] = new IntervalStats();
448 mCurrentStats[intervalType].beginTime = currentTimeMillis;
449 mCurrentStats[intervalType].endTime = currentTimeMillis + 1;