Add android.settings.VIEW_ADVANCED_POWER_USAGE_DETAIL

This intent action opens the advanced power usage details screen for
a provided application.

Test: adb shell am start -a \
"android.settings.VIEW_ADVANCED_POWER_USAGE_DETAIL" -d \
"package:com.google.android.deskclock" --ez \
"request_ignore_background_restriction" 1
Bug: 129901520

Test: None
Bug: 129901520
Change-Id: Ib19228111c71ef1cfb5888f859a7efcf92a01754
This commit is contained in:
Sean Stout
2019-04-05 12:34:44 -07:00
parent 44427259e8
commit 6441723a31
3 changed files with 90 additions and 1 deletions

View File

@@ -169,7 +169,7 @@ public class AdvancedPowerUsageDetail extends DashboardFragment implements
try {
args.putInt(EXTRA_UID, packageManager.getPackageUid(packageName, 0 /* no flag */));
} catch (PackageManager.NameNotFoundException e) {
Log.e(TAG, "Cannot find package: " + packageName, e);
Log.w(TAG, "Cannot find package: " + packageName, e);
}
new SubSettingLauncher(caller)