Move anomaly code to BatteryTipUtils
Then we could reuse it across settings. Bug: 74529048 Test: robo test that cover each components still pass Change-Id: Ied0bbc6e6a1dca9628c2c084c3284ffab2f85160
This commit is contained in:
@@ -40,6 +40,8 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
/**
|
||||
* Database manager for battery data. Now it only contains anomaly data stored in {@link AppInfo}.
|
||||
*
|
||||
@@ -62,6 +64,11 @@ public class BatteryDatabaseManager {
|
||||
return sSingleton;
|
||||
}
|
||||
|
||||
@VisibleForTesting(otherwise = VisibleForTesting.NONE)
|
||||
public static void setUpForTest(BatteryDatabaseManager batteryDatabaseManager) {
|
||||
sSingleton = batteryDatabaseManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert an anomaly log to database.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user