diff options
author | lrichard <richardl@codeaurora.org> | 2013-12-16 14:52:59 +0800 |
---|---|---|
committer | cretin45 <cretin45@gmail.com> | 2014-09-03 13:56:05 -0700 |
commit | 07f61172905eb6be116b3f3126426f60cedd00ea (patch) | |
tree | 42cdc1202bc2f5dfd1a2ee2396eb0d6d5a691d2a | |
parent | 8112c4c7b213b28150de19ab46a8d2bcd6b2c2d4 (diff) | |
download | android_packages_providers_TelephonyProvider-07f61172905eb6be116b3f3126426f60cedd00ea.tar.gz android_packages_providers_TelephonyProvider-07f61172905eb6be116b3f3126426f60cedd00ea.tar.bz2 android_packages_providers_TelephonyProvider-07f61172905eb6be116b3f3126426f60cedd00ea.zip |
TelephonyProvider: Display APN PPP number
Add a new column "ppp_number" to the carriers database for
displaying the APN PPP number.
Change-Id: Ib1b742257aa1ddfba12f0bfc42e476fca1dcd8c6
-rw-r--r-- | res/values/cm_strings.xml | 20 | ||||
-rw-r--r-- | src/com/android/providers/telephony/TelephonyProvider.java | 5 |
2 files changed, 24 insertions, 1 deletions
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml new file mode 100644 index 0000000..6eaea17 --- /dev/null +++ b/res/values/cm_strings.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2014 The CyanogenMod Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Apn PPP number --> + <string name="ppp_number">ppp_number</string> +</resources> diff --git a/src/com/android/providers/telephony/TelephonyProvider.java b/src/com/android/providers/telephony/TelephonyProvider.java index bc936df..4f98549 100644 --- a/src/com/android/providers/telephony/TelephonyProvider.java +++ b/src/com/android/providers/telephony/TelephonyProvider.java @@ -154,7 +154,8 @@ public class TelephonyProvider extends ContentProvider "bearer INTEGER," + "mvno_type TEXT," + "mvno_match_data TEXT," + - "preferred BOOLEAN DEFAULT 0);"); + "preferred BOOLEAN DEFAULT 0," + + "ppp_number TEXT);"); initDatabase(db); } @@ -315,6 +316,8 @@ public class TelephonyProvider extends ContentProvider map.put(Telephony.Carriers.USER, parser.getAttributeValue(null, "user")); map.put(Telephony.Carriers.SERVER, parser.getAttributeValue(null, "server")); map.put(Telephony.Carriers.PASSWORD, parser.getAttributeValue(null, "password")); + map.put(mContext.getString(R.string.ppp_number), + parser.getAttributeValue(null, "ppp_number")); // do not add NULL to the map so that insert() will set the default value String proxy = parser.getAttributeValue(null, "proxy"); |