Don't check battery usage in excessive bg anomaly

We don't need it anymore because we don't auto restrict this
anomaly.

Bug: 79210436
Test: robo test still pass
Change-Id: I186213a57f9bf54a0e19985f2c92169c6dc0571c
This commit is contained in:
Lei Yu
2018-05-08 16:26:35 -07:00
parent 99902e1faf
commit 06efc034e6
3 changed files with 1 additions and 47 deletions

View File

@@ -136,7 +136,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 {
@@ -151,9 +150,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;
}