Fix a race-condition that causes incorrect call deflect status
There is some period (from the moment that incoming call
notification received on ImsService side till the TelephonyConnection
is setup, that is, all listeners are registered) during which
updates/events applied to internal.telephony.Connection don't reach
(ignored) TelephonyConnection because simply listeners are still not
ready. E.g. If extras are set the moment incoming call notification
reaches the ImsService the extras will be ignored since
TelephonyConnection object either not created or not yet listening
to the events from internal.telephony.Connection (Original Connection).
As a result when AnswerPresenter looks at the extra that indicates
if call deflect is supported, the extra is not set correctly. Hence,
user cannot see the option for call deflect for incoming call.
The use of extras for this information is questionable as the value
has to be propagated through multiple layers when the source of this
value is a configuration in xml. Moreover, due to the race condtion
above its not dependable in the incoming call scenario. The fix here
is to move the config item to shared settings.
1 file changed