History log of /packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
95e7bfa26eaf5a06b43e1566985765a151c42df2 24-Apr-2018 Brad Ebinger <breadley@google.com> Correctly Destroy a Connection when there is an Error

We were disconnecting but not destroying the Connections
correctly, which led to "stuck" calls in Telecom.

Bug: 77921103
Test: Manual
Change-Id: I79d31b2de1f88bfbdceef658f6400b3e9401f1d3
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
2610794c2a4e3db59c6de1f052bc65b79a2e6b6c 16-Mar-2018 Hall Liu <hallliu@google.com> Pass RTT streams down regardless of incoming call request

When an incoming call doesn't request RTT but the UI RTT setting is on,
pass the RTT pipes down anyway in case the modem is doing something
weird with turning RTT on later in the call.

Bug: 74451081
Test: manual
Change-Id: I00e413eff0e979a8da2d41f0d8231b45e85633cb
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
53033dbb3396ba5c4516ac3b838a6c0cc9cee6d6 27-Feb-2018 Hall Liu <hallliu@google.com> RTT logging tweaks

Change a log message to be more reflective of what's actually going on,
and raise its level to warning

Test: logging change
Change-Id: Iae7a8a156c77632c67d6c19cd98631ad33d1caef
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
620a47fe96183b78283c0fa2ceee72bc9e7a2ae2 26-Feb-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic "p_assisted_dialing_revert"

* changes:
Revert "Add the core assisted dialing logic to telephony."
Revert "Expose the assisted dialing setting activity to intents."
Revert "Use the run script from external/robolectric-shadows"
Revert "Add more unit tests for Assisted Dialing"
Revert "Simplify some tests in AssistedDialingMediatorImplTest"
945409fb0283108f266c48b55eec1eac3aaa40a4 21-Feb-2018 Eric Erfanian <erfanian@google.com> Revert "Add the core assisted dialing logic to telephony."

This reverts commit c712d4b596fc1219e119880d74164b2ef17a5245.

Reason for revert: we're cutting the feature from P

Change-Id: Ibc237e933f4b698a715fe73567f02d6484e3a4b9
Bug: 73727182
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
52bfb7fe965f633b1337aac0d754f7e0663e7d6c 31-Jan-2018 Hall Liu <hallliu@google.com> RTT bugfixes, part 5

* Set RTT property according to changes in ImsPhoneConnection, not just
by ourselves
* Add some logging
* Properly handle RTT for incoming calls started with RTT

Bug: 72648661
Bug: 72762206
Test: manual, with telecom testapp dialer over the network
Change-Id: I8d8ece12b261ce1455da70270e05cb87e6a71158
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
9818758ba259e2257a76620d4ca6704336d9eec1 23-Jan-2018 Hall Liu <hallliu@google.com> RTT initialization bug fixes

Add a setting toggle to enable/disable RTT
Allow calls to be initiated with RTT enabled (add plumbing)
Refactor to match the change to dial()

Bug: 71873552
Test: manual
Change-Id: I79b415751b7f1495a3cd603b83f8c4df4389c4c8
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
f9e96302e6147ad3152ccb89e063e0d4bc170659 22-Jan-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add the core assisted dialing logic to telephony."
c712d4b596fc1219e119880d74164b2ef17a5245 04-Jan-2018 Eric Erfanian <erfanian@google.com> Add the core assisted dialing logic to telephony.

This module contains all of the transformation logic,
constraints, settings, tests, and other functionality for the feature.

Test: Unit tests that do not require a ShadowPhoneGlobals or AndroidManifest
Bug: 63995261
Change-Id: Iec93497042e6288965054bba359ac984b8db694e
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
8c371167a035822677d66b443003e29e219e44e7 09-Feb-2017 Wei Liu <luciferleo@google.com> Set Settings.Global.CELL_ON default to CELL_ON_FLAG if not defined.

Similar to ag/1802399

Fixes: b/35031152
TEST: Factory reset the watch then pair. Dial outgoing call from watch
should succeed even the radio power is turned off by cell mediator.

Change-Id: I0020054d8b6c830e48f9899df7fefa0483322966
(cherry picked from commit 89dd33541f2b1bd4129a66fa77a10dfa3a13b21b)
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
d70f02e2ef2f8a45def61bf4c237544c8415b18f 10-Jan-2018 Jordan Liu <jminjie@google.com> Merge "Deliver precise disconnect cause" am: c6f584c6f0 am: aebb536db0
am: 94335a3f28

Change-Id: I45c13ec7d3da6cfd1a60f95f9fdcb9d945510936
1d9d338e36d33eb39f1be46e48075e92a94abe7f 01-Apr-2016 Wenting Xiong <wenting.xa.xiong@sonymobile.com> Deliver precise disconnect cause

To show precise call failed cause to user, add it in DisconnectCause.
Check carrier config to toggle this behavior.

Bug: 31504039
Test: Manual
Change-Id: I9be15d935c79bd5d3cac2181ec9db63a32a58e3d
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
e61cc419e297a96745e693413fd415780ef16b56 07-Dec-2017 Eric Erfanian <erfanian@google.com> Add assisted dialing logic to Telephony Connections.

Currently, we propogate the assisted dialing property
if we detect that the client requested assisted dialing. This
is because the client is currently responsible for assisted dialing
and only passes along the request if it was successful.

Test: manual
Bug: 35963245
Change-Id: I0811fd64a15675e7b4f34963189f0fe4688ae277
Merged-In: I6897554761b43449b3619747663866ff79b504ec
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
cf9b6f54e1f32ba4b7511d42aa42ceb5d75c498d 07-Dec-2017 Eric Erfanian <erfanian@google.com> Add assisted dialing logic to Telephony Connections.

This is a manual merge of:
I122fa1075f70095733368ed19a725f2c820a4f82

Currently, we propogate the assisted dialing property
if we detect that the client requested assisted dialing. This
is because the client is currently responsible for assisted dialing
and only passes along the request if it was successful.

Test: manual
Bug: 35963245
Change-Id: I6897554761b43449b3619747663866ff79b504ec
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
3bbcaa2856a87a903ce2443a342b3d4ff95a9db5 22-Apr-2016 Wei Huang <wei.x.huang@sony.com> Support hiding manage IMS conference call button

Check carrier config in TelecomAccountRegistry when registering
PhoneAccounts. When creating new TelephonyConnections, set a propery
on the connection to indicate whether it supports managing IMS
conference call.
This is then used in the conference to determine whether the
conference can manage the children calls.

Test: manual - checked the manage ims conference call button
Bug: 28729600
Change-Id: I1000830a85814150658b62ea9add72bfb83bbba0
Merged-In: I1000830a85814150658b62ea9add72bfb83bbba0
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
f48b1e1ae5ed55a4e6ff5342c1c93075990fa42a 22-Apr-2016 Wei Huang <wei.x.huang@sony.com> Support hiding manage IMS conference call button

Check carrier config in TelecomAccountRegistry when registering
PhoneAccounts. When creating new TelephonyConnections, set a propery
on the connection to indicate whether it supports managing IMS
conference call.
This is then used in the conference to determine whether the
conference can manage the children calls.

Test: manual - checked the manage ims conference call button
Bug: 28729600
Change-Id: I1000830a85814150658b62ea9add72bfb83bbba0
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
6e1d56a1d4e51b2b889f61fe3e46f535ee6d45f8 03-Oct-2017 Pengquan Meng <mpq@google.com> [TelephonyService] Improve hold capability signal

The CAPABILITY_HOLD perpority is not set properly in telephony call(If
there are two top calls, both of them still holdable).

This add a hold tracker to track all telephony connections/conference
and set the holdable state of them. The connections/conference itself
can use the holdable state and the call state to determine if
CAPABILITY_HOLD should be set.

Test: manully test and unit test
Bug: 66949982

Change-Id: I43fde6fcbc047c09ba375c6c8fd5ac374bf7fb70
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
5a80355524666c49806600d6d79a5a3541a6eb29 18-Aug-2017 Brad Ebinger <breadley@google.com> Adds tests for MSIM redial and fixes bug

1) Adds MSIM redial tests.
2) Fixes bug where we were not removing
a phone after making it when initializing
the cache.

Test: Unit tests
Bug: 27059146
Change-Id: Ia6ecc82ddd93ba7ad33ea01a8f5678f02cc09df1
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
41f4023f5f4fb9650f1da45f3e6240e63e57463b 04-May-2017 Srikanth Chintala <srikchin@codeaurora.org> Emergency call redial implementation

Handle EMERGENCY_PERM_FAILURE and
EMERGENCY_TEMP_FAILURE DisconnectCause
for redial Emergency call.

Bug: 27059146
Change-Id: Ie72ab2901ec05d972204ed11f115a05b79173c1d
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
ed0b137d01d5c0a4a1af90f0a13dc66ba27969d2 18-Aug-2017 Brad Ebinger <breadley@google.com> Adds tests for MSIM redial and fixes bug

1) Adds MSIM redial tests.
2) Fixes bug where we were not removing
a phone after making it when initializing
the cache.

Test: Unit tests
Bug: 27059146
Change-Id: Ia6ecc82ddd93ba7ad33ea01a8f5678f02cc09df1
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
595310d15da17c5f3d51f1308109882405680f23 04-May-2017 Srikanth Chintala <srikchin@codeaurora.org> Emergency call redial implementation

Handle EMERGENCY_PERM_FAILURE and
EMERGENCY_TEMP_FAILURE DisconnectCause
for redial Emergency call.

Bug: 27059146
Change-Id: Ie72ab2901ec05d972204ed11f115a05b79173c1d
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
1ee9ac22e3cc271b4222a3aa99dbc527d1f94781 11-Aug-2017 Brad Ebinger <breadley@google.com> Cleanup RadioOnHelper and supporting methods

Minor changes to comments and fixs possible bug
introduced in refactor: The phone type should
be saved before the radio is turned on in order
for the TelephonyConnectionService to switch
the phone type later if it changes when the
call is placed.

Test: Telephony Unit Tests
Merged-In: Id6c1c3299bacbb4335cb5bf62f76de7a7b90a298
Change-Id: Id6c1c3299bacbb4335cb5bf62f76de7a7b90a298
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
513df4ebe6f7c9e614e948dfac1a9137888a9ba4 15-Dec-2016 Wei Liu <luciferleo@google.com> Refactor EmergencyCallHelper -> RadioOnCallHelper

To make phone calls when the cellular radio is turned off automatically,
we will use a mechanism similar to the EmergencyCallHelper and share
the handling of the onComplete() callback.

Test: Telephony Unit Tests
Merged-In: Id782c759d3abd29d432782575f88d2ed83f083b2
Change-Id: Id782c759d3abd29d432782575f88d2ed83f083b2
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
a58ecc2b25030eacc8485ef7c0fee8d62a5eb397 11-Aug-2017 Brad Ebinger <breadley@google.com> Cleanup RadioOnHelper and supporting methods

