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 Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2022-12-14 02:24:44 +0000
commitd59967ad9e0bfbf8aeb9449c0c3ac06ec0b7acaa (patch)
treef4b908ab07d33d42c00b53ae1668dbe5e027b6be /libs/androidfw/StringPool.cpp
parent2bcd5a5176d6a0f9514df21cec682ca51d798fe9 (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) (cherry picked from commit 8567a7841a41daf1e025cec7fb47747afab4c139) Merged-In: Id2e4b860f49366db5a85a3fd83b3fedeeabc9cbb
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions