diff options
author | Wink Saville <wink@google.com> | 2013-08-29 08:55:16 -0700 |
---|---|---|
committer | Wink Saville <wink@google.com> | 2013-08-29 08:55:16 -0700 |
commit | 948282b0e6cf5310f09db97a4ae939db7c1cef72 (patch) | |
tree | 8d24b04f379e58a6fa40751106ff2452a6c54e62 /core/res | |
parent | dce52cdbf1eab8bd979bf4676973699c39f7b32e (diff) | |
download | frameworks_base-948282b0e6cf5310f09db97a4ae939db7c1cef72.zip frameworks_base-948282b0e6cf5310f09db97a4ae939db7c1cef72.tar.gz frameworks_base-948282b0e6cf5310f09db97a4ae939db7c1cef72.tar.bz2 |
Add support for handling mobile provisioning networks.
When a sim is new or it has expired it needs to be provisioned
with the carrier. Basically provisioning is associating a sim with
a user account. When a sim isn't provisioned then operators will
restrict access to the network and only allow certain addresses
or services to be used.
This set of changes allows two types of provisioning networks to be
recognized. The first is a network that causes all DNS lookups to be
redirected to a different address than was intended. This is exemplified
by how T-Mobile works.
The second technique uses a special apn for provisioning. An example is
AT&T where lwaactivate is the provisioning apn and broadband is the
normal apn. We first try broadband and if we are unable to connect we
try lwaactivate. When we see the activate we identify it as special and
the ApnContext.isProvisioningApn will return true.
In the future our plan is to create a new network type that can be added
to the apn list, but for now it identified by name.
Here is a list of significant changes:
- CaptivePortalTracker now only test WiFi networks instead of all networks
- checkMobileProvisioning checks for provisioning networks and doesn't
try to ping.
- IConnectivityManager.aidl changes:
* getProvisioningOrActiveNetworkInfo was added to and used by Manage
mobile plan in WirelessSettings so even when there is no active
network it will still allow provisioning. Otherwise it would report
no internet connection.
* setSignInErrorNotificationVisible is used by both
CaptiviePortalTracker and checkMobileProvisioning so they use the
same code for the notifications.
* checkMobileProvisioning was simplified to have only a timeout as
returning the result is now harder as we abort simultaneous call
otherwise we'd could get into loops because we now check every time
we connect to mobile.
- Enhanced MDST to handle the provisioning network.
- Added CONNECTED_TO_PROVISIONING_NETWORK to NetworkInfo to make a new
state so we don't announce to the world we're connected.
- TelephonyIntents.ACTION_DATA_CONNECTION_CONNECTED_TO_PROVISIONING_APN
is sent by the low level data connection code to notify Connectivity
Service that a provisioning apn has connected. This allows CS to
handle the connection differently than a normal connection.
Bug: 10328264
Change-Id: I3925004011bb1243793c4c1b963d923dc2b00cb5
Diffstat (limited to 'core/res')
-rw-r--r-- | core/res/AndroidManifest.xml | 4 | ||||
-rw-r--r-- | core/res/res/values/config.xml | 4 | ||||
-rw-r--r-- | core/res/res/values/symbols.xml | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 4bff536..c23012a 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -151,6 +151,7 @@ <protected-broadcast android:name="android.intent.action.DREAMING_STARTED" /> <protected-broadcast android:name="android.intent.action.DREAMING_STOPPED" /> <protected-broadcast android:name="android.intent.action.ANY_DATA_STATE" /> + <protected-broadcast android:name="android.intent.action.DATA_CONNECTION_CONNECTED_TO_PROVISIONING_APN" /> <protected-broadcast android:name="com.android.server.WifiManager.action.START_SCAN" /> <protected-broadcast android:name="com.android.server.WifiManager.action.DELAYED_DRIVER_STOP" /> @@ -181,6 +182,9 @@ <protected-broadcast android:name="android.intent.action.ACTION_IDLE_MAINTENANCE_START" /> <protected-broadcast android:name="android.intent.action.ACTION_IDLE_MAINTENANCE_END" /> + <protected-broadcast + android:name="com.android.server.connectivityservice.CONNECTED_TO_PROVISIONING_NETWORK_ACTION" /> + <!-- ====================================== --> <!-- Permissions for things that cost money --> <!-- ====================================== --> diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 4572f5b..707590b 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -772,6 +772,10 @@ <!-- IP address of the dns server to use if nobody else suggests one --> <string name="config_default_dns_server" translatable="false">8.8.8.8</string> + <!-- The default mobile provisioning apn. Empty by default, maybe overridden by + an mcc/mnc specific config.xml --> + <string name="mobile_provisioning_apn" translatable="false"></string> + <!-- The default mobile provisioning url. Empty by default, maybe overridden by an mcc/mnc specific config.xml --> <string name="mobile_provisioning_url" translatable="false"></string> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index b885d56..a67c2af 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -703,6 +703,7 @@ <java-symbol type="string" name="preposition_for_time" /> <java-symbol type="string" name="progress_erasing" /> <java-symbol type="string" name="progress_unmounting" /> + <java-symbol type="string" name="mobile_provisioning_apn" /> <java-symbol type="string" name="mobile_provisioning_url" /> <java-symbol type="string" name="mobile_redirected_provisioning_url" /> <java-symbol type="string" name="reboot_safemode_confirm" /> |