Merge "Don't check battery usage in excessive bg anomaly" into pi-dev

This commit is contained in:
android-build-team Robot
2018-05-09 17:54:30 +00:00
committed by Android (Google) Code Review
3 changed files with 1 additions and 47 deletions

View File

@@ -143,7 +143,6 @@ public class AnomalyDetectionJobService extends JobService {
StatsManager.EXTRA_STATS_BROADCAST_SUBSCRIBER_COOKIES);
final AnomalyInfo anomalyInfo = new AnomalyInfo(
!ArrayUtils.isEmpty(cookies) ? cookies.get(0) : "");
final PackageManager packageManager = context.getPackageManager();
Log.i(TAG, "Extra stats value: " + intentDimsValue.toString());
try {
@@ -158,9 +157,7 @@ public class AnomalyDetectionJobService extends JobService {
final boolean anomalyDetected;
if (isExcessiveBackgroundAnomaly(anomalyInfo)) {
anomalyDetected = batteryUtils.isPreOApp(packageName)
&& batteryUtils.isAppHeavilyUsed(batteryStatsHelper, userManager, uid,
policy.excessiveBgDrainPercentage);
anomalyDetected = batteryUtils.isPreOApp(packageName);
} else {
anomalyDetected = true;
}