Minor changes to comments and fixs possible bug
introduced in refactor: The phone type should
be saved before the radio is turned on in order
for the TelephonyConnectionService to switch
the phone type later if it changes when the
call is placed.

Test: Telephony Unit Tests
Change-Id: Id6c1c3299bacbb4335cb5bf62f76de7a7b90a298
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
852211a4d5d9cd267e2867fbb41d04673521e955 15-Dec-2016 Wei Liu <luciferleo@google.com> Refactor EmergencyCallHelper -> RadioOnCallHelper

To make phone calls when the cellular radio is turned off automatically,
we will use a mechanism similar to the EmergencyCallHelper and share
the handling of the onComplete() callback.

Test: Telephony Unit Tests
Merged-In: Id782c759d3abd29d432782575f88d2ed83f083b2
Change-Id: Id782c759d3abd29d432782575f88d2ed83f083b2
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
34e077131e43c256bcb3d2679887f50025549348 01-Jun-2017 Tyler Gunn <tgunn@google.com> Merge "Ensure WFC international call check only happens for outgoing calls." into oc-dev
am: 92848824d7

Change-Id: I23fbe26e427c45cdab8cf6c39a66a5cc71267010
92848824d73598a166ecf5572992bde9abc77aad 01-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Ensure WFC international call check only happens for outgoing calls." into oc-dev
57c362606bdc175152c210653a9d613c7572a59e 01-Jun-2017 Tyler Gunn <tgunn@google.com> Ensure WFC international call check only happens for outgoing calls.

Add TelephonyConnection isOutgoingCall property.
Use property when checking if the call is an international call.

Test: Manual
Bug: 62162029
Change-Id: Ibade505eef29ee6fa2d6881f2a6377a4e67d57c6
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
3e4cbdc4b9f54b2746d1a93a38a5b1e2e8fbda8e 31-May-2017 Tyler Gunn <tgunn@google.com> Fix potential NPE when determining if should warn for international number.
am: 81aa070bb0

Change-Id: Id1d66d76ea95883db8a58cd91cd0eac6199c9dae
81aa070bb04f4056859c08b52cd04567cfe57c69 30-May-2017 Tyler Gunn <tgunn@google.com> Fix potential NPE when determining if should warn for international number.

Some cases were seen in the field where an NPE occurred while dialing
out, causing the phone process to crash.

Test: Manual
Bug: 62107200
Change-Id: Ia94a6658d2c91259298fe940335deceba36ae262
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
da920364a0811f17de4d82714d89d4ee9e003fff 25-May-2017 Tyler Gunn <tgunn@google.com> Merge "IMS conference merge improvements." into oc-dev
am: c310bd7b26

Change-Id: I8ff2f43d4ca5b162e995a9e5e43880684ab268d7
c310bd7b265df6cb8e980d0272362a2ab468e961 25-May-2017 Tyler Gunn <tgunn@google.com> Merge "IMS conference merge improvements." into oc-dev
4a7629e31f24c4658746e072a5afb7c1cecbe0e0 09-May-2017 Tyler Gunn <tgunn@google.com> IMS conference merge improvements.

1. When adding a new child call in an ims conference, use new CS method
to add it and set the parent property at the same time. This helps
prevent jank in the InCall UI when unparented children are added.
2. When the original call get disconnected, setting the reason code to
IMS_MERGED_SUCCESSFULLY so that dialer will have a notion that the call
is being disconnected due to merging; this will allow better filtering.

Test: Manual
Bug: 37581781
Change-Id: I75e560837c258c1fa9c0fae71c73c2e29bceb1a6
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
a8340d5e0abde5021aaacd8f22ae31916f68a65a 24-May-2017 Brad Ebinger <breadley@google.com> Merge "Support RRO for emergency number conversion map" am: 980ba91dc2 am: 255b792b65
am: 8831900674

Change-Id: I9bca7f94409ccbbd9366f918fd2b5e8dd5e02ad9
980ba91dc2cff63530eaf1d45a09d41ccbeba927 24-May-2017 Brad Ebinger <breadley@google.com> Merge "Support RRO for emergency number conversion map"
e3bd472d4217e95335708b2476af87fb2542f829 24-May-2017 Tyler Gunn <tgunn@google.com> Merge "Move WFC connection event to "onCreateConnectionComplete"." into oc-dev
am: 0719cfe43c

Change-Id: I33df91e7a200303205412aac2ed5857862a50cbf
0719cfe43c096eabd045e5cacd4eb8316b045e93 24-May-2017 Tyler Gunn <tgunn@google.com> Merge "Move WFC connection event to "onCreateConnectionComplete"." into oc-dev
888620b38a5a7dfd9ef9a9f98965b5afd91cb719 15-May-2017 Pankaj Kanwar <pkanwar@google.com> Merge "Add APM check to EmergencyCallHelper" into oc-dev
am: a0e20f358d

Change-Id: I4dfbe813a3cd55cd4e880791658bd978071a3300
415585bcb65040c44b59c3086143dab68262ec39 12-May-2017 Tyler Gunn <tgunn@google.com> Move WFC connection event to "onCreateConnectionComplete".

Previously, the Connection Event would be sent before the connection was
added to the ConnectionService, meaning nobody was listening to the event,
and it would never get through.

Test: Manual
Bug: 33272455
Change-Id: I3be6f5c3d399dab4ff6ae4ff148604808de7bc57
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
d84be3809e96bf127edfa079e0cdbd1f8ba602d5 11-May-2017 Brad Ebinger <breadley@google.com> Add APM check to EmergencyCallHelper

There is a race condition between APM on and
the radio being turned off. If APM is on and
the radio hasn't been turned off yet, it can
cause the e911 call to fail because the dial
is placed on a radio that is off.

This change turns on EmergencyCallHelper when
either the radio is off or APM is on to eliminate
the race condition.

Test: Manual E911 Tests
Bug: 37960809
Change-Id: I81d269f8a106d1692796788a1974b01162579cc1
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
1ff56cf6b63f8e811a2f0fa78b1f2c7fdfe9bf2c 05-May-2017 Jayachandran Chinnakkannu <jayachandranc@google.com> Merge "Rename CallStateException ERROR_DISCONNECTED to ERROR_OUT_OF_SERVICE" am: a664f20590 am: 81703ac3c3
am: 9435830ee4

Change-Id: Icdd743398edfa8222051066484ea7d3f046162f0
4a7f97ec3b7f50d7309b14e3b0e7fce0a22bc6af 04-May-2017 Jayachandran C <jayachandranc@google.com> Rename CallStateException ERROR_DISCONNECTED to ERROR_OUT_OF_SERVICE

GsmCdmaPhone throws this exception if dial is not allowed
in the current CS, PS and IMS service states. This cause
will be used to notify the user to enable VoWIFI if device
is wifi connected, WFC is off and WFC is provisioned.

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: I72ffc477951ade3cf6e223d4f9f3a75d5c0b2d45
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
6904b14f7c042fdc9c333a484979e2510cbf1a5f 21-Apr-2017 Wei Huang <wei.x.huang@sony.com> Support RRO for emergency number conversion map

With current implementation, configurable emergency call number map is
read from global shared resources object that provides access to only
system resources(no application resources).
It means RRO(runtime resource overlay) is NOT supported.

This patch also applies refactoring to remove function
isConvertToEmergencyNumberEnabled.

Bug: 37762325
Test: Manual
Change-Id: I7585ced398740696972a79bf5532031c0a630286
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
beab44275588093776b62ccaf202f48ca4869a67 24-Mar-2017 Chen Xu <fionaxu@google.com> Merge "Add subId while launching MMI dialog" am: 7cca5a60c3 am: 0413c6bb98
am: 93ceb79562

Change-Id: I26cb185ac0fab823889354119cd3dcd11c5ac8c8
0413c6bb986bc903e18b084242612af3b92601f7 24-Mar-2017 Chen Xu <fionaxu@google.com> Merge "Add subId while launching MMI dialog"
am: 7cca5a60c3

Change-Id: If113c411270bc8c0b53fb4d47cd827371b5cab61
7cca5a60c35a0316e5529f46459ed8f860b3e138 24-Mar-2017 Chen Xu <fionaxu@google.com> Merge "Add subId while launching MMI dialog"
3cdd90262077a4a5b779d6d1ae5249978fdf7992 03-Sep-2015 Srikanth Chintala <srikchin@codeaurora.org> Add subId while launching MMI dialog

While creating intent to MMI dialog activity pass subscription
info as well to the corresponding phone.

Bug: 34872761
Change-Id: I830655bb18eed6845240cb701ea27c50129d93dc
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
13bac7bc86cbfca9d9508ae3e4c3facfd514bbe3 20-Mar-2017 Sanket Padawe <sanketpadawe@google.com> Update SubscriptionManager API by replacing 'id' & 'idx' with 'index'.

Bug: 35767068
Test: No build failure on update.
Change-Id: I8e0a885c0e6a7a8af66ae90e7986a6edbff02bba
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
d6cd279c84523443107ede08871636a0128f1b3a 02-Mar-2017 Brad Ebinger <breadley@google.com> DO NOT MERGE Revert "Adds SIM PUK locked conditions to e911 calling"

This reverts commit 51b2321c6d838b3473af215cb9f2716e871d6676.

Change-Id: I3c57a5403af275b32f2e1d7a5db03319a53bf2d3
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
51b2321c6d838b3473af215cb9f2716e871d6676 02-Dec-2016 Brad Ebinger <breadley@google.com> Adds SIM PUK locked conditions to e911 calling

-Incorperates logic for PUK locked SIMs when determining which slot to
place the emergency call on.

- Fixes EmergencyCallStateListenerTest as well

- Disables failing VVM tests until they are moved to the Dialer scope

Test: Added e911 calling unit tests
Bug: 31942934
Merged-In: I3ac7b3a81874665eca47297893edd6ee9746e49b
Change-Id: I3ac7b3a81874665eca47297893edd6ee9746e49b
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
6e426ebf310f9360a067b5950ac3ca4ca41664a8 01-Mar-2017 Tyler Gunn <tgunn@google.com> Merge "Detect scenario where international call dialed on WFC."
am: cbaf73836e

Change-Id: If0b8ea87e5e607e08e3208e7ef0dcd2c25e4d8ba
b678f7ffe30040e7ea8a545ab9049115539192b7 27-Feb-2017 Tyler Gunn <tgunn@google.com> Detect scenario where international call dialed on WFC.

Detect a situation where user is making a WFC call (and LTE not available)
and the number dialed is an international number. Snd a connection event
to the dialer to display a message regarding this.

Test: Manual
Bug: 33272455
Merged-In: I1bb6c5a17c055dbe08bffded2d6fb81a4b3fb3e4
Change-Id: I1bb6c5a17c055dbe08bffded2d6fb81a4b3fb3e4
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
b67acc02571b61756c4389ef9c0fef608e868900 28-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Detect scenario where international call dialed on WFC."
abc6580653ce4f0a4dc11a808c672987befb2bd8 27-Feb-2017 Tyler Gunn <tgunn@google.com> Detect scenario where international call dialed on WFC.

