Update the anomaly type constants

Bug: 77323601
Test: Build
Change-Id: I0b6733edbfe12f494104f78be7087fa621191431
This commit is contained in:
Lei Yu
2018-04-04 18:06:16 -07:00
parent cf60ff7e08
commit 695290b129
2 changed files with 14 additions and 11 deletions

View File

@@ -144,7 +144,8 @@ public class AnomalyDetectionJobService extends JobService {
if (!powerWhitelistBackend.isSysWhitelistedExceptIdle(packageName)
&& !isSystemUid(uid)) {
boolean anomalyDetected = true;
if (anomalyInfo.anomalyType == StatsManagerConfig.AnomalyType.EXCESSIVE_BG) {
if (anomalyInfo.anomalyType
== StatsManagerConfig.AnomalyType.EXCESSIVE_BACKGROUND_SERVICE) {
if (!batteryUtils.isPreOApp(packageName)
|| !batteryUtils.isAppHeavilyUsed(batteryStatsHelper, userManager, uid,
policy.excessiveBgDrainPercentage)) {