Shows "App Info" for system apps
If a specific Uid contains only one package, we show the "App Info" button, even if it's a system app Change-Id: Ie39b6d90e62ae432c636d50729f0aa45405ce67c
This commit is contained in:
@@ -350,13 +350,12 @@ public class PowerUsageDetail extends Fragment implements Button.OnClickListener
|
||||
pi = packages != null ? pm.getPackageInfo(packages[0], 0) : null;
|
||||
} catch (NameNotFoundException nnfe) { /* Nothing */ }
|
||||
ApplicationInfo ai = pi != null? pi.applicationInfo : null;
|
||||
boolean isSystem = ai != null? (ai.flags & ApplicationInfo.FLAG_SYSTEM) != 0 : false;
|
||||
|
||||
boolean removeHeader = true;
|
||||
switch (mDrainType) {
|
||||
case APP:
|
||||
// If it is a Java application and it's not a system application
|
||||
if (packages != null && !isSystem) {
|
||||
// If it is a Java application and only one package is associated with the Uid
|
||||
if (packages != null && packages.length == 1) {
|
||||
addControl(R.string.battery_action_app_details,
|
||||
R.string.battery_sugg_apps_info, ACTION_APP_DETAILS);
|
||||
removeHeader = false;
|
||||
|
Reference in New Issue
Block a user