Update App battery usage page and add tests.

- Add tests
- Remove duplicated "Set battery usage for apps" text
- Clean up some code

Screenshot: https://screenshot.googleplex.com/8LHhyxFA6X4ZFkT.png

Test: make RunSettingsRoboTests -j40
Bug: 244995036
Change-Id: Iaac9b0af10f541100e91b10affacf3307bd5edca
This commit is contained in:
Tiffany Nguyen
2022-09-14 10:00:33 +00:00
parent 9b24df2c38
commit 99d3b54a70
3 changed files with 100 additions and 10 deletions

View File

@@ -1196,9 +1196,12 @@ public class ManageApplications extends InstrumentedFragment
rebuild(R.id.sort_order_alpha, true);
}
return;
} else if (mManageApplications.mListType == LIST_TYPE_BATTERY_OPTIMIZATION) {
}
if (mManageApplications.mListType == LIST_TYPE_BATTERY_OPTIMIZATION) {
logAppBatteryUsage(filterType);
}
rebuild();
}
@@ -1673,7 +1676,7 @@ public class ManageApplications extends InstrumentedFragment
holder.setSummary(AppLocaleDetails.getSummary(mContext, entry));
break;
case LIST_TYPE_BATTERY_OPTIMIZATION:
holder.setSummary(R.string.app_battery_usage_summary);
holder.setSummary(null);
break;
default:
holder.updateSizeText(entry, mManageApplications.mInvalidSizeStr, mWhichSize);