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:
jackqdyulei
2018-07-12 17:06:42 -07:00
parent dd9b8af6b9
commit 5918cd5ff9
4 changed files with 27 additions and 5 deletions

View File

@@ -93,6 +93,7 @@ public class RestrictAppDetectorTest {
AppOpsManager.OP_RUN_ANY_IN_BACKGROUND, UNRESTRICTED_UID,
UNRESTRICTED_PACKAGE_NAME);
BatteryDatabaseManager.setUpForTest(mBatteryDatabaseManager);
doReturn(mPackageManager).when(mContext).getPackageManager();
doReturn(mApplicationInfo).when(mPackageManager).getApplicationInfo(any(),
anyInt());