Detect a situation where user is making a WFC call (and LTE not available)
and the number dialed is an international number. Snd a connection event
to the dialer to display a message regarding this.

Test: Manual
Bug: 33272455
Change-Id: I1bb6c5a17c055dbe08bffded2d6fb81a4b3fb3e4
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
23c369d0aa1e2e1cf3e4f8f1c0e6d99776c6f529 16-Feb-2017 Meng Wang <mewan@google.com> Merge "Fix VoWiFi prompt when dialing in airplane mode" into nyc-mr2-dev am: a63bdb0e47
am: 8b540c6e56

Change-Id: I0a68fd99641ee631db239214a79679ca70167794
8b540c6e5600d29b8704818614aa8d11ce6e7635 16-Feb-2017 Meng Wang <mewan@google.com> Merge "Fix VoWiFi prompt when dialing in airplane mode" into nyc-mr2-dev
am: a63bdb0e47

Change-Id: Ide392cc560cadddd68697ac124911ac1022962bd
e57bf0279d564eaf086da03db0dd139907b81f69 15-Feb-2017 Meng Wang <mewan@google.com> Fix VoWiFi prompt when dialing in airplane mode

1. Handle dial exception ERROR_POWER_OFF
2. Don't prompt VoWiFi if not provisioned

Bug: 28709116
Change-Id: I4ec88d25b352e573fde845c4948185f6c6092bcb
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
fb2f785ccb39c7a67ed20837c2abf85c80000378 09-Feb-2017 Wei Liu <luciferleo@google.com> DO NOT MERGE Set Settings.Global.CELL_ON default to CELL_ON_FLAG if not defined. am: 89dd33541f
am: 95233eec0d

Change-Id: Iea2a68838755eff97cd044e45039a6f98cdbb71f
8545602ec8332e9d26ce29465c9e09aecf5d940f 09-Feb-2017 Wei Liu <luciferleo@google.com> DO NOT MERGE Set Settings.Global.CELL_ON default to CELL_ON_FLAG if not defined.
am: 89dd33541f

Change-Id: Ief123beee9e3697707f9be2a41b2ea1bab742d1d
95233eec0d452793cec3065cc25b022d969d4803 09-Feb-2017 Wei Liu <luciferleo@google.com> DO NOT MERGE Set Settings.Global.CELL_ON default to CELL_ON_FLAG if not defined.
am: 89dd33541f

Change-Id: I6cf439f8ce0e95dc21ebacdd732760430759646f
89dd33541f2b1bd4129a66fa77a10dfa3a13b21b 09-Feb-2017 Wei Liu <luciferleo@google.com> DO NOT MERGE Set Settings.Global.CELL_ON default to CELL_ON_FLAG if not defined.

Similar to ag/1802399

Fixes: b/35031152
TEST: Factory reset the watch then pair. Dial outgoing call from watch
should succeed even the radio power is turned off by cell mediator.

Change-Id: I0020054d8b6c830e48f9899df7fefa0483322966
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
781ebe2942007bdfc907110808b61f8e26f83ca8 07-Feb-2017 Wei Liu <luciferleo@google.com> DO NOT MERGE Refactor EmergencyCallHelper -> RadioOnCallHelper am: 5e0ffbe1ac
am: 0b34516fe2

Change-Id: I0f81ba333b9d44d70f2d721a5e5b432e90a8e615
0b34516fe2064fa7a071f0d0483959317572ba59 07-Feb-2017 Wei Liu <luciferleo@google.com> DO NOT MERGE Refactor EmergencyCallHelper -> RadioOnCallHelper
am: 5e0ffbe1ac

Change-Id: Ie23cc7267f9df11e7601428168a9922732274766
a70eb990117ccfb2c02e19df395f1911cc2edf63 07-Feb-2017 Wei Liu <luciferleo@google.com> DO NOT MERGE Refactor EmergencyCallHelper -> RadioOnCallHelper
am: 5e0ffbe1ac

Change-Id: I0354f4d29a4bd70aed4a657c810722060b0ca6e2
5e0ffbe1aca1366c00dd565cdb83ba01c5229d3d 15-Dec-2016 Wei Liu <luciferleo@google.com> DO NOT MERGE Refactor EmergencyCallHelper -> RadioOnCallHelper

To make phone calls when the cellular radio is turned off automatically,
we will use a mechanism similar to the EmergencyCallHelper and share
the handling of the onComplete() callback.

Change-Id: Id782c759d3abd29d432782575f88d2ed83f083b2
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
765ea6a4b71069ca23c4560fcaa40502d098cff8 18-Oct-2016 Tyler Gunn <tgunn@google.com> IMS Conference fixes related to RemoteConnectionServices.

1. In ImsConferenceController, adding the children of an IMSConference
to the list of conferencable connections. This is necessary because the
RemoteConnectionService API does not support specifying a list of
Conferenceables for a RemoteConnection. Where Conferenceables are either
Connections or Conferences. It only supports specifying a list of
conferenceable connections. This is problematic because for an IMS
conference call, a standlone Connection is technically conferenceable with
the ImsConference. As a result, the RemoteConnetionServices API is not
able to support conferencing a standalone Connection into a Conference.
To fix this temporarily, I'm adding the child ImsConference participant
connections to the list of conferenceables for the standalone Conference.

2. In ImsConference, there was an assumption made in "onMerge" that the
Connection merged into the conference was a TelephonyConnection. Because
of the issues in (1), we can't make this assumption. Since the cast
was only there to get at the phone, opted to just use the getPHone()
method in the conf host connetion instead.

Bug: 31464792
Change-Id: I5ee13dc71e566831c02d5ced18e0edb0f8b7ac4b
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
65950f639325c0f26bcb897a01eaa05ee749cdfc 11-Jan-2017 Shuo Qian <shuoq@google.com> Merge "Adding unit test for ImsConferenceController"
7b28287c38b7756913e0c0d7cc7fbb526b7d2dfa 21-Dec-2016 Brad Ebinger <breadley@google.com> Block call forwarding calls with custom prefixes while roaming
am: 02dfc68b6b

Change-Id: Ic68cd46290c4d4824a5a867cb9c71b786e550a3e
02dfc68b6b5714ddab5f4d7bbfc984798fd67c04 13-Dec-2016 Brad Ebinger <breadley@google.com> Block call forwarding calls with custom prefixes while roaming

We will now block custom call forward configuration calls that have prefixes
defined in the carrier config while the device is roaming. The call will
not be placed and instead, a UI error message will be displayed to the user.

Test: Manual
Bug: 30458052
Merged-In: I6ecb9628ae2d8f2efe4f2c2d51db7d5b04d0317e
Change-Id: I6ecb9628ae2d8f2efe4f2c2d51db7d5b04d0317e
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
ba27ead75f441e5efc8e00ad4fdaa5f440ac602a 13-Dec-2016 Brad Ebinger <breadley@google.com> Block call forwarding calls with custom prefixes while roaming

We will now block custom call forward configuration calls that have prefixes
defined in the carrier config while the device is roaming. The call will
not be placed and instead, a UI error message will be displayed to the user.

Test: Manual
Bug: 30458052
Change-Id: I6ecb9628ae2d8f2efe4f2c2d51db7d5b04d0317e
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
05ce5e928264fc1232815a7b178e1c2c2e0c732b 15-Dec-2016 shuoq <shuoq@google.com> Adding unit test for ImsConferenceController

Changes for testing:
- modify some Mock/Proxy class for using/testing some final public api
- modify several parts to inject Proxy for testing

Test: Adding unit test for ImsConferenceControllerTest.java
Change-Id: I966ad707e47b98e4adf0e7e180b0ca6ee2a58a11
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
788206f31937671b8c72ab4c202518ba544809d9 12-Dec-2016 Brad Ebinger <breadley@google.com> Merge "Adds SIM PUK locked conditions to e911 calling"
073e3ba3388f0329acfab2127a0e2811c2c91750 06-Dec-2016 shuoq <shuoq@google.com> Adding unit test for TelephonyConferenceController

Changes for testing:
- create some Mock/Proxy class for using/testing some final public api
- modify several parts to inject Proxy for testing

Test: Adding unit test for TelephonyConferenceControllerTest.java

Change-Id: Icdb0ebaf8bdd6ec434804302b08550b6052f428f
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
32925b8b02c82859556c97977d0f01a4d54b80ce 02-Dec-2016 Brad Ebinger <breadley@google.com> Adds SIM PUK locked conditions to e911 calling

-Incorperates logic for PUK locked SIMs when determining which slot to
place the emergency call on.

- Fixes EmergencyCallStateListenerTest as well

- Disables failing VVM tests until they are moved to the Dialer scope

Test: Added e911 calling unit tests
Bug: 31942934
Change-Id: I3ac7b3a81874665eca47297893edd6ee9746e49b
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
1cbd2fc3ae5777031081b8af39b1587db1500c47 28-Oct-2016 Brad Ebinger <breadley@google.com> Modify AIDLs to include Session.Info
am: 97b70bf679

Change-Id: I9b6f1fb4c44dec8a2631903f912f9a13c9a072f1
97b70bf67934579908d72c34445c6211a30d4626 25-Oct-2016 Brad Ebinger <breadley@google.com> Modify AIDLs to include Session.Info

Modifies the IConnectionService.aidl file to include Session.Info
information to pass from Telecom to Telephony, which is used to start
external Sessions in Telephony from Telecom.

Test: Manual testing and Unit Tests pass
Bug: 26571395
Change-Id: I66a96cc5ab425a6bbbb16bd496b0c9a3111b46cb
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
5149f9cd57ed16f3e4560fc96a0b2b7d1d6095db 18-Oct-2016 Tyler Gunn <tgunn@google.com> IMS Conference fixes related to RemoteConnectionServices.

1. In ImsConferenceController, adding the children of an IMSConference
to the list of conferencable connections. This is necessary because the
RemoteConnectionService API does not support specifying a list of
Conferenceables for a RemoteConnection. Where Conferenceables are either
Connections or Conferences. It only supports specifying a list of
conferenceable connections. This is problematic because for an IMS
conference call, a standlone Connection is technically conferenceable with
the ImsConference. As a result, the RemoteConnetionServices API is not
able to support conferencing a standalone Connection into a Conference.
To fix this temporarily, I'm adding the child ImsConference participant
connections to the list of conferenceables for the standalone Conference.

2. In ImsConference, there was an assumption made in "onMerge" that the
Connection merged into the conference was a TelephonyConnection. Because
of the issues in (1), we can't make this assumption. Since the cast
was only there to get at the phone, opted to just use the getPHone()
method in the conf host connetion instead.

Bug: 31464792
Change-Id: I5ee13dc71e566831c02d5ced18e0edb0f8b7ac4b
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
70e31b15fd69f50e07b5e1621673fdab2808ef36 27-Sep-2016 Brad Ebinger <breadley@google.com> Redial on the other slot upon radio disconnect
am: b1ec4c228e

