Check for service state before dialing normal voice call in the CS pipe
1) Rename CallStateException ERROR_DISCONNECTED to ERROR_OUT_OF_SERVICE
2) Do not dial in the CS pipe if CS is out of service and PS is not in LTE.
TelephonyConnectionService#getTelephonyConnection() doesn't filter in
some cases (ex. CS is out of service and IMS registered for SMS only) so
added this check to filter dialing the normal voice call to modem.
3) If dial is not allowed then throw CallStateException ERROR_OUT_OF_SERVICE
which will trigger notifying user to enable VoWiFi if WFC is disabled,
WFC provisioned and connected to WiFi.
4) Optimized imports
Test: Dial voice and video calls for all the combinations of the following
- CS : No service, 1x, GSM, UMTS, LTE
- PS : No service, 1x, eHRPD, GSM, UMTS, LTE
- IMS : No service, SMS only, SMS&VT only, VoLTE
- WiFi: Connected, Disconnected
- WFC : Enabled, Disabled
Bug: 37405103
Change-Id: I0fb91e06aac99b1c4cf163c7b5858a694b40c91c
4 files changed