summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Aseem Kumar <aseemk@google.com> 2022-11-04 21:55:38 +0000
committer Aseem Kumar <aseemk@google.com> 2022-11-08 16:59:04 +0000
commit33f942c2efc97ac04feca3d9635ad26aa74fe0da (patch)
tree985ec721f42217c6d5b70b00f506ff1349c6f998 /libs/androidfw/StringPool.cpp
parent6420c14173438a6468d82193506c5f569af1214d (diff)
Use `android` as packageName instead of `null` for methods
used by system to fetch accounts. When `null` is used with getAccountsFromCache method, there is conversion from calling UID to packageName (call getPackageNameForUid in filterAccounts), and then another conversion using packageName to UID in resolveAccountVisbility). Sometimes (as determined by PackageManager), a package which is installed in primary profile but is not installed in work profile is used to fetch accounts for work profile. This causes fetching accounts in work profile to fail. The fix uses "android" as packageName for all methods used by system process. This ensures that this conversion always works. Test: atest AccountManagerServiceTest Bug: 246257147 Change-Id: Id2e4b860f49366db5a85a3fd83b3fedeeabc9cbb
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions