Add whitelist for anomaly detection.
Even though we can add whitelist in config, we still need to have a on device whitelist to reduce the size of config. Use doze whitelist here because we already used it to detect whether we can restrict the app in battery detail page. Bug: 74241534 Test: RunSettingsRoboTests Change-Id: I35b6f3eba9fbc8ae51bb02cd9d5416e4360c388e
This commit is contained in:
@@ -18,10 +18,10 @@ package com.android.settings.fuelgauge.batterytip;
|
||||
|
||||
import static com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper.AnomalyColumns
|
||||
.ANOMALY_STATE;
|
||||
import static com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper.AnomalyColumns
|
||||
.PACKAGE_NAME;
|
||||
import static com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper.AnomalyColumns
|
||||
.ANOMALY_TYPE;
|
||||
import static com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper.AnomalyColumns
|
||||
.PACKAGE_NAME;
|
||||
import static com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper.AnomalyColumns
|
||||
.TIME_STAMP_MS;
|
||||
import static com.android.settings.fuelgauge.batterytip.AnomalyDatabaseHelper.AnomalyColumns.UID;
|
||||
@@ -61,10 +61,11 @@ public class BatteryDatabaseManager {
|
||||
|
||||
/**
|
||||
* Insert an anomaly log to database.
|
||||
* @param packageName the package name of the app
|
||||
* @param type the type of the anomaly
|
||||
* @param anomalyState the state of the anomaly
|
||||
* @param timestampMs the time when it is happened
|
||||
*
|
||||
* @param packageName the package name of the app
|
||||
* @param type the type of the anomaly
|
||||
* @param anomalyState the state of the anomaly
|
||||
* @param timestampMs the time when it is happened
|
||||
*/
|
||||
public synchronized void insertAnomaly(int uid, String packageName, int type, int anomalyState,
|
||||
long timestampMs) {
|
||||
|
Reference in New Issue
Block a user