Bug 939046 - Part 3: Introduce dataNetworkInterfaces map and DataCall. f=edgar r=hsinyi

First, we change to use dataNetworkInterfaces map. The key of the map
is the apn type and the value is its corresponding RILNetworkInterface.
RILNetworkInterface(s) are created as soon as apn settings are ready and
registered to NetworkManager right away.

Then, we introduce the DataCall object which represents a real
underlying PDP. When RILNetworkInterface is created, a DataCall is
assigned to it. DataCall can be shared between RILNetworkInterfaces
if they consist of the same apn, username and password.

When a RILNetworkInterface is enabled, it requests its DataCall to
be connected; the DataCall, which can be shared, will establish the
data call if it's not already connected. Similarly, DataCall will
disconnect the data call only when no RILNetworkInterface is requesting
it.

Also, we set the CONNECTING/DISCONNECTING state in DataCall instead of
waiting for state change from ril_worker.
This commit is contained in:
Jessica Jong 2014-05-27 02:08:00 +02:00
Родитель e36c5c97a7
Коммит 9c507be8d2
2 изменённых файлов: 582 добавлений и 564 удалений

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -2279,9 +2279,6 @@ RilObject.prototype = {
Buf.writeString(options.cid);
Buf.writeString(options.reason || DATACALL_DEACTIVATE_NO_REASON);
Buf.sendParcel();
datacall.state = GECKO_NETWORK_STATE_DISCONNECTING;
this.sendChromeMessage(datacall);
},
/**