Merge "Don't check battery usage in excessive bg anomaly" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
27f1e8e1e9
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user