From 77b32ddbbeeb13a07b16f23af705567c75a8e3df Mon Sep 17 00:00:00 2001 From: Robert Greenwalt Date: Thu, 3 Jun 2010 18:57:26 -0700 Subject: [PATCH] Make the DUN apn data secure. Rather than come out of the user-modifiable APN DB, the DUN APN data will come first from a built-in resource and then potentially overriden by a secure setting (which is gservices upgradable). Also made the "require-dun" setting secure-setting overridable. bug:2736390 Change-Id: I1e4644c3839f06c977b83797641f3948785146a2 --- core/java/android/provider/Settings.java | 18 ++++++++++++ core/res/res/values/config.xml | 14 +++++++-- .../server/connectivity/Tethering.java | 11 +++++-- .../internal/telephony/gsm/ApnSetting.java | 29 +++++++++++++++++++ .../gsm/GsmDataConnectionTracker.java | 23 +++++++++++++++ 5 files changed, 90 insertions(+), 5 deletions(-) diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 9f19f119f827a..e12dfb06087e6 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -2367,6 +2367,24 @@ public final class Settings { */ public static final String TETHER_SUPPORTED = "tether_supported"; + /** + * Used to require DUN APN on the device or not - defaults to a build config value + * which defaults to false + * @hide + */ + public static final String TETHER_DUN_REQUIRED = "tether_dun_required"; + + /** + * Used to hold a gservices-provisioned apn value for DUN. If set, or the + * corresponding build config values are set it will override the APN DB + * values. + * Consists of a comma seperated list of strings: + * "name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type" + * note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN" + * @hide + */ + public static final String TETHER_DUN_APN = "tether_dun_apn"; + /** * No longer supported. */ diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 64f05fefd2912..088ab44e84b06 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -91,8 +91,18 @@ - - true + + false + + + +