summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramStore.java
diff options
context:
space:
mode:
authorFelipe Leme <felipeal@google.com>2020-08-13 10:50:16 -0700
committerFelipe Leme <felipeal@google.com>2020-08-18 15:03:59 -0700
commitae7902fcefeb0489b6b7360322594ab7bee634df (patch)
tree02d0de5988a3df65f1381d4679b3ea0d8f6ddbf4 /rs/java/android/renderscript/ProgramStore.java
parent5d1af8b490d6c9696da131b1f341d1f3096723b0 (diff)
Cache the UserInfo for the system user on UserManagerService.
When the name of the system user (userId 0) is not explicitly set, UserManagerService must return the localized string defined by owner_name. As UserInfo is mutable and its 'name' attribute is publically acessible, UserManagerService currently creates a new UserInfo (with the right 'name') for the system user every time it's needed, which results in ~1200 unnecessary objects created at boot (and more over time). This CL improves the situation by caching 2 UserInfo objets for the system user (one with the original name, and another with the localized name). Test: adb shell dumpsys user | grep "System user:" Fixes: 161915546 Bug: 164159026 Change-Id: Ibbe4fed3e650845d8c365cb6c7a2dcb306738152
Diffstat (limited to 'rs/java/android/renderscript/ProgramStore.java')
0 files changed, 0 insertions, 0 deletions