Merge "Add SDK sandbox network usage to corresponding apps." into tm-dev am: 63db54c290
am: d27247a86f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17944004 Change-Id: Ibdcad10aaab868f23266d134a7fd7ea298a568d5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -383,7 +383,7 @@ public class DataUsageList extends DataUsageBaseFragment
|
||||
final int collapseKey;
|
||||
final int category;
|
||||
final int userId = UserHandle.getUserId(uid);
|
||||
if (UserHandle.isApp(uid)) {
|
||||
if (UserHandle.isApp(uid) || Process.isSdkSandboxUid(uid)) {
|
||||
if (profiles.contains(new UserHandle(userId))) {
|
||||
if (userId != currentUserId) {
|
||||
// Add to a managed user item.
|
||||
@@ -391,8 +391,12 @@ public class DataUsageList extends DataUsageBaseFragment
|
||||
largest = accumulate(managedKey, knownItems, bucket,
|
||||
AppItem.CATEGORY_USER, items, largest);
|
||||
}
|
||||
// Add to app item.
|
||||
collapseKey = uid;
|
||||
// Map SDK sandbox back to its corresponding app
|
||||
if (Process.isSdkSandboxUid(uid)) {
|
||||
collapseKey = Process.getAppUidForSdkSandboxUid(uid);
|
||||
} else {
|
||||
collapseKey = uid;
|
||||
}
|
||||
category = AppItem.CATEGORY_APP;
|
||||
} else {
|
||||
// If it is a removed user add it to the removed users' key
|
||||
@@ -430,6 +434,7 @@ public class DataUsageList extends DataUsageBaseFragment
|
||||
if (item == null) {
|
||||
item = new AppItem(uid);
|
||||
item.total = -1;
|
||||
item.addUid(uid);
|
||||
items.add(item);
|
||||
knownItems.put(item.key, item);
|
||||
}
|
||||
|
Reference in New Issue
Block a user