NetworkManager Enhancement

2014/09/09

Introduce

  • What we would like to enhance?
    • Shared apn connection.
    • 3G and Wifi switching.
    • Mobile data connection request (e.g. MMS, SUPL ...).
    • Freezing RIL Interface for data connection.

Shared apn connection

  • Proposal:
    • Each Apn type has it's own NetworkInterface even if it shares the same apn setting with other type.

  • Please see Bug 939046 (Fixed).

3G and Wifi switching

  • Proposal:
    • NetworkInterface will be registered to NetworkManager once the network is available.
    • Move the policy control logic to NetworkManager.
    • NetworkManager will call activate()/deactivate() to control NetworkInterface based on policy. (Drop mobile connection when wifi is connected)
  • Please see Bug 911713.

3G and Wifi switching

  • Interface changes:
                            /* NetworkInterface */
                            partial interface nsINetworkInterface {
                              void activate(); // establish connection
                              void deactivate(); // drop connection
                            }
                        
                            /* RadioInterface */
                            partial interface nsIRadioInterface {
                              void updateRILNetworkInterface();
                            }
                        

Connection request

  • Proposal:
    • NetworkInterface will be registered to NetworkManager once the network is available.
    • Other modules request/release specific type of connection through NetworkManager. (e.g. MMS, SUPL ... etc)
    • NetworkManager will call activate()/deactivate() of corresponding network interface to establish/drop connection.
  • Please see Bug 928861.

Connection request

  • Interface changes:
                            /* NetworkInterface */
                            partial interface nsINetworkInterface {
                              void activate(); // establish connection
                              void deactivate(); // drop connection
                            }
                        
                            /* RadioInterface */
                            partial interface nsIRadioInterface {
                              void setupDataCallByType(in DOMString apntype);
                              void deactivateDataCallByType(in DOMString apntype);
                              long getDataCallStateByType(in DOMString apntype);
                            }
                        

Freezing RIL Interface

  • Plan for v2.3
  • Proposal:
    • Move dataconnection related code out of RadioInterfaceLayer.js
    • CAF don't need to implement nsINetworkInterface
    • We will add another API to nsIRadioInterface.idl for NetworkInterface instances to call.

Freezing RIL Interface

  • Interface changes:
                            /* nsIRadioInterface */
                            partial interface nsIRadioInterface {
                              void setupDataConnection(in DOMString apn, in DOMString username, 
                                                       in DOMString password, in long authType, 
                                                       in long pdpType, 
                                                       in nsIGonkDataConnectionCallback callback); 
                             
                              void deactivateDataConnection(in long cid, 
                                                            in nsIGonkDataConnectionCallback callback); 
                             
                              void getDataConnectionList(in nsIGonkDataConnectionCallback callback); 
                            };
                        

Freezing RIL Interface

  • Interface changes:
                            
                            /* nsIGonkDataConnectionCallback */
                            partial interface nsIGonkDataConnectionCallback {
                              void notifyEnumerateConnections([array, size_is(count)] 
                                                              in nsIGonkDataConnection connection);
                              void notifySuccess(in nsIGonkDataConnection connection)
                              void notifyError(in DOMString errorMsg) 
                            };
                        
                            /* nsIGonkDataConnectionService */
                            partial interface nsIGonkDataConnectionService {
                              void notifyDataConnectionChanged(in nsIGonkDataConnection connection); 
                            };