Change BatteryUtils.isLegacyApp() to isPreOApp()

Bug: 73792442
Test: RunSettingsRoboTests
      make -j40 RunSettingsRoboTests
Change-Id: I770030a8f38ec6156aa2a40f4c88ac9e0673751d
This commit is contained in:
hughchen
2018-03-14 16:16:26 +08:00
committed by Hugh Chen
parent de0a3a5334
commit 18ce28ed33
3 changed files with 5 additions and 5 deletions

View File

@@ -397,7 +397,7 @@ public class BatteryUtils {
public void setForceAppStandby(int uid, String packageName,
int mode) {
final boolean isPreOApp = isLegacyApp(packageName);
final boolean isPreOApp = isPreOApp(packageName);
if (isPreOApp) {
// Control whether app could run in the background if it is pre O app
mAppOpsManager.setMode(AppOpsManager.OP_RUN_IN_BACKGROUND, uid, packageName, mode);
@@ -483,7 +483,7 @@ public class BatteryUtils {
return 0;
}
public boolean isLegacyApp(final String packageName) {
public boolean isPreOApp(final String packageName) {
try {
ApplicationInfo info = mPackageManager.getApplicationInfo(packageName,
PackageManager.GET_META_DATA);