Update InCallController to support work profiles.

Allow work profiles to place/receive calls using the associated dialer
app. The existing code will use the primary profile to query the
potential apps to connect to. Instead, we can get the right user from
the phone account that is stored in the call. Also, we need to allow
users with the across users permission to access phone accounts from
other users (getAllPhoneAccountHandles/getCallCapablePhoneAccounts).

A regression was introduced in the initial commit where emergency calls
were unable to be placed from the lock screen so I added a test in
InCallControllerTests to verify that the method behaves properly when
there is not any InCallServices bound.

Bug: 255343995
Bug: 257953390
Bug: 262487224
Test: Manual, atest TelecomUnitTests, atest CtsTelecomTestCases
Change-Id: If1e4506fd5ea1818da3ab2a566ee8ce5851fea51
1 file changed