use of com.android.internal.os.BatteryStatsHelper in project android_packages_apps_Settings by SudaMod.
the class BatteryInfo method getBatteryInfo.
public static void getBatteryInfo(final Context context, final Callback callback, boolean shortString) {
final long startTime = System.currentTimeMillis();
BatteryStatsHelper statsHelper = new BatteryStatsHelper(context, true);
statsHelper.create((Bundle) null);
BatteryUtils.logRuntime(LOG_TAG, "time to make batteryStatsHelper", startTime);
BatteryInfo.getBatteryInfo(context, callback, statsHelper, shortString);
}
use of com.android.internal.os.BatteryStatsHelper in project android_packages_apps_Settings by SudaMod.
the class AnomalyLoader method loadInBackground.
@Override
public List<Anomaly> loadInBackground() {
if (USE_FAKE_DATA) {
return generateFakeData();
}
if (mBatteryStatsHelper == null) {
mBatteryStatsHelper = new BatteryStatsHelper(getContext());
mBatteryStatsHelper.create((Bundle) null);
mBatteryStatsHelper.refreshStats(BatteryStats.STATS_SINCE_CHARGED, mUserManager.getUserProfiles());
}
return mAnomalyUtils.detectAnomalies(mBatteryStatsHelper, mPolicy, mPackageName);
}
use of com.android.internal.os.BatteryStatsHelper in project android_packages_apps_Settings by DirtyUnicorns.
the class BatteryInfo method getBatteryInfo.
public static void getBatteryInfo(final Context context, final Callback callback, boolean shortString) {
final long startTime = System.currentTimeMillis();
BatteryStatsHelper statsHelper = new BatteryStatsHelper(context, true);
statsHelper.create((Bundle) null);
BatteryUtils.logRuntime(LOG_TAG, "time to make batteryStatsHelper", startTime);
BatteryInfo.getBatteryInfo(context, callback, statsHelper, shortString);
}
use of com.android.internal.os.BatteryStatsHelper in project platform_packages_apps_Settings by BlissRoms.
the class BatteryStatsHelperLoader method loadInBackground.
@Override
public BatteryStatsHelper loadInBackground() {
Context context = getContext();
final BatteryStatsHelper statsHelper = new BatteryStatsHelper(context, true);
mBatteryUtils.initBatteryStatsHelper(statsHelper, null, /* bundle */
mUserManager);
return statsHelper;
}
use of com.android.internal.os.BatteryStatsHelper in project android_packages_apps_Settings by SudaMod.
the class BatteryStatsHelperLoader method loadInBackground.
@Override
public BatteryStatsHelper loadInBackground() {
Context context = getContext();
final BatteryStatsHelper statsHelper = new BatteryStatsHelper(context, true);
mBatteryUtils.initBatteryStatsHelper(statsHelper, null, /* bundle */
mUserManager);
return statsHelper;
}
Aggregations