diff options
| author | 2023-06-27 15:50:58 -0400 | |
|---|---|---|
| committer | 2023-06-28 08:49:12 -0400 | |
| commit | 00fe868a7446b6d160b1c66208c94abbe3783f49 (patch) | |
| tree | 2ffa897bf3049be2be9c02a5160882ee102397b7 /libs/androidfw/StringPool.cpp | |
| parent | 2e366454dee947195d6e24fd150aa593ab39c2e0 (diff) | |
Fix call to PackageManager exception
If PackageManager.getComponentEnabledSetting is called for a package
that is not installed, it will throw an exception. This was caused
because PackageManager.queryIntentServicesAsUser takes a user parameter,
but getComponentEnabledSetting uses the userId from the context.
Instead, make sure that the PackageManager used corresponds to the
correct user.
Fixes: 288951969
Test: atest InstalledTilesComponentRepositoryImplTest
Test: manual: install TileService app in secondary user only and switch
to that user
Change-Id: I336df215fe70d58f1c5747a928529c5e9496f032
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions