commit | f3070624831a596d501f240fbc55b875a8222260 | [log] [tgz] |
---|---|---|
author | Arman Uguray <armansito@chromium.org> | Thu Oct 03 20:27:42 2013 -0700 |
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | Tue Oct 22 00:00:04 2013 +0000 |
tree | ada0ffc27f2f77dcabdee004f611396e7f68f154 | |
parent | 2ef88ad22a7e5f012e2daba04363380f0e6e3135 [diff] |
shill: cellular: Add MobileOperator class. MobileOperator handles the database lookups necessary to reflect the correct mobile operator information based on OTA and SIM based updates. This class caches all the data needed and will allow us to remove similar duplicate logic from the capability, device, and service classes. The interface is very simple, so the implementation of this class can be changed to accomodate different prioritizations of various data sources (SIM, OTA, databases, etc) without having to touch other files, once this class is used by the shill cellular code. MobileOperator does the following: - Look for database matches for a given operator code both in CellularOperatorInfo and in mobile_provider_db. - On OTA updates, update the OLP, APN list, and the serving operator. - On SIM updates, update the home provider. - Notify observers of any changes through its Observer interface. BUG=chromium:298408 TEST=Build and run unit tests. Change-Id: I59c6c2b869f0b52dd15cb6b9e3bda104a7bf6a1a Reviewed-on: https://chromium-review.googlesource.com/171805 Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org> Reviewed-by: Ben Chan <benchan@chromium.org> Commit-Queue: Arman Uguray <armansito@chromium.org> Tested-by: Arman Uguray <armansito@chromium.org>