Update dabase manager to store the uid

Also update the AppInfo to store the uid

Bug: 74022362
Test: RunSettingsRoboTests
Change-Id: I373242a12e9dbf48be134f2e9be30831b09f91c9
This commit is contained in:
jackqdyulei
2018-02-28 16:49:25 -08:00
committed by Lei Yu
parent 106825383a
commit 36249c6254
5 changed files with 35 additions and 15 deletions

View File

@@ -128,14 +128,14 @@ public class AnomalyDetectionJobService extends JobService {
Log.e(TAG, "Excessive detected uid=" + uid);
batteryUtils.setForceAppStandby(uid, packageName,
AppOpsManager.MODE_IGNORED);
databaseManager.insertAnomaly(packageName, anomalyType,
databaseManager.insertAnomaly(uid, packageName, anomalyType,
smartBatteryOn
? AnomalyDatabaseHelper.State.AUTO_HANDLED
: AnomalyDatabaseHelper.State.NEW,
timeMs);
}
} else {
databaseManager.insertAnomaly(packageName, anomalyType,
databaseManager.insertAnomaly(uid, packageName, anomalyType,
AnomalyDatabaseHelper.State.NEW, timeMs);
}
} catch (NullPointerException | IndexOutOfBoundsException e) {