Support multi-user privacy for battery usage chart

When there are multiple accounts in the devices, the battery usage list
is shared in the current design. We will aggregate other users usage
data into a single item to support multi-user privacy requirements

Screenshot: https://screenshot.googleplex.com/AkFTUtNvnoxcuGR

Bug: 202119550
Test: make RunSettingsRoboTests
Change-Id: I6cb55f0d50a4caca83212a0a54410530a032c089
This commit is contained in:
ykhung
2022-07-10 23:47:42 +08:00
parent 9447ec6d81
commit 764d513d00
7 changed files with 191 additions and 16 deletions

View File

@@ -69,6 +69,8 @@ public class BatteryUtils {
public static final int UID_REMOVED_APPS = -4;
/** Special UID value for data usage by tethering. */
public static final int UID_TETHERING = -5;
/** Special UID for aggregated other users. */
public static final long UID_OTHER_USERS = Long.MIN_VALUE;
@Retention(RetentionPolicy.SOURCE)
@IntDef({StatusType.SCREEN_USAGE,