Change-Id: I11550629d3ebb231a3028ac9227e7e3dafafb912
25781a4425782b769444b33275937641607acebc 27-Sep-2016 Ariel Yin <ayin@google.com> Merge "Redial on the other slot upon radio disconnect" into nyc-mr1-dev
b1ec4c228e7af639ad21520a40aaae84a079d338 21-Sep-2016 Brad Ebinger <breadley@google.com> Redial on the other slot upon radio disconnect

The radio now supports the DIALED_ON_WRONG_SLOT DisconnectCause for
emergency calls. If the radio needs the emergency call to be redialed on
another slot, it will send this DisconnectCause.

This change adds the functionality to support the new DisconnectCause
and perform the redial silently in Telephony.

Bug: 31498841
Change-Id: I6a8fa79fe33c04a00c457e33e3eeb182c1a6a821
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
cff27b58eef3ff51391b12e1913659ea6233b8fb 15-Sep-2016 Brad Ebinger <breadley@google.com> Adds Phone Capability check to E911 slot selection

Adds an additional step to the process of selecting which slot to use to
place an emergency call. The slots are now sorted by the number of
available Radio Access family Capabilities and if there are no SIMs in
service, the slot with the highest capabilities is chosen.

Change-Id: Icb0bec51ea4e8f4a6aa4e1baf348a03366b0bfcb
Fixes: 31091840
Fixes: 31621719
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
383eea68ef963e81207c79dda86aaeb44285b251 03-Feb-2016 Wei Huang <wei.x.huang@sonymobile.com> Add configurable emergency call number support

In some region, when user dials emergency numbers, the call will go to
IVR system first and then to emergency center. This behavior causes
delay to let consumer to get help from center. Due to region/operator
requirements, some emergency numbers are required to be set-up as non
emeregency numbers on device. On such device, coverting original number
to emergency number is required under the conditions where only
emergency call is allowed - e.g. no SIM. This patch implements this auto
converting logic and its configurations.
E.g. For Taiwan, 110 and 119 need to be converted to 112 under not
in-service state.

Bug: 28123861
Change-Id: I01b3072ae272c1af8d4a19b2fb6ae451b7268821
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
be89962c279f43a49fd66d8af8345767a9f23039 08-Sep-2016 Tyler Gunn <tgunn@google.com> Cleanup Connections in conference controllers on CDMA<-->GSM change.

When a call switches technology between CDMA and GSM, the
TelephonyConnectionService will end up re-adding it to the appropriate
conference controller due to the original connection change. This is
problematic, as it means that the connection will still be tracked by the
conference controller of its previous technology. Worse yet, if a call
makes a GSM-->CDMA-->GSM transition, it will be added again to the
GSM call tracker.

There is still an underlying issue in that the TelephonyConnection subclass
type doesn't change when the radio technology changes -- that is a larger
issue to solve and should be addressed at some point (ie not now).

To fix this, added code to ensure that connections are removed from other
conference controllers when added, and also to prevent adding duplicates.

Bug: 31288401
Change-Id: I5e95d4f72be6af473eeec1b92f47ad77a783c9b2
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
61ecb59c46919654991e0798bf5daa8b8244378f 09-Aug-2016 Tyler Gunn <tgunn@google.com> Enforce add call logic when placing call.

A previous bug added logic to prevent the "add call" button in dialer from
showing in some situations for video calls. This CL adds in logic to
ensure you also can't dial (via call log, contacts, etc) another call
in this situation as well.

Bug: 30427546
Change-Id: Id731f3761304bbac233c4eef429a2275fb4a0108
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
a254d02fe68c6c896926ec890ddbefd9910384e8 14-Jul-2016 Brad Ebinger <breadley@google.com> Facilitate Hanging Up Pending Emergency Call

Corrects the hangup logic for calls that have not successfully returned
a telephony Connection. Before, we only used to hang up calls that were
backed by a telephony Connection. This made calls hang that were waiting
for the telephony Connection to be established (such as Emergency
Calls or calls with bad service).

Change-Id: Id8a0a5c4e04736e9697323a7fc5bf293fd09e343
Fixes: 29433202
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
9eaef23d17fda6f1cd25c80df93a58e4baa4bcfa 27-Jun-2016 Tyler Gunn <tgunn@google.com> A few conference calling fixes:

1. b/28325313 - When an SRVCC occurs, ensure that a phone account handle is set on
the GsmConnection which is added to Telecom. Also ensure that the
PROPERTY_CONFERENCE bit is set on the connection to ensure that the
InCall UI can display the correct label.
2. b/29059073 - Handle case where a video call is downgraded to an audio
only call, and thus should be able to be merged into a conference.

Bug: 29059073
Bug: 28325313
Change-Id: I56d3f89e4f07d8ad5edc5793fe6094e5887ff786
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
ec6f78f6d85d75acfc0c8696a96b5a694d984844 27-Jun-2016 Brad Ebinger <breadley@google.com> Merge "Changes the order of operations for E911 Calls" into nyc-mr1-dev
0a6f39747d1ccd645931aa5492987ceea1f6747e 27-Jun-2016 Brad Ebinger <breadley@google.com> Merge "Refactor EmergencyCallHelper to better handle DSDS" into nyc-mr1-dev
d21d96f64ed865ccf2b793300c1b2f0a7ce8e3d8 25-Jun-2015 Ajay Nambi <anambi@codeaurora.org> Add support for LTE CarrierAgregation

Note this may be redesigned in O to better handle the
various bitrate/channel combinations in a sane way.

bug:27360321
Change-Id: Iecce27bd348b6d18394b0997169fbff41664d52e
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
5b4e75429424a206d13400732de15d855961fa7a 09-May-2016 Brad Ebinger <breadley@google.com> Changes the order of operations for E911 Calls

Instead of first determining which Phone the call will be placed on and
then turning on that particular radio (when in Airplane Mode), we will
first turn off airplane mode and then wait for the radio to move to the
IN SERVICE or EMERGENCY CALLS ONLY state before deciding which Phone to
use to dial.

For calls that are not being placed in APM (including E911
Calls), the outgoing call flow will not change. The only difference will
occur when an E911 call is placed in APM. In this case, we will always
assume the call is placed as a GSM call and then switch it later if the
Call technology does indeed change.

Bug: 28200728
Change-Id: I93ad44f135777448b138656b9b70e5275719283f
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
12ec7f2f001560d935cb3399d9e65bf078ee4760 05-May-2016 Brad Ebinger <breadley@google.com> Refactor EmergencyCallHelper to better handle DSDS

Refactor EmergencyCallHelper to better handle DSDS radios by disabling
airplane mode and waiting for each Phone's ServiceState to change to
allow for Emergency Calling.

Also, some tests are added using AndroidJUnit4Runner

This is the first part in a series of changes to the Telephony code.

Bug: 28200728
Change-Id: I642615480090f0b047cea00ab9f3256f321dfaa1
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
dc5c9d8c04b6f30f3e9a0fe32567c67f9f5188a8 17-May-2016 Brad Ebinger <breadley@google.com> Iterate through Phones when routing Emergency Call
am: 0159eeb32c

* commit '0159eeb32c48ecb17856d54f193deb2f04323285':
Iterate through Phones when routing Emergency Call

Change-Id: I8993a736e2371f45bbfb04f63a75b516271edfbf
0159eeb32c48ecb17856d54f193deb2f04323285 06-May-2016 Brad Ebinger <breadley@google.com> Iterate through Phones when routing Emergency Call

Iterate through the Phones directly instead of iterating based on the
Sub ID. If there are no SIMs in the device, then this approach did not
work historically (and would always use the first Phone).

Also, re-order the logic for getFirstPhoneForEmergencyCall to first
consider the user's voice calling preference, instead of always using
Slot 0.

Change-Id: Ib77347373ed98b138effe3c4735edb4eaa650aa5
Fixes: 28598339
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
61892bf4afe83b926eb8cc40245d7602b02034e0 02-May-2016 Tyler Gunn <tgunn@google.com> Add ability to disable video conferencing.

- Added check for carrier config in TelecomAccountRegistry.
- In TelephonyConnectionService, modified th existing
"setConferenceSupported" check to also check if this is a video call and
if video conferencing is supported.

Bug: 27658118
Change-Id: I222b4d1fb4a1f771394fec01a8300f8bdaffd2db
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
bd952df9d212d1b4b0ca176ed749fdcccf99feac 22-Apr-2016 Brad Ebinger <breadley@google.com> Check Phone's ServiceState to see if it accepts Emergency Calls

When both SIM are PIN/PUK locked, only the SIM set as the default Data
SIM will allow outgoing Emergency Calls. Modify
TelephonyConnectionService#getFirstphoneForEmergencyCall to always
choose the SIM slot that allows emergency calling.

Change-Id: Ie2957f51f8713eec316252dc9e29d4f47ec78eae
Fix: 28320008
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
060da616f8ed56189b04300d04cad3d22ef508d1 15-Apr-2016 Brad Ebinger <breadley@google.com> Fix emergency call logic for DSDS in SIM2 slot only

Currently, if a DSDS phone is in Airplane mode and there is a SIM only
in the second slot, Telephony will default to using the first SIM slot
when it restarts the radio to make an emergency call. Since there is an
active SIM in slot 2, the radio will not place the call on slot 1 and
fail. This change corrects the emergency call logic to use the first SIM
that has an ICC ID.

Change-Id: Ia80f5b9581aa329b39d23b0f639a96fee0b0fa14
Fix: 27797776
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
d3edc2292d969ecf8df96281c50e1a8f7a3fc777 24-Mar-2016 Brad Ebinger <breadley@google.com> Use Emergency PhoneAccount for MT ECM Call on no SIM

Use the correct Emergency PhoneAccount for a MT call on a phone with no
SIM that is in ECM. Also, reject incoming SIP calls that are received on
a disabled PhoneAccount instead of crashing the Phone process.

Bug: 27820226
Change-Id: Iab81df05ba9c4f94f08576baee47475d59760a13
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
5046bc73a9bb72c6f6f9f913def0c71d551da62d 26-Mar-2016 Tyler Gunn <tgunn@google.com> Add support for adding external calls to Telecom.

- Modify PstnIncomingCallNotifier to include the external call ID in the
"addNewUnknownCall" request to Telecom; this ensures we can key back in on
the ID when Telephony is asked to add that connection.
- Modify TelephonyConnectionService so it can add new external calls.
- Update TelephonyConnection to translate the new internal connection
properties related to multi-endpoint to ones Telecom can relate to.

Bug: 27458894
Change-Id: I47ad22aaeed955bcecbae894486c00539f8f7ea7
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
3da7fe7713c1dfec37c2ccca2c49cd9cdf47d977 25-Feb-2016 Santos Cordon <santoscordon@google.com> Merge "Prevent adding a new CDMA call if know it will fail." into nyc-dev
7659c8c6d8660b61b6c8a2ad72b68c618873c8de 16-Feb-2016 Santos Cordon <santoscordon@google.com> Prevent adding a new CDMA call if know it will fail.

See code change for additional comments.

The same CDMA command is used for merging two calls, swapping between
two calls, and adding a new call on CDMA devices. The actual function of
the command depends on the context. Instead of issuing an 'add-call'
when we know the function will do something different given the
context, send back a more meaningful error.

Bug: 22850789
Change-Id: I45b51b15f3ef2f144411db5df86536704bd1201d
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
4f8fe8d80917ae07f8a763f3d35ae1ffac970382 18-Feb-2016 Tyler Gunn <tgunn@google.com> Fix inability to make emergency call when call in progress on multi-sim.

When there is only a single sim in the 2nd sim slot on a multisim device,
if it not possible to make an emergency call when there is an ongoing
call on that sim.

The root cause of the problem is that getPhoneForAccount returns the
default phone if we are making an emergency call. In this case, the
default phone is sim 1, and it is out of service due to the fact that
sim 2 is in use for an ongoing call.

The fix for this is 2-part:
1. We will always use the accountHandle associated with the call (the
CreateConnectionProcessor in Telecom has emergency calling logic which
assigns this phone account in the first place, so it is reasonable to
assume that it is a good first attempt).
2. If the phone for that phone account is not in service and this is an
emergency call, we will use the "getFirstPhoneForEmergencyCall()" method
to find an in service phone on which to attempt the call (this is
existing code which was orphaned at some point). That code will fall
back to the getDefaultPhone() if no in service phone is found.

Bug: 22776038
Change-Id: I398ff5d7c4c278a2c8385cb7e32cc3e4116028a9
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
1ee685009afa5064d1e2f6dab3eb33e9623be928 02-Feb-2016 Tyler Gunn <tgunn@google.com> Merge "Prevent video calling when tty mode is enabled." into mm-wireless-dev
am: 27632c2692

* commit '27632c2692d9cb324c340478494e59a9ff0f9ebe':
Prevent video calling when tty mode is enabled.
2d6dc18f9cb17c4f35fdb594eb90003764bb9336 29-Jan-2016 Tyler Gunn <tgunn@google.com> Prevent video calling when tty mode is enabled.

This code was originally in Telecom, and it really didn't belong there.
If TTY is enabled and the user attempts to make a non-emergency video
call (same check as was in Telecom), we will fail the call with a new
disconnect cause.

See screenshot in the bug if you're curious what this will look like.
This code uses the existing code in InCall to inform the user of a failed
call reason.

Bug: 20090652
Change-Id: Iadb537e63f9eaa7b2502639d58ce2abf17511f6f
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
e7939d87e0758327ebed3f433326aef75b887331 11-Dec-2015 Jack Yu <jackyu@google.com> Merge from master

Change-Id: I20c8bb451376e78b306ac231cf3d6a239a72267e
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
9cf11515781910c7fda66a8a27a0fa14ab1ed2af 09-Nov-2015 Amit Mahajan <amitmahajan@google.com> Phone refactor (merging Gsm and Cdma phones)

Bug: 25793157
Change-Id: I8539846dcb8a3a8971616e63aa8b373ab1032259
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
44525f95e0f94bed94143633a780c184c4c4b278 04-Nov-2015 Hall Liu <hallliu@google.com> Remove hold and merge from emergency calls

Removes the ability for emergency calls to be placed on hold or merged
with other calls into a conference.

Bug: 25219137
Change-Id: Iaf77394491542ccd3200287a917154174cb150c5
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
12979bd81e68fe5b4e6b8ae9c889ec7ad63f2110 17-Sep-2015 Tyler Gunn <tgunn@google.com> Merge "Propagate telecom call ID to Telephony classes."
1cf18c55c3764faa21a6690cebe6d09470ed1200 01-Sep-2015 Tyler Gunn <tgunn@google.com> Propagate telecom call ID to Telephony classes.

Propagate the telecom call ID to the Telephony Connection and Conference
classes.
Modify debug toString statements to output the telecom call ID.
Propagate the telecom call ID to the internal telephony Connection
classes.

Bug: 23357902
Change-Id: I7e78c69673084a4a3d39d1e8d7a6cd7f1bc7177e
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
6ad0dba3cab65c93b3b500569d847e0bdd76fcd5 31-Aug-2015 Tyler Gunn <tgunn@google.com> am 92462cfa: Prevent non-emergency calls in ECM mode.

* commit '92462cfafde010ce492420ab9c1e91e73d9cc57a':
Prevent non-emergency calls in ECM mode.
92462cfafde010ce492420ab9c1e91e73d9cc57a 31-Aug-2015 Tyler Gunn <tgunn@google.com> Prevent non-emergency calls in ECM mode.

Some carriers prohibit making non-emergency calls when the phone is in
ECM mode.
Add carrier config to control this and blocking of non-emergency calls when
in ECM mode.

Bug: 23063217
Change-Id: I4d8a31f8883af7c443b709e19dd86153c015f5a6
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
a595eae058e0deed5aeba9622c9484dfa921fdf0 20-Aug-2015 Tyler Gunn <tgunn@google.com> am 64220bcf: Support connections which do not allow conferencing.

* commit '64220bcfad27244b223f9c4377b85e1be95ca328':
Support connections which do not allow conferencing.
64220bcfad27244b223f9c4377b85e1be95ca328 20-Aug-2015 Tyler Gunn <tgunn@google.com> Support connections which do not allow conferencing.

Check carrier config in TelecomAccountRegistry when registering
PhoneAccounts. When creating new TelephonyConnections, set a propery
on the connection to indicate whether it supports conferencing. This is
then used in the conference controllers to determine whether a particular
connection can be in a conference with another connection or not.

Bug: 22864941
Change-Id: I199cbc1c9ad575732c5601a9bb587c8bca4815da
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
188950b4a717d32a67032282c000a5f2ce178955 14-Aug-2015 Etan Cohen <etancohen@google.com> am 746e32b8: am 5cb43e44: Suport IMS services (SRLTE and non-SRLTE)

* commit '746e32b8fb286d6b53660a999ec75ea2479fd4e8':
Suport IMS services (SRLTE and non-SRLTE)
746e32b8fb286d6b53660a999ec75ea2479fd4e8 14-Aug-2015 Etan Cohen <etancohen@google.com> am 5cb43e44: Suport IMS services (SRLTE and non-SRLTE)

* commit '5cb43e447fef2dc48b07a21a602c1bef1079e365':
Suport IMS services (SRLTE and non-SRLTE)
5cb43e447fef2dc48b07a21a602c1bef1079e365 12-Aug-2015 Etan Cohen <etancohen@google.com> Suport IMS services (SRLTE and non-SRLTE)

Make sure that data registration state is only checked for LTE connections.

Bug: 23037591
Change-Id: I2f03788d63d35972c9d3dac96339aa2faf872584
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
8262cd51af5068eb531443d59867f57ffbaafcf3 07-Aug-2015 Anthony Lee <anthonylee@google.com> am 2711ed3e: Merge "IMS: Handle SS during OOS scenarios" into mnc-dr-dev

* commit '2711ed3eb59f5158e6e2452df626662e4517e27e':
IMS: Handle SS during OOS scenarios
1c0b5159d58b5e314856d878a7379ba6564d39f5 08-Apr-2015 Anju Mathapati <anjucm@codeaurora.org> IMS: Handle SS during OOS scenarios

When service state is OOS, check the
UT capability. If enabled, then process
the dial request

Change-Id: I28d2ac3f211440c8bb8a739869831b597090e832
Bug: 21850717
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
9eab038b56147747d46e88c54822e50f836dc258 30-Jul-2015 Wei Liu <luciferleo@google.com> Move the SIM state check to the Telephony package.

b/22720688

Change-Id: I860366d308034da61b4fa0fb243d89216eddfb62
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
9fc34003967e97dec9cc82843bc781e24b57cb87 10-Jul-2015 Santos Cordon <santoscordon@google.com> am 93d592d1: Merge "Only turn on radio for exact-match emergency numbers." into mnc-dev

* commit '93d592d1378e7683208b1db539e042ac5a878a3f':
Only turn on radio for exact-match emergency numbers.
4e3eacd912b82a005e39ef3b1d25baf2e0196670 09-Jul-2015 Santos Cordon <santoscordon@google.com> Only turn on radio for exact-match emergency numbers.

This change matches the old, correct behavior from kitkat.

Bug: 21650423
Change-Id: Iad2651e86cea1c0c6cdb8ce63c5c223932412386
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
ff4a65270ffdeaa6f4955a3d0b1c3b22a9a7d656 16-Jun-2015 Anju Mathapati <anjucm@codeaurora.org> IMS: Add support for MO ims phantom call.

Consider foreground call connections from ims phone also,
while checking for unknown connections.

Change-Id: Icac930bb9ebf255f47115f6758754eac2fbb12b4
Bug: 21877055
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
cd3b79cc1d3fbb5f77ab17fc2756c75fe7ff9ef7 20-Nov-2014 Shriram Ganesh <sganesh@codeaurora.org> SRVCC Conference call scenarios with mid-call enabled.

1. Disconnect all IMS conference participants on Handover. Create a
telephony connection out of the original connection part of
IMS conference host and add that to Connection Service as an
existing connection. Add the new Telephony connection to the
conference controller.

Telephony Conference controller delays the attempt to add the
conference to the connection service, until all the participants
are already part of the ConnectionService.

Retrigger the conference recalculation of conference controller
after a Unknown connection is added to ConnectionService.

2. Add support for SRVCC conference with greater than 3 participants

After the Gsm Conference object is created with the first two
participants, delay adding the subsequent unknown connections to
the conference until the connections are added to connection
service.

3. Add support for using the CS connection address during SRVCC

The check for pre-handover state is only applicable to IMS
connection. Compare the state of new handover connection with
pre-handover state of Ims Connection to process the correct update
corresponding to the TelephonyConnection.

Change-Id: I2ab2ee02a83bf8555856ccdba3de0aae75041f9b
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
6f0a305a9fce78adafe2161be5fc8919bb483b14 29-Jun-2015 Junda Liu <junda@google.com> Read KEY_DISABLE_CDMA_ACTIVATION_CODE_BOOL from carrier config.

Carrier config manager supports subId and GID natively so the code is
much cleaner.

Bug: b/22229196
Change-Id: Iaa88b0586a0dcde630606e12dd3ddfa3b8b1126b
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
734132fa65036d0b1932364849b0262c84442fe8 05-Jun-2015 Shriram Ganesh <sganesh@codeaurora.org> IMS: merge option not shown after srvcc

After srvcc, conferenceable property set by the Telephony connection
service is getting overridden by Ims conference controller. So remove
the connection from Ims conference controller after adding it to
Telephony conference controller.

Bug: 21953444
Change-Id: I5e4ec8b8c7c96f4d8049344beaa117b976db9cea
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
c3dd578a158e210b2ddf9056546905143397288f 20-Jun-2015 Santos Cordon <santoscordon@google.com> Merge "Plumb intent extras through to IMS phone." into mnc-dev
5a9d11aa4a1cc2746898a93a501f0835c6405fa1 13-Jun-2015 Santos Cordon <santoscordon@google.com> Plumb intent extras through to IMS phone.

Bug: 21735451
Change-Id: Id2016d222b226b9db6ef45c8f599a19ae1d9957a
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
af2b70218787ec23cf547888eae401d094c5633b 15-May-2015 Chao Liu <yjl@google.com> Always provide the string reason to telecom DisconnectCause.

Original partner change:
https://partner-android-review.googlesource.com/#/c/215711/

Change-Id: Ic558a074dc91150d9e7d8abecbc52f18b926bc0c
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
8fb4b652b3607f0063806c29138840102a5bba05 17-Jun-2015 Andrew Lee <anwlee@google.com> Show custom message for CDMA disconnect error.

Bug: 19296388
Change-Id: I0f00b04e22a4871098004f9e20ae599c0995bd97
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
919c364688afa90c50fb5072304c32428d7f7ca8 28-Apr-2015 Santos Cordon <santoscordon@google.com> am f4eb4735: am 05071b25: am 4670a7c8: Fix NPE in TelephonyConnectionService.

* commit 'f4eb47355fac3307f3a6c2d9b2ae224442526b0f':
Fix NPE in TelephonyConnectionService.
4670a7c82033362d5465e5967074c92089604eb8 28-Apr-2015 Santos Cordon <santoscordon@google.com> Fix NPE in TelephonyConnectionService.

Bug: 20616601
Change-Id: I2a30b2ea11abbe3ac3370150e67db1fa5ab5cd70
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
28f4f63fe882d6d87b583bf82b7381b935d3d475 27-Apr-2015 Andrew Lee <anwlee@google.com> am ec1bd003: am d3b6288f: am d8978ce8: Provide config for excluding CDMA activation code.

* commit 'ec1bd00354a5fec3e7a55c4f22328feb33845f87':
Provide config for excluding CDMA activation code.
d8978ce8f61b3145b77f5526bb7efe697f5fd614 22-Apr-2015 Andrew Lee <anwlee@google.com> Provide config for excluding CDMA activation code.

Bug: 19296388
Change-Id: I97d7f495b38df0c878f1742fc1677a769dc5ad6a
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
261a25f305b83680853fb703dc96ff90617ba1dd 24-Apr-2015 Andrew Lee <anwlee@google.com> resolved conflicts for merge of af911232 to master

Change-Id: I9f2a1cf712a9a8c8069410f113fd82e888920cec
5e31872ceaa9b21f34588d7353a4ad2812b3b536 22-Apr-2015 Andrew Lee <anwlee@google.com> Provide config for excluding CDMA activation code.

Bug: 19296388
Change-Id: Ic6c484b8e29bd1c60a3366e6d43ded80930cad2f
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
cffac94ad7617f75295556656c880621ecd2c964 08-Apr-2015 Tyler Gunn <tgunn@google.com> Cleanup of Video Call pause functionality.

Whether the paused videoState is available is dependent on the carrier's
implementation of the VT spec. The original VT implementation assumed
that this was stored in a system property accessed via InCall; these CLs
move this to a Call/Connection capability which will ultimately support
multisim video capable devices.

- For MCC/MNC 310/410, disable pause of ims video calls.
- For MCC/MNC 311/480, allow pause of ims video calls.
- Default for others is allow pause.

- Modified TelecomAccountRegistry to store flag indicating which accounts
allow pausing of video. If account doesn't support video, pausing is
inherently not allowed either.
- Modified PstPhoneCapabilities notifier to add listener which calls back
to TelecomAccountRegistry#AccountEntry to notify when the video capability
has changed, triggering the AccountEntry to refresh itself accordingly.


Bug: 16680364
Bug: 19820114
Change-Id: I3840f92270100811161120dffcfe297bef7c4ea2
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
0536d11757f3c824cc0efb3f822a6e0c3b9daeec 30-Mar-2015 Pavel Zhamaitsiak <pavelz@google.com> Handle new error code in CallStateException
automerge: 87050c6

* commit '87050c69ed4c62d5fddc494eb1a9b85a23d78214':
Handle new error code in CallStateException
87050c69ed4c62d5fddc494eb1a9b85a23d78214 25-Mar-2015 Pavel Zhamaitsiak <pavelz@google.com> Handle new error code in CallStateException

Bug: 19583351
Change-Id: I49d26ebbbcc5a006ce0a57170074224ac447e86f
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
21e78ace4e0366ad2bc7f39406b7fa8dff2bd407 06-Feb-2015 Santos Cordon <santoscordon@google.com> Consolidate subscription ID acquisition.

Update TelephonyConnectionService to use
PhoneUtil.getSubIdForPhoneAccount instead of duplicating the code.

Change-Id: I7fbbc406a45ccea0e7a544d311878697562273b8
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
1a7ab1a2b221d1bf4a32a3f1dd66baf809995913 18-Feb-2015 Andrew Lee <anwlee@google.com> Check radio, not ServiceState, for if radio is on.

Cherrypicked from m-wireless-telephony-dev branch.

For E911 calls, pre-empt user WFC settings by always turning on the
radio so we can make a best-effort attempt to complete the call.

Formerly, we checked the ServiceState for STATE_POWER_OFF to indicate
the state of the radio. However, with WFC, the ServiceState could
return IN_SERVICE if connected to a Wifi network when the radio is
powered off because of airplane mode.

Instead, now we check for the radio's power state directly, and power
it on if necessary using the EmergencyCallHelper before attempting
the outgoing call.

Bug: 19151398
Change-Id: I15bac137b402455177ad94e43da7aa18fa3f78c0
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
0918d946e9711796acd766bac053b6dedf21f079 13-Feb-2015 Ihab Awad <ihab@google.com> Handle unknown connection from technology swap

If an unknown connection is seen from the Telephony layer, attempt to
use it to replace a matching, existing connection, since that
situation may occur when the underlying technology changes in the
radio layer.

Bug: 19363089
Change-Id: Ibe5b89cc791c2d7e8dfac91c47636361796d68cd
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
413a2df348c4fc411042a10264e3c0a99b982e9f 10-Jan-2015 Santos Cordon <santoscordon@google.com> Choose active SIM on MSIM devices when making emergency calls.

We previously always chose the default Phone object for emergency calls, which
forced us to try to dial with the SIM in slot1 always. When the only SIM
is in slot 2, this caused the call not to go through.

Fixed to choose the SIM that was given to us and if that fails we move
on to the first active SIM and if that fails, *then* we opt for the
default phone.

Bug: 18746266
Change-Id: Ia005c1b2e9d1a08e9ab119f799552c97316f0853
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
a9142d711a6309d7095d9d6f666d6175ecf79d39 13-Nov-2014 Anju Mathapati <anjucm@quicinc.com> Check both voice & data registration state for MO Call

MO call should be originated even if voice is OOS
but data is in service.
Use combined registration state to make MO call

Bug: 18625796
Change-Id: Ibc7c5182bd0d7eb54a58e088d174347b33b82b30
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
00bce13d80bfe8f8b2fff17c75fe2b27b57568f6 03-Dec-2014 Uma Maheswari Ramalingam <umam@codeaurora.org> IMS: Fix phone app crash

During an active 3 way conference receive an incoming call will
crash the phone app when CEP is enabled.

As a fix, avoid checking the conference connection.

Bug: 18625578
Change-Id: Ia96ae8f2e8ecdfae9f2be3c761400bd09c4d0c94
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
725657d03a0f96af1b78d9987b6ee93347499ddb 03-Dec-2014 Nancy Chen <nancychen@google.com> Change the message for when there is no SIM to be more descriptive.

Currently it says "Can't call", switching to "Cellular network not
available."

Bug: 18590972
Change-Id: Ia3d6b1dcf7cfbbd9c2d9e2ebd319c66da85170cb
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
2c248f38ac4c7fefc50fb9c595b6cbf2798c0632 19-Nov-2014 Tyler Gunn <tgunn@google.com> Create IMSConference to represent IMS conference calls.

- ImsConference contains a "host" connection which is the radio connection
to the IMS conference server.
When a new ImsConference is created, we wrap the radio connection in a
new TelephonyConnection which is not added to Telecom; this is stored in
the ImsConference and provides a means for the conference to be notified
of disconnect/hold of the conference connection.
Next, the original TelephonyConnection is disconnected and the conference
is added to Telecom.
- The ImsConference manages its own conference participants directly
rather than through the ImsConference controller.
- Added a new ImsConferenceController since it is sufficiently different
from how the generic TelephonyConferenceController works.

Bug: 18200934
Change-Id: Ia32c2111173c69be7b05ed76a038fb571c2e726b
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
ad6f3dce3b32d69fb2a353753163358f88708405 07-Nov-2014 Tyler Gunn <tgunn@google.com> Conference event package performance improvement.

- Instead of sending each participant to the telephony conference
controller, all participants are sent at once. This way the conference
only needs to be recalculated once.
- New connections are created with state NEW so that they are not shown
in the InCall UI.
- Once the conference is established, the state of the connections is
set appropriately based on the information in the conference event
package.

Bug: 18057361
Change-Id: Ibdb5cb940f15ab6d872bf1ef8c99a1a9ebae7b6e
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
1734de28c0eda0d8303be39c9342b618f9f938db 07-Nov-2014 Anthony Lee <anthonylee@google.com> Add connections to conference controllers when original connection is valid

The only way that we can determine if we should use the Telephony or CDMA
conference controllers are once the underlying original connection is set.
Until it is set, we cannot guarantee that we'll get it right. This CL introduces
some plumbing that allows the TelephonyConnection to notify the
TelephonyConnectionService when this occurs so that it can take action
at the appropriate time.

Bug: 18240234
Bug: 18056632
Change-Id: I54b4d9821b94085e639c35f2fe3569b4eed67f88
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
b564aaeff3b6c4b20c899b8c254e4622b691d0cf 23-Oct-2014 Wink Saville <wink@google.com> Change subId to int from long

Change-Id: Idae6335e63e7b1e4e714bc17e71b1a4705e38474
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
e0579cd4fe5ff4236d9684de1af27ef49564828c 21-Oct-2014 Andrew Lee <anwlee@google.com> Convert GsmConference into more generic TelephonyConference.

+ Retype Conference and Controller to handle TelephonyConnections
rather than GsmConferences.
+ Rename classes.
+ Add connections to TelephonyConference if IMS is supported, and
the original connections are IMS connections (even if the
TelephonyConnections are CdmaConnections).
+ I haven't been able to test these VOLTE changes on CDMA because
of network instability. For existing GSM calls, TelephonyConference,
and TelephonyConferenceController should not cause any changes. We
need to verify that these work properly with IMS on CDMA phones.

Bug: 18062269
Change-Id: I2d7f717b2560b69c6579072dcdd5bec583062b38
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
d480d1d1be5e585d735121fc35c79fe161146470 09-Oct-2014 Jay Shrauner <shrauner@google.com> Fix NPE when phone is null

Null check Phone returned by getPhoneForAccount as is done elsewhere.

Bug:17899209
Change-Id: I50b943e45d18fcf08846f6eca82ccbb77a67e7e0
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
0482295909da597068f093802a7f39e279b44e23 07-Oct-2014 Yorke Lee <yorkelee@google.com> Fix crash during incoming CDMA calls

This was a regression from a previous change to allow for connections
to be created for previously unknown calls. The culprit was a change to
set the state of the newly created connection based on the current state of
the original connection.

Setting the state inside the Connection constructor code path had
unintended side effects because some state listeners were relying on the constructor
to have completed first.

Since not setting the state has worked fine so far for incoming and outgoing calls,
only do it explictly for unknown calls, and outside of the constructor so that
we can be sure that everything has already been initialized.

Bug: 17892446
Change-Id: Ib3c37d373f0f64205ad688a98b94e46f5bc44199
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
3f7f717a2295f9ae5cc6a34ed404ec22e94012da 02-Oct-2014 Yorke Lee <yorkelee@google.com> Add ability to add sim-initiated MO call to UI (1/4)

Listen to new unknown calls in PstnIncomingCallNotifier, and add them to
Telecom when a new unknown connection is detected.

Bug: 16852844

Change-Id: I8c1e3fcd0724d22839e6af388b0bbed90d5f7c9a
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
5c046727927b8cb766ad937bc89687fd1dfd1b4f 19-Sep-2014 Santos Cordon <santoscordon@google.com> Add support for Emergency Tone on outgoing Cdma Calls.

Move the old Emergency Ringback code from CallNotifier to new
EmergencyTonePlayer class and invoke that class from CdmaConnection.

*Also removes non-functional ringback code from old codebase.

Bug: 17452018
Change-Id: I92081ecc683f6b354eeca539ec7f170e7a5cec71
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
aef7a4bc4f85149de427d7506ebe97753b2ca6c2 12-Sep-2014 Andrew Lee <anwlee@google.com> Use newly added Telecomm DisconnectCase.

+ Add utility, DisconnectCauseUtil, to convert from telephony
DisconnectCauses to telecomm DisconnectCauses. For this, map
from specific disconnect causes into a more generic set which
the UI is concerned about. Provide user-localized strings or
tones for certain cases.
- The string conversion sucks a little because it covers both
strings which are intended to be show in the InCallUi (short)
and messages which are to be displayed to the user in a dialog
when there is some termination (long). =(
+ Where possibly, use this utility for converting error
messages as well.
- Not able to convert with message and tone for many of the
failure cases, because no context exists for obtaining the
message to display.

Bug: 17329632
Change-Id: I84ee358cc8e014f110bab4c0ae7c1cb02aeebdf6
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
4d45d1cf58a2003378fd35912d6d73a00001bf06 13-Sep-2014 Tyler Gunn <tgunn@google.com> Renaming Telecomm to Telecom.

- Changing package from android.telecomm to android.telecom
- Changing package from com.android.telecomm to
com.android.server.telecomm.
- Renaming TelecommManager to TelecomManager.

Bug: 17364651
Change-Id: Ic33bafd37200e65431543a9889aed549dbb04831
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
14bf354aab420fcd099cd0209238d7b92dad6f1d 09-Sep-2014 Andrew Lee <anwlee@google.com> Rename from "handle to address".

Bug: 17329632
Change-Id: Ib947b16cffee343bc7ca36d03617d1f7e4b3bd1c
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
0a83a3500d9ed496ea410ff2fe9127b8d701d7f0 08-Sep-2014 Nancy Chen <nancychen@google.com> Merge "getHandle -> getAddress (ConnectionRequest)." into lmp-dev
c2d0e8c8aaac5ec4ad394c5824f6c3265f751977 06-Sep-2014 Nancy Chen <nancychen@google.com> getHandle -> getAddress (ConnectionRequest).

Made changes per API review.

Bug: 17329632
Change-Id: I6f2043d6293f3a369c4f4ecfca996ae2061634d2
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
137458b4bf3516941483e59c123c22cbee27ed43 05-Sep-2014 Jay Shrauner <shrauner@google.com> Use framework scheme definitions

Use PhoneAccount defined values for SCHEME_{TEL, SIP, VOICEMAIL}.

Bug:17398074
Change-Id: I36adb16f659daef89957072f9e00d08ea2cb8e9e
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
a956f73382c3aa2619c73b880a11ee1899c2fe18 04-Sep-2014 Santos Cordon <santoscordon@google.com> Add support for Multiple calls on CDMA devices.

Includes changes for call-waiting, adding outgoing calls, mergig and
conferenceing.

Bug: 17316859
Change-Id: Ia71c1b9b61d93a40cd717e74b33786ae07b656b6
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
4019198adfcf60599d164e72c207a9b4d2cbf045 04-Sep-2014 Nancy Chen <nancychen@google.com> Merge "Handle voicemail: -> tel: translation in Telephony (was in Telecomm)" into lmp-dev
dea0f83220b0249335e5009c3efe64a7ab170c0a 03-Sep-2014 Nancy Chen <nancychen@google.com> Handle voicemail: -> tel: translation in Telephony (was in Telecomm)

TelephonyConnectionService should determine the correct number to call
for voicemail handles. Originally Telecomm (NewOutgoingCallBroadcaster)
handled this, but Telecomm is blind to the proper subscription to use.

Bug: 17317190
Change-Id: I1e9f97fc5176c7e3158eaf0867a137aced58121d
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
af4b3fd88b5412fbd644b1a4b9d1909c25681d4c 30-Aug-2014 Nancy Chen <nancychen@google.com> Remove onConnectionAdded/Removed from ConnectionService API (2/2)

These methods are no longer needed because they are redundant. Refactor
SipConnectionService and TelephonyConnectionService to accommodate.

Bug: 17262026
Change-Id: If134e2785f1fa2cff59157b23710d1a3053f17e4
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
625eb0b8f6e52e7ac1b5a499c5e1964812911913 28-Aug-2014 Tyler Gunn <tgunn@google.com> Support CDMA emergency callback. (1/2)

1. Update emergency callback mode notification icon and update creation of
the notification to use a builder.
2. For CDMA calls, if phone is in ECM mode, disable mute in the
Connection PhoneCapabilities.

Bug: 16182748
Change-Id: I698eb7d377346467fc4b87a0bec53d89f96797b1
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
b7795cf75d54752c7d0d1fd59870d5c3d5fe662e 20-Aug-2014 Santos Cordon <santoscordon@google.com> Allow emergency calling in airplane mode without a SIM.

If we end the EmergencyCallHelper with STATE_OUT_OF_SERVICE, attempt
to place the call anyway.

Bug: 17041511
Bug: 17065146
Bug: 16993846
Change-Id: I9a8843f1407943dedd1e6331a7f46fea3f586c9a
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
93a734df1d69df54ae58af0944c79b33aef7782d 18-Aug-2014 Ihab Awad <ihab@google.com> ConnectionService API has only one completed callback (3/3)

Refactor ConnectionService API so it has only one "completed"
callback, and connection state and failure codes indicates what
happened. Previous design where we had separate callbacks for failure,
cancellation and success was error prone because it was easy to forget
to implement one of them.

Bug: 16993846
Bug: 17070939

Change-Id: I304c58814c110d771ae019c9b9fda1ce42f81c2f
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
75f3487887076eae1ef45f2ecab42c078173b517 18-Aug-2014 Tyler Gunn <tgunn@google.com> Merge "Fixing bug in onCreateOutgoingConnection where videoState was not set on the newly created connection." into lmp-dev
53b84fe2dc796ef172d7c0f4b9bdc177cdeb0c0f 13-Aug-2014 Santos Cordon <santoscordon@google.com> Implement new Conference APIs.

Bug:16844332
Bug:16449372
Change-Id: Id2e1e4996c19ca1fa4f37e1ec6597f3a15676aa8
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
d6867b73e7866ac45fdbae26edf81967fdb3dd7c 18-Aug-2014 Tyler Gunn <tgunn@google.com> Fixing bug in onCreateOutgoingConnection where videoState was not set
on the newly created connection.

Bug: 16285417
Change-Id: Ia8d7cc8f360f8506ef9c82de3a607ee6e88db304
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
59eac9b0b93b6c9678c76e3fcecf56b010dadf72 15-Aug-2014 Ihab Awad <ihab@google.com> Fix problems with SIM-less emergency dialing

Bug: 17012444
Change-Id: I9fadc8f6e2f78111fdf87e38905e60ced74fd1ac
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
07710f109c2752e4e8d754078e2d5bdad2572e93 12-Aug-2014 Yorke Lee <yorkelee@google.com> Fix MMI code handling

Telephony should launch MMIDialogActivity to display the current
status of execution of the code if the dialed number is actually an
MMI code.

Bug: 16305480

Change-Id: If8c4624cc74c55ac213e042c73745ef4f1c38d3f
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
76f3b4ec8d9bcb8926db1b3e4fb2d1e969b09fbb 08-Aug-2014 Ihab Awad <ihab@google.com> Final structural tweaks to Telecomm API (5/8)

Bug: 16416927
Bug: 16494880
Change-Id: Ibc2ba9e5d17242380ed3afed359600362bb3e664
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
a5cd6c840766ca3e54d8292db4a03ac16a30ff09 09-Aug-2014 Santos Cordon <santoscordon@google.com> Ensure Radio is on before dialing an emergency number.

Code got into a state where we were creating a Connection object to
return synchronously and then starting the Emergency Call helper after
that. The problem is that the synchronous creation code kicked off a
"placeCall" attempt which would fail because airplane mode would be on.
We still turned on the radio but it was too late.

This change makes it so that the synchronous Connection creation is NOT
tied to the placing of a call. Instead, we create the connection and if
it is a non-emergency call, place it, otherwise, start the emergency
call helper and wait for that to place the call.

It required that the telephony-Connection object not be set in the
constructor but instead be set through setOriginalConnection().

Bug: 16885688
Change-Id: I4acf62d34b710c2fe3439fead33b06078f5a36bf
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
da120f4e3d32ca97c5b4c21d6c505d834a29ab8d 06-Aug-2014 Santos Cordon <santoscordon@google.com> Remove ldaps from AOSP code.

Bug: 16327484
Change-Id: Ic51f12e52db0839a9ee6b727755873edf65cd044
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
b2fe86674bf81fe60133869a03c9d4aa0bf85f0a 26-Jul-2014 Ihab Awad <ihab@google.com> Connection creation and service wiring for WiFi call managers (3/3)

Bug: 16469413
Change-Id: I17a1062c48d59865708cdcfb8f570257223a209a
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
aaf3850172bde1fec1a4558653c0edd31e3fa71f 21-Jul-2014 Evan Charlton <evanc@google.com> Use the synchronous Connection creation API

Update to make creating a Connection a synchronous operation.

Change-Id: Ibbf896e5b188b98eb386d6624d3a5d5cacf49922
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
9545abb333d2c7d7b5b52b0b50cc1bce0f1def3f 25-Jul-2014 Santos Cordon <santoscordon@google.com> Add more disconnect causes 3/4

Bug: 15692074
Change-Id: Ib94c33fac8450b70e53dbe12d71f41777e9e140c
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
e3b3e4df2ca751ff55a34aa95c2722dca1a91924 23-Jul-2014 Santos Cordon <santoscordon@google.com> Fix initialization of SIM accounts.

- Moves setup out of a broadcast receiver and into TelephonyGlobals
- Reruns setup whenever the SIM state changes (hotswap support)
- When no SIM is inserted, register an emergency-only PhoneAccount.

Bug: 16491446
Bug: 16445149
Bug: 16495971

Change-Id: Icee8013c35f7439c58af7b7777af9a99798bff43
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
982433108ea2dc179610fa415d538aa989e68529 22-Jul-2014 Sailesh Nepal <sail@google.com> Fix exception when creating a remote connection

Change-Id: Ib55b2bc3ca8c6f3703bda9751b16064cd6c01d23
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
f77a3397cb022cb6aa8e7e72a5b14ba29a99563f 22-Jul-2014 Santos Cordon <santoscordon@google.com> Stop showing "Call not sent" for MMI calls.

Bug: 15603571
Change-Id: I50abc4a847f54db74c9c065dcd8d4a302585f659
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
be38fe9cacb6ce161b13f88898cf6264b33fa1c0 21-Jul-2014 Santos Cordon <santoscordon@google.com> Sent initial data to telecomm on connection creation. (3/3)

Telecomm was not sending the initial state for new connections forcing
the connection services to postpone when they set data on the connection
which resulted in hacky code. This CL makes use of a
ParcelableConnection to send the intial connection data.

Change-Id: If571414aba19fa1bb282e30632431962b8366cf4
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
ab777070da7e83983739414f1222177c6aeebe1a 21-Jul-2014 Santos Cordon <santoscordon@google.com> Change telecomm APIs from protected to public (3/3)

Bug: 16416927
Change-Id: I859c80a120fa59bba12a5c6bfca17fa57613a6aa
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
a4d98ab1b82be5f9723c27ee0459b3217b58f030 20-Jul-2014 Evan Charlton <evanc@google.com> Rename PhoneAccountMetadata to PhoneAccount

Change-Id: I4597b14110c1cee7f637ec125b839852ef0f34c4
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
a5a70f9b338cae25046b336a8602f14bc9b86069 20-Jul-2014 Evan Charlton <evanc@google.com> Rename PhoneAccount to PhoneAccountHandle

Change-Id: I2e97b348e6316a8b3ccc39fd81013e7f514a2889
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
5fc83bca2dd6e0c10ab1100b31cc337a370495db 18-Jul-2014 Evan Charlton <evanc@google.com> Always set the subscription number

Always populate the subscription number, and rely on the in-call UI to
show it when appropriate (and in the appropriate way).

Bug: 13333595
Change-Id: I0d3b2cfcea08aeba760c392c116303f21beb70d3
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
7debf0174288630f54813c7ec43ebc6df0a9c69d 18-Jul-2014 Santos Cordon <santoscordon@google.com> Register PhoneAccounts for telephony on startup.

Change-Id: I597a0565696a742540ba7156f17d6b1d188d7eb7
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
3aa862e2331a9733d5cbca24354e42463b3f63d8 19-Jul-2014 Santos Cordon <santoscordon@google.com> Merge "Fixing ADD_CALL (3/3)" into lmp-dev
29b4ce42956dd712dbcc7a75ac90d80e8e333b2a 18-Jul-2014 Santos Cordon <santoscordon@google.com> Fixing ADD_CALL (3/3)

Bug: 16241726
Change-Id: Ie1dd72a79c2430b10b0239dbdda5508edbc8eb26
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
e0f0678d14f09665463abd949e5b217c95ff99c5 17-Jul-2014 Ihab Awad <ihab@google.com> Wire up multi-SIM experience (4/4)

Change-Id: Ibfcf8a0d68bf48bd32cd0e1a155a5fa7719e53e2
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
213c6162947edb4ba729f1fd3d583b76b110c0ad 16-Jul-2014 Evan Charlton <evanc@google.com> Populate the SIM number for emergency call-backs

If the SIM number is different from the line-1 number, and the call
is an emergency call, populate the call-back number (for the in-call
UI to display).

Bug: 13334257
Bug: 13334252
Change-Id: If7fde7c1ca6940cec8b7232469a22900c36dbb17
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
5f1589c735ada4a42a0ae8891ec1f008a75a69e1 16-Jul-2014 Ihab Awad <ihab@google.com> Fix CDMA calls

Incoming and outgoing CDMA calls were broken per the attached bug

Bug: 16322517
Change-Id: I4ade8a4de3e9aa5ea892da058b4c482360be0713
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
22d32b2b81bba31b6ebd93753a5c1ec39e911981 15-Jul-2014 Sailesh Nepal <sail@google.com> Remote incoming calls: Telephony

Change-Id: Ie8091aacfd9be36d63db02eb8a0a4935753d657f
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
3199aa7f8bcb48569eb8289abc055ba0f8496ba8 14-Jul-2014 Sailesh Nepal <sail@google.com> Telephony cleanup do not merge

This CL removes the PSTN and SIP call service providers.
The connection services will now be looked up by package
manager instead.

This CL also cleanups the telephony connection service code.
Now that the SIP code has been moved out the code can be much
simpler and PstnConnection* and TelephonyConnection* can be
merged.

Change-Id: I2e40c5c64c0d242dc41b680943d7e9209142db5b
(cherry picked from commit 8306b5e6d829c0aa3eacaa12a1cddcf3df7194dc)
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
2093a451b17c26f4341e9565b65dcaa0e20bbd7d 12-Jul-2014 Sailesh Nepal <sail@google.com> Mis Telecomm API changes - telephony

This CL fixes up Telephony to work with the API changes
in ag/501321.

Change-Id: Iaffe0b84cea6003f2a9b9d8b30676743d2b236d4
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
f64d8ca4278e0bfb3afd9023058f86dfc8e92ff6 10-Jul-2014 Sailesh Nepal <sail@google.com> Use Connection.setCallCapabilities in Telephony

One side effect of this change is that HOLD is now no
longer supported for CDMA calls.

Change-Id: I90238eeefbcbfaa044881d80833b62e4474821d6
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
9d67f24b3101e21894610c8e4b74a71ecd018898 08-Jul-2014 Tyler Gunn <tgunn@google.com> Passing video state through to phone dial.

Bug: 16014224
Change-Id: I9fce676527b22f8649238dcce35903e6877af58e
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
19ceccda55bcbec6ffcb1b568e7a5be49b4e8a7a 01-Jul-2014 Ihab Awad <ihab@google.com> Rename Telecomm "Subscription" to "Account" (7/7)

Change-Id: If4d98b1d0fde4c4989f87ea5d2b8738344418809
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
ff3d2ccf8356963626f65d2bec3d42813fa1691b 29-Jun-2014 Sailesh Nepal <sail@google.com> Telephony update for API fixes

Change-Id: Ib2d0b40f2e9e7a6b5fbf5d6db48b509b7db3c906
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
b0baef15d2559af2506ba76c79b072f4d683c81c 26-Jun-2014 Sailesh Nepal <sail@google.com> Update Telephony with new createConnection API changes

Change-Id: I9e5da9c607675bc3c230f6eb6d1cc149a38bf905
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
aa7340388473c1676495a60e30dc6a48d318a489 18-Jun-2014 Ihab Awad <ihab@google.com> Replace CallServiceSelectors with Subscriptions (3/3)

Remove CallServiceSelectors and replace them with comprehensive
support for Subscriptions as the means of selecting ways of making
phone calls. After this change, a ConnectionService is not a
semantically meaningful "way of making a call" -- it's more like the
mechanism whereby the Android system communicates with a 3rd party
process to ask for phone services. We anticipate each process having
only one ConnectionService.

Change-Id: I251c0b6f4106104d945b3723fa4da1081a06b8cd
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
ce1fca982e8fc977a4a7d7917754b48f2c6c1532 15-Jun-2014 Ihab Awad <ihab@google.com> Add methods to TelephonyManager for Subscription management (3/3)

As part of the effort to permit third-party suppliers of telephone
connectivity, we permit clients of TelephonyManager to obtain the
currently valid Subscription objects describing these suppliers. The
Subscriptions are intended to be self-describing such that an end-user
can choose from among them based on the information they contain. One
of these objects may then be attached to an ACTION_DIAL or ACTION_CALL
Intent to represent the end-user's choice of how to make a call.

Change-Id: I2ad1930079042d7bfe762b47c22f0538f7403bff
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
95bd113528105350c09b173bace79f405174da48 03-Jun-2014 Evan Charlton <evanc@google.com> Use the new DTMF post-dial APIs

Use the new APIs for exposing DTMF post-dial functionality.

Bug: 13734588
Change-Id: I5cc06268590c3c424ea6daf216cb205b9c470dac
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
60ca4f28e75422814d95dc60a3db2579a14ed6e1 04-Jun-2014 Ihab Awad <ihab@google.com> DO NOT MERGE. Implement connection error dialogs (3/4)

Implement reporting of connection errors from ConnectionServices through
Telecomm to the InCallUI.

Bug: 15195720
Bug: 15117141
Change-Id: Ia8cd6f2092661225c5cc65a60abba1c35e8fba65
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
64e8e0e49c180b7b54974cc2da8a7cad8082bf7b 03-Jun-2014 Santos Cordon <santoscordon@google.com> Dont attempt to place a call if canCall returns false.

Bug: 15359464
Change-Id: Icca208b9704d5f1bf391aa576ddcce3d558f29d1
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
b2b27a9d7897158eb0515ca6248568257b073f03 16-May-2014 Ihab Awad <ihab@google.com> Refactor Telecomm framework classes into actual framework

Delete Telecomm framework proposal from here as it is being moved to the
actual framework (see http://ag/467620). Refactor Telephony classes to
use the framework from its new location.

Change-Id: I2ecf85677c76f5e25fdd0b7b0f91d1c7a3c6600b
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java
6a6e769af983b973a67cff3e8926597525835aa9 07-May-2014 Ihab Awad <ihab@google.com> Refactor Telephony to new framework

Refactors Telephony to the new-style framework, where the framework classes still live
inside the Telephony package here, but we are getting ready to move them into the actual
frameworks/base directory.

Change-Id: Id93771d20f682e3ebf225e2f4225d24072dce28b
/packages/services/Telephony/src/com/android/services/telephony/TelephonyConnectionService.java