[rilmodem] Enable roaming allowed setting manipulation

Ofono core listens both network registration and data registration
If context is allowed once in roaming situation network registration
indication updates the status back to attached state. This
change forces the ofono stay in deattached state until ordered
otherwise.

Signed-off-by: Jussi Kangas <jussi.kangas@oss.tieto.com>
[rilmodem] Fix crash when going offline
[rilmodem] Enable context deactivation when RoamingAllowed is set to FALSE

Without this change context is left active if only RoamingAllowed is called
in ConnMan API when there is active context. Connection cannot be used
but it is misleading from user point of view and also agains ofono spec.
Therefore it is better enable deactivation.

Signed-off-by: Jussi Kangas <jussi.kangas@oss.tieto.com>
[rilmodem] Checking if phone is really roaming

In case of virtual operators it looks like it is possible that
modem is indicating roaming state even though that is not true.
With this fix status is double checked against EF SPDI.

Signed-off-by: Jussi Kangas <jussi.kangas@oss.tieto.com>
[rilmodem] Ensuring that short alpha is present

According to ril API specification also short alpha can be NULL.
This leads to crash in ofono if leaved unchecked.

Signed-off-by: Jussi Kangas <jussi.kangas@oss.tieto.com>
[rilmodem] Ensure that *netreg_data is always set in callback data

This is based on commit 3b18c7773460b6156b68411795a4ceb0dad4725e
from Tony Espy in Canonical. Without setting the netreg value both
in manual and automatic network selection request ofono crashes
when selecting manual and then automatic selection.

Signed-off-by: Jussi Kangas <jussi.kangas@oss.tieto.com>
rilmodem: removing unnecessary sim inserted notifies

Signed-off-by: Jarko Poutiainen <Jarko.Poutiainen@oss.tieto.com>
[rilmodem] proper idle/timer handling gprs

Signed-off-by: Jarko Poutiainen <Jarko.Poutiainen@oss.tieto.com>
[rilmodem] proper idle/timer handling sim

Signed-off-by: Jarko Poutiainen <Jarko.Poutiainen@oss.tieto.com>
[rilmodem] proper idle/timer handling sms

Signed-off-by: Jarko Poutiainen <Jarko.Poutiainen@oss.tieto.com>
[rilmodem] proper idle/timer handling ussd

Signed-off-by: Jarko Poutiainen <Jarko.Poutiainen@oss.tieto.com>
[rilmodem]Removing not used voicecall vts_source
[rilmodem] proper idle/timer handling vc

Signed-off-by: Jarko Poutiainen <Jarko.Poutiainen@oss.tieto.com>
[rilmodem] proper idle/timer handling radio

Signed-off-by: Jarko Poutiainen <Jarko.Poutiainen@oss.tieto.com>
[rilmodem] proper idle/timer handling pb

Signed-off-by: Jarko Poutiainen <Jarko.Poutiainen@oss.tieto.com>
[rilmodem] proper idle/timer handling netr

Signed-off-by: Jarko Poutiainen <Jarko.Poutiainen@oss.tieto.com>
[rilmodem] proper idle/timer handling devinfo

Signed-off-by: Jarko Poutiainen <Jarko.Poutiainen@oss.tieto.com>
[rilmodem] proper idle/timer handling cbs

Signed-off-by: Jarko Poutiainen <Jarko.Poutiainen@oss.tieto.com>
[rilmodem] proper idle/timer handling cv

Signed-off-by: Jarko Poutiainen <Jarko.Poutiainen@oss.tieto.com>
[rilmodem] proper idle/timer handling cs

Signed-off-by: Jarko Poutiainen <Jarko.Poutiainen@oss.tieto.com>