Skip to content
Commit 00fe868a authored by Fabián Kozynski's avatar Fabián Kozynski
Browse files

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
parent 2e366454
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment