Fix connection manager bugs related to work profiles
When calling TelecomManager.addNewIncomingCall with an account
that's was not registered we would crash. Fix was to check
for a null phone account.
Various TelecomManager APIs would throw security exceptions when
called from a work profile. Fix was to:
- switch to using APIs that allowed the user to be specified.
For example, using queryIntentServicesAsUse instead of
getServiceInfo
- don't look for work profiles if the calling user isn't the
owner.
The default connection manager (set using a config.xml overlay)
didn't work with work profiles. Fix was to allow the default
connection manager to resolve against the calling process's
user handle.
BUG: 19300886, 19301690, 19301359
Change-Id: I49d75b69dcfc829b74a5483d7a011f17d8d06838
3 files changed