From 0ebd7a7138605c049e44e52ca4725d5a8ffb6ac0 Mon Sep 17 00:00:00 2001 From: Rafal Slawik Date: Mon, 14 Dec 2020 10:53:19 +0000 Subject: [PATCH] Combine CpuTimePerUidFreq uids using base uids http://ag/13181177 normalized uids to their base uids only for apps. However, other processes (e.g. settings) run under multiple uids in some cases too. So we need to normalize all uids. Bug: 157535126 Test: cmd stats pull-source 10010 Change-Id: I427d84203ed97ab0b17890f06304cd4ff8a5c3b0 --- .../com/android/server/stats/pull/StatsPullAtomService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java b/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java index 8438652c084e5..ac3816e7ea2d3 100644 --- a/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java +++ b/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java @@ -1532,8 +1532,8 @@ public class StatsPullAtomService extends SystemService { // All shared app gids are accounted together. uid = LAST_SHARED_APPLICATION_GID; mutateInPlace = true; - } else if (UserHandle.isApp(uid)) { - // Apps are accounted under their app id. + } else { + // Everything else is accounted under their base uid. uid = UserHandle.getAppId(uid); }