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-14 22:09:10 +0000
commit8567a7841a41daf1e025cec7fb47747afab4c139 (patch)
tree990d6dc9e1d811b57ea0ba07f1d132c346561eb2 /libs/androidfw/StringPool.cpp
parent3bd6c98b07f095bdb1d82dc3822728e0ef7fb4c0 (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 (cherry picked from commit 33f942c2efc97ac04feca3d9635ad26aa74fe0da)
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions