Commit 06645f1a authored by Martijn Coenen's avatar Martijn Coenen
Browse files

HCE: invalidate cache if passed in service unknown.

To fix a specific scenario where a service is enabled
using PackageManager.setComponentEnabledSetting(): in this
case, the ACTION_PACKAGE_CHANGED broadcast is delayed by
10 seconds, causing NfcService not to know about enabled
services until then.

This in turn could cause our "isDefault" APIs to return
incorrect results in the first 10 seconds after changing
the component state, because we do not know about the
newly enabled service yet.

Fix by invalidating the cache if we don't know about a
service passed in from API calls.

Bug: 10633674
Change-Id: I4c236002afc79464e0b41f3c6919541915020ba4
parent a3b2c794
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment