Remove "Other Users" entry in app usage list.
Don't show the aggregated other user entry in the app usage list to keep consistent with screen-on time data. Bug: 260964903 Test: make RunSettingsRoboTests Change-Id: Id611e7222602f5ad2ea0fe27fb3f9f62fed31ff9
This commit is contained in:
@@ -129,9 +129,6 @@ public class BatteryDiffEntry {
|
||||
|
||||
/** Gets the app label name for this entry. */
|
||||
public String getAppLabel() {
|
||||
if (isOtherUsers()) {
|
||||
return mContext.getString(R.string.battery_usage_other_users);
|
||||
}
|
||||
loadLabelAndIcon();
|
||||
// Returns default applicationn label if we cannot find it.
|
||||
return mAppLabel == null || mAppLabel.length() == 0
|
||||
@@ -141,9 +138,6 @@ public class BatteryDiffEntry {
|
||||
|
||||
/** Gets the app icon {@link Drawable} for this entry. */
|
||||
public Drawable getAppIcon() {
|
||||
if (isOtherUsers()) {
|
||||
return mContext.getDrawable(R.drawable.ic_power_system);
|
||||
}
|
||||
loadLabelAndIcon();
|
||||
return mAppIcon != null && mAppIcon.getConstantState() != null
|
||||
? mAppIcon.getConstantState().newDrawable()
|
||||
@@ -178,9 +172,6 @@ public class BatteryDiffEntry {
|
||||
|
||||
/** Whether the current BatteryDiffEntry is system component or not. */
|
||||
public boolean isSystemEntry() {
|
||||
if (isOtherUsers()) {
|
||||
return true;
|
||||
}
|
||||
switch (mBatteryHistEntry.mConsumerType) {
|
||||
case ConvertUtils.CONSUMER_TYPE_USER_BATTERY:
|
||||
case ConvertUtils.CONSUMER_TYPE_SYSTEM_BATTERY:
|
||||
@@ -200,11 +191,6 @@ public class BatteryDiffEntry {
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean isOtherUsers() {
|
||||
return mBatteryHistEntry.mConsumerType == ConvertUtils.CONSUMER_TYPE_UID_BATTERY
|
||||
&& mBatteryHistEntry.mUid == BatteryUtils.UID_OTHER_USERS;
|
||||
}
|
||||
|
||||
void loadLabelAndIcon() {
|
||||
if (mIsLoaded) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user