添加APN settings 相关代码初版。仅可编译,还需要继续整理
authorsnickersun <snickersun@qq.com>
Sun, 14 Mar 2021 13:12:31 +0000 (21:12 +0800)
committersnickersun <snickersun@qq.com>
Sun, 14 Mar 2021 13:12:31 +0000 (21:12 +0800)
app/build.gradle
app/libs/frameworks-2-full-debug.jar [new file with mode: 0644]
app/libs/telephony-common-full-debug.jar [moved from app/libs/telephony_common-full-debug.jar with 74% similarity]
app/src/main/java/com/enqualcomm/support/bean/ApnSetting.java [new file with mode: 0644]
app/src/main/java/com/enqualcomm/support/utils/ApnEditor.java [new file with mode: 0644]
app/src/main/res/values/arrays.xml [new file with mode: 0644]
app/src/main/res/values/strings.xml
build.gradle
core/core.iml [deleted file]

index 98b71df..02411f6 100644 (file)
@@ -86,8 +86,9 @@ android {
 //    }
 }
 dependencies {
-      compileOnly files ('libs/frameworks-full-debug.jar')
-    compileOnly files ('libs/telephony_common-full-debug.jar')
+    compileOnly files ('libs/frameworks-full-debug.jar')
+    compileOnly files ('libs/frameworks-2-full-debug.jar')
+    compileOnly files ('libs/telephony-common-full-debug.jar')
 
     implementation 'com.android.support.constraint:constraint-layout:1.1.3'
     //compile fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
diff --git a/app/libs/frameworks-2-full-debug.jar b/app/libs/frameworks-2-full-debug.jar
new file mode 100644 (file)
index 0000000..8f0e242
Binary files /dev/null and b/app/libs/frameworks-2-full-debug.jar differ
similarity index 74%
rename from app/libs/telephony_common-full-debug.jar
rename to app/libs/telephony-common-full-debug.jar
index e6a112c..9aea0c6 100644 (file)
Binary files a/app/libs/telephony_common-full-debug.jar and b/app/libs/telephony-common-full-debug.jar differ
diff --git a/app/src/main/java/com/enqualcomm/support/bean/ApnSetting.java b/app/src/main/java/com/enqualcomm/support/bean/ApnSetting.java
new file mode 100644 (file)
index 0000000..1e59443
--- /dev/null
@@ -0,0 +1,188 @@
+package com.enqualcomm.support.bean;
+
+public class ApnSetting {
+       private String mNameStr;
+       private String mApnStr;
+       private String mProxyStr;
+       private String mPortStr;
+       private String mUserStr;
+       private String mServerStr;
+       private String mPasswordStr;
+       private String mMmscStr;
+       private String mMccStr;
+       private String mMncStr;
+       private String mMmsProxyStr;
+       private String mMmsPortStr;
+       private String mAuthTypeStr;
+       private String mApnTypeStr;
+       private String mProtocolStr;
+       private String mRoamingProtocolStr;
+       private String mBearerStr;
+       private String mMvnoTypeStr;
+       private String mMvnoMatchDataStr;
+       public ApnSetting(){}
+       public String getmNameStr() {
+               return mNameStr;
+       }
+       public void setmNameStr(String mNameStr) {
+               this.mNameStr = mNameStr;
+       }
+       public String getmApnStr() {
+               return mApnStr;
+       }
+       public void setmApnStr(String mApnStr) {
+               this.mApnStr = mApnStr;
+       }
+       public String getmProxyStr() {
+               return mProxyStr;
+       }
+       public void setmProxyStr(String mProxyStr) {
+               this.mProxyStr = mProxyStr;
+       }
+       public String getmPortStr() {
+               return mPortStr;
+       }
+       public void setmPortStr(String mPortStr) {
+               this.mPortStr = mPortStr;
+       }
+       public String getmUserStr() {
+               return mUserStr;
+       }
+       public void setmUserStr(String mUserStr) {
+               this.mUserStr = mUserStr;
+       }
+       public String getmServerStr() {
+               return mServerStr;
+       }
+       public void setmServerStr(String mServerStr) {
+               this.mServerStr = mServerStr;
+       }
+       public String getmPasswordStr() {
+               return mPasswordStr;
+       }
+       public void setmPasswordStr(String mPasswordStr) {
+               this.mPasswordStr = mPasswordStr;
+       }
+       public String getmMmscStr() {
+               return mMmscStr;
+       }
+       public void setmMmscStr(String mMmscStr) {
+               this.mMmscStr = mMmscStr;
+       }
+       public String getmMccStr() {
+               return mMccStr;
+       }
+       public void setmMccStr(String mMccStr) {
+               this.mMccStr = mMccStr;
+       }
+       public String getmMncStr() {
+               return mMncStr;
+       }
+       public void setmMncStr(String mMncStr) {
+               this.mMncStr = mMncStr;
+       }
+       public String getmMmsProxyStr() {
+               return mMmsProxyStr;
+       }
+       public void setmMmsProxyStr(String mMmsProxyStr) {
+               this.mMmsProxyStr = mMmsProxyStr;
+       }
+       public String getmMmsPortStr() {
+               return mMmsPortStr;
+       }
+       public void setmMmsPortStr(String mMmsPortStr) {
+               this.mMmsPortStr = mMmsPortStr;
+       }
+       public String getmAuthTypeStr() {
+               return mAuthTypeStr;
+       }
+       public void setmAuthTypeStr(String mAuthTypeStr) {
+               this.mAuthTypeStr = mAuthTypeStr;
+       }
+       public String getmApnTypeStr() {
+               return mApnTypeStr;
+       }
+       public void setmApnTypeStr(String mApnTypeStr) {
+               this.mApnTypeStr = mApnTypeStr;
+       }
+       public String getmProtocolStr() {
+               return mProtocolStr;
+       }
+       public void setmProtocolStr(String mProtocolStr) {
+               this.mProtocolStr = mProtocolStr;
+       }
+       public String getmRoamingProtocolStr() {
+               return mRoamingProtocolStr;
+       }
+       public void setmRoamingProtocolStr(String mRoamingProtocolStr) {
+               this.mRoamingProtocolStr = mRoamingProtocolStr;
+       }
+       public String getmBearerStr() {
+               return mBearerStr;
+       }
+       public void setmBearerStr(String mBearerStr) {
+               this.mBearerStr = mBearerStr;
+       }
+       public String getmMvnoTypeStr() {
+               return mMvnoTypeStr;
+       }
+       public void setmMvnoTypeStr(String mMvnoTypeStr) {
+               this.mMvnoTypeStr = mMvnoTypeStr;
+       }
+       public String getmMvnoMatchDataStr() {
+               return mMvnoMatchDataStr;
+       }
+       public void setmMvnoMatchDataStr(String mMvnoMatchDataStr) {
+               this.mMvnoMatchDataStr = mMvnoMatchDataStr;
+       }
+       @Override
+       public String toString() {
+               return "ApnSetting [mNameStr=" + mNameStr + ", mApnStr=" + mApnStr
+                               + ", mProxyStr=" + mProxyStr + ", mPortStr=" + mPortStr
+                               + ", mUserStr=" + mUserStr + ", mServerStr=" + mServerStr
+                               + ", mPasswordStr=" + mPasswordStr + ", mMmscStr=" + mMmscStr
+                               + ", mMccStr=" + mMccStr + ", mMncStr=" + mMncStr
+                               + ", mMmsProxyStr=" + mMmsProxyStr + ", mMmsPortStr="
+                               + mMmsPortStr + ", mAuthTypeStr=" + mAuthTypeStr
+                               + ", mApnTypeStr=" + mApnTypeStr + ", mProtocolStr="
+                               + mProtocolStr + ", mRoamingProtocolStr=" + mRoamingProtocolStr
+                               + ", mBearerStr=" + mBearerStr + ", mMvnoTypeStr="
+                               + mMvnoTypeStr + ", mMvnoMatchDataStr=" + mMvnoMatchDataStr
+                               + "]";
+       }
+       @Override
+       public boolean equals(Object obj) {
+               if (obj == null) {
+                       return false;
+               }else {
+                       if (this.getClass() == obj.getClass()) {
+                               ApnSetting newApnSetting = (ApnSetting) obj;
+                               if (this.getmNameStr().equals(newApnSetting.getmNameStr()) &&
+                                       this.getmApnStr().equals(newApnSetting.getmApnStr()) &&
+                                       this.getmProxyStr().equals(newApnSetting.getmProxyStr()) &&
+                                       this.getmPortStr().equals(newApnSetting.getmPortStr()) &&
+                                       this.getmUserStr().equals(newApnSetting.getmUserStr()) &&
+                                       this.getmServerStr().equals(newApnSetting.getmServerStr()) &&
+                                       this.getmPasswordStr().equals(newApnSetting.getmPasswordStr()) &&
+                                       this.getmMmsProxyStr().equals(newApnSetting.getmMmsProxyStr()) &&
+                                       this.getmMmsPortStr().equals(newApnSetting.getmMmsPortStr()) &&
+                                       this.getmMmscStr().equals(newApnSetting.getmMmscStr()) &&
+                                       this.getmMccStr().equals(newApnSetting.getmMccStr()) &&
+                                       this.getmMncStr().equals(newApnSetting.getmMncStr()) &&
+                                       this.getmAuthTypeStr().equals(newApnSetting.getmAuthTypeStr()) &&
+                                       this.getmApnTypeStr().equals(newApnSetting.getmApnTypeStr()) &&
+                                       this.getmProtocolStr().equals(newApnSetting.getmProtocolStr()) &&
+                                       this.getmRoamingProtocolStr().equals(newApnSetting.getmRoamingProtocolStr()) &&
+                                       this.getmBearerStr().equals(newApnSetting.getmBearerStr()) &&
+                                       this.getmMvnoTypeStr().equals(newApnSetting.getmMvnoTypeStr()) &&
+                                       this.getmMvnoMatchDataStr().equals(newApnSetting.getmMvnoMatchDataStr())) {
+                                       return true;
+                               }else {
+                                       return false;
+                               }
+                       }else {
+                               return false;
+                       }
+               }
+       }
+}
diff --git a/app/src/main/java/com/enqualcomm/support/utils/ApnEditor.java b/app/src/main/java/com/enqualcomm/support/utils/ApnEditor.java
new file mode 100644 (file)
index 0000000..f91a610
--- /dev/null
@@ -0,0 +1,791 @@
+/*
+ * Copyright (C) 2006 The Android Open Source 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.
+ */
+
+package com.enqualcomm.support.utils;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.ContentUris;
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.content.res.Resources;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.SystemProperties;
+import android.preference.CheckBoxPreference;
+import android.preference.EditTextPreference;
+import android.preference.ListPreference;
+import android.preference.Preference;
+import android.preference.PreferenceActivity;
+import android.preference.PreferenceScreen;
+import android.provider.Settings;
+import android.provider.Telephony;
+import android.sim.SimManager;
+import android.telephony.TelephonyManager;
+import android.text.Editable;
+import android.text.Selection;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.widget.EditText;
+import android.widget.TextView;
+
+import com.android.internal.telephony.TelephonyProperties;
+import com.enqualcomm.support.R;
+import com.enqualcomm.support.bean.ApnSetting;
+
+import static android.content.Context.TELEPHONY_SERVICE;
+
+
+public class ApnEditor  {
+
+    private final static String TAG = ApnEditor.class.getSimpleName();
+    private Context mContext=null;
+    private final static String SAVED_POS = "pos";
+    private final static String KEY_AUTH_TYPE = "auth_type";
+    private final static String KEY_PROTOCOL = "apn_protocol";
+    private final static String KEY_ROAMING_PROTOCOL = "apn_roaming_protocol";
+    private final static String KEY_CARRIER_ENABLED = "carrier_enabled";
+    private final static String KEY_BEARER = "bearer";
+    private final static String KEY_MVNO_TYPE = "mvno_type";
+    private final static String KEY_APN_TYPE = "apn_type";
+    public final static String APN_EDITABLE = "editable";
+
+    private static final int MENU_DELETE = Menu.FIRST;
+    private static final int MENU_SAVE = Menu.FIRST + 1;
+    private static final int MENU_CANCEL = Menu.FIRST + 2;
+    private static final int ERROR_DIALOG_ID = 0;
+    private static final String APN_TYPE = "APN_TYPE";
+    private static final String IS_RELOADED = "IS_PRELOADED";
+    /* SPRD: add for bug717733 @{ */
+    private static final String CUCC = "cucc";
+    private final static String XCAP = ",xcap";
+    private final static String CURRENT_CARRIER = "ro.operator";
+    public final static String SPECIAL_CTCC_NUMERIC = "20404";
+    public final static String CTCC_ICCID = "898603,898611";
+    /* @} */
+    private static String sNotSet;
+    private EditTextPreference mName;
+    private EditTextPreference mApn;
+    private EditTextPreference mProxy;
+    private EditTextPreference mPort;
+    private EditTextPreference mUser;
+    private EditTextPreference mServer;
+    private EditTextPreference mPassword;
+    private EditTextPreference mMmsc;
+    private EditTextPreference mMcc;
+    private EditTextPreference mMnc;
+    private EditTextPreference mMmsProxy;
+    private EditTextPreference mMmsPort;
+    private ListPreference mAuthType;
+    private Preference mApnType;
+    private ListPreference mProtocol;
+    private ListPreference mRoamingProtocol;
+    private CheckBoxPreference mCarrierEnabled;
+    private ListPreference mBearer;
+    private ListPreference mMvnoType;
+    private EditTextPreference mMvnoMatchData;
+
+    private String mCurMnc;
+    private String mCurMcc;
+    private int mPhoneId = 0; // SPRD: add by spreadst
+
+    private Uri mUri;
+    private Cursor mCursor;
+    private boolean mNewApn;
+    private boolean mFirstTime;
+    private boolean mIsPreloaded = false; // SPRD: for cmcc case, preloaded apns should not be editable or deleted.
+    private Resources mRes;
+    private TelephonyManager mTelephonyManager;
+    private String mRecordApnType;
+    // SPRD: modify for bug271734
+    private String mApnTypeSummary;
+    private boolean mIsdelete = false;
+    //compare apn setting values whether change
+    private ApnSetting mApnSetting = new ApnSetting();
+    private ApnSetting mNewApnSetting = new ApnSetting();
+
+    // SPRD: FEATURE_APN_CAN_BE_EMTPY
+    private boolean mAllowEmptyApn = SystemProperties.get(CURRENT_CARRIER, "default")
+            .equals("orange");
+    // SPRD: FEATURE_APN_NOT_EDITABLE
+    /* SPRD: add for bug675438 @{ */
+    private boolean mApnEditable = true;
+    /* @} */
+    /* SPRD: Bug 628333 modify for support virtual operator @{ */
+    private String mMvnoTypeStr;
+    private String mMvnoMatchDataStr;
+    /* @} */
+
+    // SPRD: Bug 645213 don't allow to modify mvno value
+    private boolean mVirtualOperator = false;
+    /**
+     * Standard projection for the interesting columns of a normal note.
+     */
+    private static final String[] sProjection = new String[] {
+            Telephony.Carriers._ID,     // 0
+            Telephony.Carriers.NAME,    // 1
+            Telephony.Carriers.APN,     // 2
+            Telephony.Carriers.PROXY,   // 3
+            Telephony.Carriers.PORT,    // 4
+            Telephony.Carriers.USER,    // 5
+            Telephony.Carriers.SERVER,  // 6
+            Telephony.Carriers.PASSWORD, // 7
+            Telephony.Carriers.MMSC, // 8
+            Telephony.Carriers.MCC, // 9
+            Telephony.Carriers.MNC, // 10
+            Telephony.Carriers.NUMERIC, // 11
+            Telephony.Carriers.MMSPROXY,// 12
+            Telephony.Carriers.MMSPORT, // 13
+            Telephony.Carriers.AUTH_TYPE, // 14
+            Telephony.Carriers.TYPE, // 15
+            Telephony.Carriers.PROTOCOL, // 16
+            Telephony.Carriers.CARRIER_ENABLED, // 17
+            Telephony.Carriers.BEARER, // 18
+            Telephony.Carriers.ROAMING_PROTOCOL, // 19
+            Telephony.Carriers.MVNO_TYPE,   // 20
+            Telephony.Carriers.MVNO_MATCH_DATA,  // 21
+            "preload",
+//            Telephony.Carriers.PRELOAD, // SPRD: for cmcc case, preloaded apns should not be editable or deleted.
+            APN_EDITABLE //23
+    };
+
+    private static final int ID_INDEX = 0;
+    private static final int NAME_INDEX = 1;
+    private static final int APN_INDEX = 2;
+    private static final int PROXY_INDEX = 3;
+    private static final int PORT_INDEX = 4;
+    private static final int USER_INDEX = 5;
+    private static final int SERVER_INDEX = 6;
+    private static final int PASSWORD_INDEX = 7;
+    private static final int MMSC_INDEX = 8;
+    private static final int MCC_INDEX = 9;
+    private static final int MNC_INDEX = 10;
+    private static final int MMSPROXY_INDEX = 12;
+    private static final int MMSPORT_INDEX = 13;
+    private static final int AUTH_TYPE_INDEX = 14;
+    private static final int TYPE_INDEX = 15;
+    private static final int PROTOCOL_INDEX = 16;
+    private static final int CARRIER_ENABLED_INDEX = 17;
+    private static final int BEARER_INDEX = 18;
+    private static final int ROAMING_PROTOCOL_INDEX = 19;
+    private static final int MVNO_TYPE_INDEX = 20;
+    private static final int MVNO_MATCH_DATA_INDEX = 21;
+    private static final int PRELOAD_INDEX = 22; // SPRD: for cmcc case, preloaded apns should not be editable or deleted.
+    private static final int EDITABLE_INDEX = 23;
+
+    /* SPRD: add for bug685803 @{ */
+//    private FeatureBarHelper mFeatureBarHelper;
+//    private TextView mLeftSkView;
+//    private TextView mCenterSkView;
+//    private TextView mRightSkView;
+    /* @} */
+
+
+    public ApnEditor(Context context) {
+
+        mContext=context;
+//        addPreferencesFromResource(R.xml.apn_editor);
+
+        /* SPRD: add for bug685803 @{ */
+//        mFeatureBarHelper = new FeatureBarHelper(this);
+//        mLeftSkView = (TextView) mFeatureBarHelper.getOptionsKeyView();
+//        mCenterSkView = (TextView) mFeatureBarHelper.getCenterKeyView();
+//        mCenterSkView.setText(R.string.default_feature_bar_center);
+//        mRightSkView = (TextView) mFeatureBarHelper.getBackKeyView();
+        /* @} */
+
+//        sNotSet = getResources().getString(R.string.apn_not_set);
+//        mName = (EditTextPreference) findPreference("apn_name");
+//        mApn = (EditTextPreference) findPreference("apn_apn");
+//        mProxy = (EditTextPreference) findPreference("apn_http_proxy");
+//        mPort = (EditTextPreference) findPreference("apn_http_port");
+//        mUser = (EditTextPreference) findPreference("apn_user");
+//        mServer = (EditTextPreference) findPreference("apn_server");
+//        mPassword = (EditTextPreference) findPreference("apn_password");
+//        mMmsProxy = (EditTextPreference) findPreference("apn_mms_proxy");
+//        mMmsPort = (EditTextPreference) findPreference("apn_mms_port");
+//        mMmsc = (EditTextPreference) findPreference("apn_mmsc");
+//        mMcc = (EditTextPreference) findPreference("apn_mcc");
+//        mMnc = (EditTextPreference) findPreference("apn_mnc");
+//        mApnType = (Preference) findPreference(KEY_APN_TYPE);
+//
+//        mAuthType = (ListPreference) findPreference(KEY_AUTH_TYPE);
+//
+//
+//        mProtocol = (ListPreference) findPreference(KEY_PROTOCOL);
+//
+//
+//        mRoamingProtocol = (ListPreference) findPreference(KEY_ROAMING_PROTOCOL);
+//
+//        mCarrierEnabled = (CheckBoxPreference) findPreference(KEY_CARRIER_ENABLED);
+//
+//
+//        mBearer = (ListPreference) findPreference(KEY_BEARER);
+//        mBearer.setOnPreferenceChangeListener(this);
+//
+//        mMvnoType = (ListPreference) findPreference(KEY_MVNO_TYPE);
+//        mMvnoType.setOnPreferenceChangeListener(this);
+//        mMvnoMatchData = (EditTextPreference) findPreference("mvno_match_data");
+
+        mRes = context.getResources();
+
+//        final Intent intent = getIntent();
+//        final String action = intent.getAction();
+
+        /* SPRD: for multi-sim @{ */
+//        if (TelephonyManager.isMultiSim()) {
+//            // Read the mPhoneId received from Phone settings.
+//            mPhoneId = intent.getIntExtra(WirelessSettings.SUB_ID, 0);
+//            this.setTitle(mRes.getString(R.string.apn_edit_ex, mPhoneId + 1));
+//            Log.d(TAG, "ApnEditor onCreate received mPhoneId: " + mPhoneId);
+//        } else {
+//            this.setTitle(R.string.apn_edit);
+//        }
+        /* @} */
+
+//        mFirstTime = icicle == null;
+//        /* SPRD: modify for bug271734 @{ */
+//        if(icicle != null){
+//            mApnTypeSummary = icicle.getString(APN_TYPE,"");
+//            // SPRD: modify for bug271736
+//            mIsPreloaded = icicle.getBoolean(IS_RELOADED,false);
+//        }
+//        /* @} */
+//        if (action.equals(Intent.ACTION_EDIT)) {
+//            mUri = intent.getData();
+//        } else if (action.equals(Intent.ACTION_INSERT)) {
+//            if (mFirstTime || icicle.getInt(SAVED_POS) == 0) {
+//                mUri = context.getContentResolver().insert(intent.getData(), new ContentValues());
+//            } else {
+//                /* SPRD: for multi-sim @{ */
+//                // mUri =
+//                // ContentUris.withAppendedId(Telephony.Carriers.CONTENT_URI,
+//                // icicle.getInt(SAVED_POS));
+//                mUri = ContentUris.withAppendedId(
+//                                        Telephony.Carriers.getContentUri(mPhoneId,null), icicle
+//                                                .getInt(SAVED_POS));
+//                /* @} */
+//            }
+//            mNewApn = true;
+//            /* SPRD: Bug 628333 modify for support virtual operator @{ */
+//            mMvnoTypeStr = intent.getStringExtra(ApnSettings.MVNO_TYPE);
+//            mMvnoMatchDataStr = intent.getStringExtra(ApnSettings.MVNO_MATCH_DATA);
+//            /* @} */
+//
+//            // If we were unable to create a new note, then just finish
+//            // this activity.  A RESULT_CANCELED will be sent back to the
+//            // original activity if they requested a result.
+//            if (mUri == null) {
+//                Log.w(TAG, "Failed to insert new telephony provider into "
+//                        + getIntent().getData());
+////                finish();
+//                return;
+//            }
+//
+//            // The new entry was created, so assume all will end well and
+//            // set the result to be returned.
+////            setResult(RESULT_OK, (new Intent()).setAction(mUri.toString()));
+//
+//        } else {
+////            finish();
+//            return;
+//        }
+
+        /* SPRD: for bug 297172: Use common query management Cursor @{ */
+        // mCursor = managedQuery(mUri, sProjection, null, null);
+        mCursor = mContext.getContentResolver().query(mUri, sProjection, null, null,null);
+        /* @} */
+        mCursor.moveToFirst();
+
+        mTelephonyManager = (TelephonyManager) mContext.getSystemService(TELEPHONY_SERVICE);
+
+        fillUi();
+    }
+
+
+    public void onResume() {
+
+
+        /* SPRD: for bug 297172: After hanging up the phone, can not save the new apn normally @{ */
+        if(mIsdelete) {
+            if(mCursor != null) {
+                mCursor.close();
+                mCursor = null;
+            }
+          //  final Intent intent = getIntent();
+            Log.d(TAG, "Get mUri again!");
+//            mUri = mContext.getContentResolver().insert(intent.getData(), new ContentValues());
+            mCursor = mContext.getContentResolver().query(mUri, sProjection, null, null,null);
+            mCursor.moveToFirst();
+            mIsdelete = false;
+        }
+        /* @} */
+
+
+        /* SPRD: for cucc case @{ */
+//        PreferenceScreen prefSet = getPreferenceScreen();
+//        if (mIsPreloaded && "cucc".equals(SystemProperties.get("ro.operator", ""))) {
+//            prefSet.setEnabled(false);
+//        } else {
+//            prefSet.setEnabled(true);
+//        }
+        /* @} */
+
+        /* SPRD: FEATURE_APN_NOT_EDITABLE @{ */
+//        if (!mNewApn && !mApnEditable) {
+//            prefSet.setEnabled(false);
+//        }
+        /* @} */
+
+        /* SPRD: Bug 645213 don't allow to modify mvno value @{ */
+//        if (!mNewApn && mVirtualOperator) {
+//            mMvnoType.setEnabled(false);
+//            mMvnoMatchData.setEnabled(false);
+//        }
+        /* @} */
+
+//        getPreferenceScreen().getSharedPreferences()
+//                .registerOnSharedPreferenceChangeListener(this);
+    }
+
+
+    public void onPause() {
+//        getPreferenceScreen().getSharedPreferences()
+//                .unregisterOnSharedPreferenceChangeListener(this);
+//        super.onPause();
+    }
+
+    /* SPRD: for bug 297172: Use common query management Cursor @{ */
+
+    protected void onDestroy() {
+        // TODO Auto-generated method stub
+//        super.onDestroy();
+        if(mCursor != null) {
+            mCursor.close();
+            mCursor = null;
+        }
+    }
+    /* @} */
+
+    private boolean getApnEditable(Cursor cursor) {
+        String version = SystemProperties.get(CURRENT_CARRIER, "default");
+        if ("vodafone".equalsIgnoreCase(version) ||
+                "cucc".equalsIgnoreCase(version) ||
+                ("ctcc".equalsIgnoreCase(version) && "0".equals(cursor.getString(EDITABLE_INDEX)))) {
+            return false;
+        } else {
+            return true;
+        }
+    }
+
+    private void fillUi() {
+        // SPRD: for bug 348288: while Cursor is null, return
+        if (mFirstTime && mCursor.moveToFirst()) {
+            mFirstTime = false;
+            // Fill in all the values from the db in both text editor and summary
+            mName.setText(mCursor.getString(NAME_INDEX));
+            mApn.setText(mCursor.getString(APN_INDEX));
+            mProxy.setText(mCursor.getString(PROXY_INDEX));
+            mPort.setText(mCursor.getString(PORT_INDEX));
+            mUser.setText(mCursor.getString(USER_INDEX));
+            mServer.setText(mCursor.getString(SERVER_INDEX));
+            mPassword.setText(mCursor.getString(PASSWORD_INDEX));
+            mMmsProxy.setText(mCursor.getString(MMSPROXY_INDEX));
+            mMmsPort.setText(mCursor.getString(MMSPORT_INDEX));
+            mMmsc.setText(mCursor.getString(MMSC_INDEX));
+            mMcc.setText(mCursor.getString(MCC_INDEX));
+            mMnc.setText(mCursor.getString(MNC_INDEX));
+            // SPRD: modify for bug271734
+            /* SPRD: add for bug717733 @{ */
+            String strApnType = mCursor.getString(TYPE_INDEX);
+            mApnEditable = getApnEditable(mCursor);
+            Log.i(TAG, "fillUi : mApnEditable = " + mApnEditable
+                    + ",  strApnType = " + strApnType);
+
+
+            mApnTypeSummary = checkNull(strApnType);
+            /* @} */
+            // SPRD: for cmcc case, preloaded apns should not be editable or deleted.
+            mIsPreloaded = ("1".equals(mCursor.getString(PRELOAD_INDEX)));
+
+            if (mNewApn) {
+                /* SPRD: for multi-sim @{ */
+                // String numeric =
+                // SystemProperties.get(TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC);
+                String numeric;
+                if (TelephonyManager.isMultiSim()) {
+                    // APNs are automatically added with MCC+MNC.
+                    // Get the value from appropriate Telephony Property based
+                    // on the mPhoneId.
+                    numeric = SystemProperties
+                                            .get(TelephonyManager.getProperty(TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC, mPhoneId));
+
+                } else {
+                    numeric = SystemProperties.get(TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC);
+                }
+                /* @} */
+                // MCC is first 3 chars and then in 2 - 3 chars of MNC
+                if (numeric != null && numeric.length() > 4) {
+                    // Country code
+                    String mcc = numeric.substring(0, 3);
+                    // Network code
+                    String mnc = numeric.substring(3);
+                    // Auto populate MNC and MCC for new entries, based on what SIM reports
+                    mMcc.setText(mcc);
+                    mMnc.setText(mnc);
+                    mCurMnc = mnc;
+                    mCurMcc = mcc;
+                }
+            }
+            int authVal = mCursor.getInt(AUTH_TYPE_INDEX);
+            if (authVal != -1) {
+                mAuthType.setValueIndex(authVal);
+            } else {
+                mAuthType.setValue(null);
+            }
+
+            mProtocol.setValue(mCursor.getString(PROTOCOL_INDEX));
+            mRoamingProtocol.setValue(mCursor.getString(ROAMING_PROTOCOL_INDEX));
+            mCarrierEnabled.setChecked(mCursor.getInt(CARRIER_ENABLED_INDEX)==1);
+            mBearer.setValue(mCursor.getString(BEARER_INDEX));
+            /* SPRD: Bug 645213 don't allow to modify mvno value @{ */
+            String mvnoType = checkNull(mCursor.getString(MVNO_TYPE_INDEX));
+            String mvnoMatchData = checkNull(mCursor.getString(MVNO_TYPE_INDEX));
+            Log.d(TAG, "fillUi mvnoType = " + mvnoType + ",mvnoMatchData = " + mvnoMatchData);
+            if (mvnoType.equals(sNotSet) && mvnoMatchData.equals(sNotSet)) {
+                mVirtualOperator = true;
+            }
+            /* @} */
+            mMvnoType.setValue(mCursor.getString(MVNO_TYPE_INDEX));
+            mMvnoMatchData.setEnabled(false);
+            mMvnoMatchData.setText(mCursor.getString(MVNO_MATCH_DATA_INDEX));
+            /* SPRD: Bug 628333 modify for support virtual operator @{ */
+            if (mNewApn && mMvnoTypeStr != null && mMvnoMatchDataStr != null) {
+                mMvnoType.setValue(mMvnoTypeStr);
+                mMvnoMatchData.setText(mMvnoMatchDataStr);
+            }
+            /* @} */
+        }
+        // SPRD: modify for bug271734
+        /* SPRD: add for bug713689 @{ */
+        if (mNewApn && TextUtils.isEmpty(mCursor.getString(TYPE_INDEX))) {
+            String[] array = mContext.getResources().getStringArray(R.array.apn_type_array);
+            mApnTypeSummary = array[0];
+        }
+        /* @} */
+        mApnType.setSummary(mApnTypeSummary);
+        mName.setSummary(checkNull(mName.getText()));
+        mApn.setSummary(checkNull(mApn.getText()));
+        mProxy.setSummary(checkNull(mProxy.getText()));
+        mPort.setSummary(checkNull(mPort.getText()));
+        mUser.setSummary(checkNull(mUser.getText()));
+        mServer.setSummary(checkNull(mServer.getText()));
+        mPassword.setSummary(starify(mPassword.getText()));
+        mMmsProxy.setSummary(checkNull(mMmsProxy.getText()));
+        mMmsPort.setSummary(checkNull(mMmsPort.getText()));
+        mMmsc.setSummary(checkNull(mMmsc.getText()));
+        mMcc.setSummary(checkNull(mMcc.getText()));
+        mMnc.setSummary(checkNull(mMnc.getText()));
+
+        String authVal = mAuthType.getValue();
+        if (authVal != null) {
+            int authValIndex = Integer.parseInt(authVal);
+            mAuthType.setValueIndex(authValIndex);
+
+            String[]values = mRes.getStringArray(R.array.apn_auth_entries);
+            mAuthType.setSummary(values[authValIndex]);
+        } else {
+            mAuthType.setSummary(sNotSet);
+        }
+
+        mProtocol.setSummary(
+                checkNull(protocolDescription(mProtocol.getValue(), mProtocol)));
+        mRoamingProtocol.setSummary(
+                checkNull(protocolDescription(mRoamingProtocol.getValue(), mRoamingProtocol)));
+        mBearer.setSummary(
+                checkNull(bearerDescription(mBearer.getValue())));
+//        mMvnoType.setSummary(
+//                checkNull(mvnoDescription(mMvnoType.getValue())));
+
+        String mvnoMatchDataSummery = mMvnoMatchData.getText();
+//        if (isSpecificApnForCdma(mvnoMatchDataSummery)) {
+            mvnoMatchDataSummery = sNotSet;
+//        }
+        mMvnoMatchData.setSummary(checkNull(mvnoMatchDataSummery));
+        //mApnSetting
+        mApnSetting.setmNameStr(checkNull(mName.getText()));
+        mApnSetting.setmApnStr(checkNull(mApn.getText()));
+        mApnSetting.setmProxyStr(checkNull(mProxy.getText()));
+        mApnSetting.setmPortStr(checkNull(mPort.getText()));
+        mApnSetting.setmUserStr(checkNull(mUser.getText()));
+        mApnSetting.setmServerStr(checkNull(mServer.getText()));
+        mApnSetting.setmPasswordStr(checkNull(mPassword.getText()));
+        mApnSetting.setmMmsProxyStr(checkNull(mMmsProxy.getText()));
+        mApnSetting.setmMmsPortStr(checkNull(mMmsPort.getText()));
+        mApnSetting.setmMmscStr(checkNull(mMmsc.getText()));
+        mApnSetting.setmMccStr(checkNull(mMcc.getText()));
+        mApnSetting.setmMncStr(checkNull(mMnc.getText()));
+        mApnSetting.setmApnTypeStr(mApnTypeSummary);
+        mApnSetting.setmAuthTypeStr(checkNull(mAuthType.getValue()));
+        mApnSetting.setmProtocolStr(checkNull(mProtocol.getValue()));
+        mApnSetting.setmRoamingProtocolStr(checkNull(mRoamingProtocol.getValue()));
+        mApnSetting.setmBearerStr(checkNull(mBearer.getValue()));
+        mApnSetting.setmMvnoTypeStr(checkNull(mMvnoType.getValue()));
+        mApnSetting.setmMvnoMatchDataStr(checkNull(mMvnoMatchData.getText()));
+    }
+
+    /**
+     * Returns the UI choice (e.g., "IPv4/IPv6") corresponding to the given
+     * raw value of the protocol preference (e.g., "IPV4V6"). If unknown,
+     * return null.
+     */
+    private String protocolDescription(String raw, ListPreference protocol) {
+        int protocolIndex = protocol.findIndexOfValue(raw);
+        if (protocolIndex == -1) {
+            return null;
+        } else {
+            String[] values = mRes.getStringArray(R.array.apn_protocol_entries);
+            try {
+                return values[protocolIndex];
+            } catch (ArrayIndexOutOfBoundsException e) {
+                return null;
+            }
+        }
+    }
+
+    private String bearerDescription(String raw) {
+        int mBearerIndex = mBearer.findIndexOfValue(raw);
+        if (mBearerIndex == -1) {
+            return null;
+        } else {
+            String[] values = mRes.getStringArray(R.array.bearer_entries);
+            try {
+                return values[mBearerIndex];
+            } catch (ArrayIndexOutOfBoundsException e) {
+                return null;
+            }
+        }
+    }
+
+
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        switch (keyCode) {
+            case KeyEvent.KEYCODE_BACK: {
+                if (validateAndSave(false)) {
+//                    finish();
+                }
+                return true;
+            }
+        }
+        return false;
+//        return super.onKeyDown(keyCode, event);
+    }
+
+    /**
+     * Check the key fields' validity and save if valid.
+     * @param force save even if the fields are not valid, if the app is
+     *        being suspended
+     * @return true if the data was saved
+     */
+    private boolean validateAndSave(boolean force) {
+        String name = checkNotSet(mName.getText());
+        String apn = checkNotSet(mApn.getText());
+        String mcc = checkNotSet(mMcc.getText());
+        String mnc = checkNotSet(mMnc.getText());
+
+        if (getErrorMsg() != null && !force) {
+//            showDialog(ERROR_DIALOG_ID);
+            return false;
+        }
+
+        if (!mCursor.moveToFirst()) {
+            Log.w(TAG,
+                    "Could not go to the first row in the Cursor when saving data.");
+            return false;
+        }
+
+        // If it's a new APN and a name or apn haven't been entered, then erase the entry
+        // SPRD: FEATURE_APN_CAN_BE_EMTPY
+        if (force && mNewApn && name.length() < 1 && apn.length() < 1 && !mAllowEmptyApn) {
+            mContext.getContentResolver().delete(mUri, null, null);
+
+            /* SPRD: for bug 297172: After hanging up the phone, can not save the new apn normally @{ */
+            Log.d(TAG, "The mUri has delete!");
+            mIsdelete = true;
+            /* @} */
+            return false;
+        }
+        //mNewApnSetting
+        mNewApnSetting.setmNameStr(checkNull(mName.getText()));
+        mNewApnSetting.setmApnStr(checkNull(mApn.getText()));
+        mNewApnSetting.setmProxyStr(checkNull(mProxy.getText()));
+        mNewApnSetting.setmPortStr(checkNull(mPort.getText()));
+        mNewApnSetting.setmUserStr(checkNull(mUser.getText()));
+        mNewApnSetting.setmServerStr(checkNull(mServer.getText()));
+        mNewApnSetting.setmPasswordStr(checkNull(mPassword.getText()));
+        mNewApnSetting.setmMmsProxyStr(checkNull(mMmsProxy.getText()));
+        mNewApnSetting.setmMmsPortStr(checkNull(mMmsPort.getText()));
+        mNewApnSetting.setmMmscStr(checkNull(mMmsc.getText()));
+        mNewApnSetting.setmMccStr(checkNull(mMcc.getText()));
+        mNewApnSetting.setmMncStr(checkNull(mMnc.getText()));
+        mNewApnSetting.setmApnTypeStr(checkNull(mApnType.getSummary().toString()));
+        mNewApnSetting.setmAuthTypeStr(checkNull(mAuthType.getValue()));
+        mNewApnSetting.setmProtocolStr(checkNull(mProtocol.getValue()));
+        mNewApnSetting.setmRoamingProtocolStr(checkNull(mRoamingProtocol.getValue()));
+        mNewApnSetting.setmBearerStr(checkNull(mBearer.getValue()));
+        mNewApnSetting.setmMvnoTypeStr(checkNull(mMvnoType.getValue()));
+        mNewApnSetting.setmMvnoMatchDataStr(checkNull(mMvnoMatchData.getText()));
+        boolean mIsApnChange = mApnSetting.equals(mNewApnSetting) ;
+        if (!mIsApnChange) {
+            Log.d(TAG, "mApnSetting: " + mApnSetting.toString());
+            Log.d(TAG, "mNewApnSetting: " + mNewApnSetting.toString());
+            ContentValues values = new ContentValues();
+
+            // Add a dummy name "Untitled", if the user exits the screen without adding a name but
+            // entered other information worth keeping.
+            values.put(Telephony.Carriers.NAME,
+                name.length() < 1 ? mContext.getResources().getString(R.string.untitled_apn) : name);
+            values.put(Telephony.Carriers.APN, apn);
+            values.put(Telephony.Carriers.PROXY, checkNotSet(mProxy.getText()));
+            values.put(Telephony.Carriers.PORT, checkNotSet(mPort.getText()));
+            values.put(Telephony.Carriers.MMSPROXY, checkNotSet(mMmsProxy.getText()));
+            values.put(Telephony.Carriers.MMSPORT, checkNotSet(mMmsPort.getText()));
+            values.put(Telephony.Carriers.USER, checkNotSet(mUser.getText()));
+            values.put(Telephony.Carriers.SERVER, checkNotSet(mServer.getText()));
+            values.put(Telephony.Carriers.PASSWORD, checkNotSet(mPassword.getText()));
+            values.put(Telephony.Carriers.MMSC, checkNotSet(mMmsc.getText()));
+
+            String authVal = mAuthType.getValue();
+            if (authVal != null) {
+                values.put(Telephony.Carriers.AUTH_TYPE, Integer.parseInt(authVal));
+            }
+
+            values.put(Telephony.Carriers.PROTOCOL, checkNotSet(mProtocol.getValue()));
+            values.put(Telephony.Carriers.ROAMING_PROTOCOL, checkNotSet(mRoamingProtocol.getValue()));
+
+            if (mApnType.getSummary() != null) {
+                values.put(Telephony.Carriers.TYPE, checkNotSet(mApnType.getSummary().toString()));
+            }
+
+            values.put(Telephony.Carriers.MCC, mcc);
+            values.put(Telephony.Carriers.MNC, mnc);
+
+            values.put(Telephony.Carriers.NUMERIC, mcc + mnc);
+
+            /* SPRD: for multi-sim @{ */
+            int mDDS = 0;
+            try {
+                mDDS = Settings.System
+                    .getInt(mContext.getContentResolver(), Settings.System.MULTI_SIM_DATA_CALL);
+            } catch (Exception e) {
+               Log.e(TAG, "Exception Reading Dual Sim Data Subscription Value.", e);
+            }
+            /* @} */
+
+            if (mCurMnc != null && mCurMcc != null) {
+                // SPRD: add by spreadst
+                if (mCurMnc.equals(mnc) && mCurMcc.equals(mcc) && mPhoneId == mDDS) {
+                // if (mCurMnc.equals(mnc) && mCurMcc.equals(mcc)) {
+                    values.put(Telephony.Carriers.CURRENT, 1);
+                }
+            }
+
+            String bearerVal = mBearer.getValue();
+            if (bearerVal != null) {
+                values.put(Telephony.Carriers.BEARER, Integer.parseInt(bearerVal));
+            }
+//            if (SPECIAL_CTCC_NUMERIC.equals(mcc+mnc) && isSpecificApnForCdma(CTCC_ICCID)) {
+//                values.put(Telephony.Carriers.MVNO_TYPE, "iccid");
+//                values.put(Telephony.Carriers.MVNO_MATCH_DATA, CTCC_ICCID);
+//            } else {
+                values.put(Telephony.Carriers.MVNO_TYPE, checkNotSet(mMvnoType.getValue()));
+                values.put(Telephony.Carriers.MVNO_MATCH_DATA, checkNotSet(mMvnoMatchData.getText()));
+//            }
+
+            mContext.getContentResolver().update(mUri, values, null, null);
+        }
+        return true;
+    }
+
+    private String getErrorMsg() {
+        String errorMsg = null;
+
+        String name = checkNotSet(mName.getText());
+        String apn = checkNotSet(mApn.getText());
+        String mcc = checkNotSet(mMcc.getText());
+        String mnc = checkNotSet(mMnc.getText());
+        String apnString = (String) mApnType.getSummary();
+        String apnType = checkNotSet(apnString);
+
+        if (name.length() < 1) {
+            errorMsg = mRes.getString(R.string.error_name_empty);
+        // SPRD: FEATURE_APN_CAN_BE_EMTPY
+        } else if (apn.length() < 1 && !mAllowEmptyApn) {
+            errorMsg = mRes.getString(R.string.error_apn_empty);
+        } else if (mcc.length() != 3) {
+            errorMsg = mRes.getString(R.string.error_mcc_not3);
+        } else if ((mnc.length() & 0xFFFE) != 2) {
+            errorMsg = mRes.getString(R.string.error_mnc_not23);
+        } else if (apnType.equals("")) {
+            errorMsg = mRes.getString(R.string.error_apn_type_message);
+        }
+
+        return errorMsg;
+    }
+
+
+
+    private void deleteApn() {
+        mContext.getContentResolver().delete(mUri, null, null);
+//        finish();
+    }
+
+    private String starify(String value) {
+        if (value == null || value.length() == 0) {
+            return sNotSet;
+        } else {
+            char[] password = new char[value.length()];
+            for (int i = 0; i < password.length; i++) {
+                password[i] = '*';
+            }
+            return new String(password);
+        }
+    }
+
+    private String checkNull(String value) {
+        if (value == null || value.length() == 0) {
+            return sNotSet;
+        } else {
+            return value;
+        }
+    }
+
+    private String checkNotSet(String value) {
+        if (value == null || value.equals(sNotSet)) {
+            return "";
+        } else {
+            return value;
+        }
+    }
+
+}
diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml
new file mode 100644 (file)
index 0000000..562a7ce
--- /dev/null
@@ -0,0 +1,987 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2007 The Android Open Source 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">
+
+    <!-- Authentication Types used in APN editor -->
+    <string-array name="apn_auth_entries">
+        <item>None</item>
+        <item>PAP</item>
+        <item>CHAP</item>
+        <item>PAP or CHAP</item>
+    </string-array>
+
+    <string-array translatable="false" name="apn_auth_values">
+        <!-- Do not translate. -->
+        <item>0</item>
+        <!-- Do not translate. -->
+        <item>1</item>
+        <!-- Do not translate. -->
+        <item>2</item>
+        <!-- Do not translate. -->
+        <item>3</item>
+    </string-array>
+
+    <!-- Authentication Types used in APN editor -->
+    <string-array name="apn_protocol_entries">
+        <item>IPv4</item>
+        <item>IPv6</item>
+        <item>IPv4/IPv6</item>
+    </string-array>
+
+    <string-array translatable="false" name="apn_protocol_values">
+        <!-- Do not translate. -->
+        <item>IP</item>
+        <!-- Do not translate. -->
+        <item>IPV6</item>
+        <!-- Do not translate. -->
+        <item>IPV4V6</item>
+    </string-array>
+
+    <!-- Bearer Info used in APN editor -->
+    <string-array name="bearer_entries">
+        <item>LTE</item>
+        <item>eHRPD</item>
+        <item>Unspecified</item>
+    </string-array>
+
+    <string-array translatable="false" name="bearer_values">
+        <!-- Do not translate. -->
+        <item>14</item>
+        <!-- Do not translate. -->
+        <item>13</item>
+        <!-- Do not translate. -->
+        <item>0</item>
+    </string-array>
+
+    <!-- MVNO Info used in APN editor -->
+    <string-array name="mvno_type_entries_ex">
+        <!-- Do not translate. -->
+        <item>None</item>
+        <!-- Do not translate. -->
+        <item>SPN</item>
+        <!-- Do not translate. -->
+        <item>IMSI</item>
+        <!-- Do not translate. -->
+        <item>GID</item>
+        <!-- Do not translate. -->
+        <item>PNN</item>
+    </string-array>
+
+    <string-array translatable="false" name="mvno_type_values_ex">
+        <!-- Do not translate. -->
+        <item></item>
+        <!-- Do not translate. -->
+        <item>spn</item>
+        <!-- Do not translate. -->
+        <item>imsi</item>
+        <!-- Do not translate. -->
+        <item>gid</item>
+        <!-- Do not translate. -->
+        <item>pnn</item>
+    </string-array>
+
+    <!-- Apps on SD installation location options in ApplicationSettings -->
+    <string-array name="app_install_location_entries">
+        <item>Internal device storage</item>
+        <item>Removable SD card</item>
+        <item>Let the system decide</item>
+    </string-array>
+
+    <!-- Apps on SD installation location options in ApplicationSettings -->
+    <string-array name="app_ums_install_location_entries">
+        <item>Internal device storage</item>
+        <item>Mobile internal storage</item>
+        <item>Let the system decide</item>
+    </string-array>
+
+    <!-- Do not translate. -->
+    <string-array name="app_install_location_values" translatable="false">
+        <item>device</item>
+        <item>sdcard</item>
+        <item>auto</item>
+    </string-array>
+
+    <!-- Do not translate. -->
+    <string-array name="app_ums_install_location_values" translatable="false">
+        <item>device</item>
+        <item>internal sdcard</item>
+        <item>auto</item>
+    </string-array>
+
+    <!-- SPRD : add by spreadst @{ -->
+    <!-- Display settings.  Summary for each type of Subscription. -->
+    <string-array name="dualsim_summaries">
+        <item> SIM 1 </item>
+        <item> SIM 2 </item>
+        <item>Always prompt</item>
+    </string-array>
+
+    <string-array name="dualsim_primary_summaries">
+        <item> SIM 1 </item>
+        <item> SIM 2 </item>
+    </string-array>
+
+    <string-array name="dualsim_mms_summaries">
+        <item> SIM 1 </item>
+        <item> SIM 2 </item>
+        <item>Always prompt</item>
+        <item>auto</item>
+    </string-array>
+
+    <!-- Dual SIM settings.  The type of Subscriptions to show. -->
+    <string-array name="dualsim_entries">
+        <item>SIM 1</item>
+        <item>SIM 2</item>
+    </string-array>
+
+    <string-array name="dualsim_setting_entries">
+        <item>SIM 1</item>
+        <item>SIM 2</item>
+        <item>Always prompt</item>
+    </string-array>
+
+    <!-- Do not translate.  Value for each type of Subscription. -->
+    <string-array name="dualsim_values">
+        <!-- Do not translate. -->
+        <item>0</item>
+        <!-- Do not translate. -->
+        <item>1</item>
+    </string-array>
+
+    <string-array name="dualsim_setting_values">
+        <!-- Do not translate. -->
+        <item>0</item>
+        <!-- Do not translate. -->
+        <item>1</item>
+        <!-- Do not translate. -->
+        <item>-1</item>
+    </string-array>
+
+    <string-array name="dualsim_setting_primary_values">
+        <!-- Do not translate. -->
+        <item>0</item>
+        <!-- Do not translate. -->
+        <item>1</item>
+    </string-array>
+
+    <string-array name="dualsim_mms_setting_values">
+        <!-- Do not translate. -->
+        <item>0</item>
+        <!-- Do not translate. -->
+        <item>1</item>
+        <!-- Do not translate. -->
+        <item>-1</item>
+        <item>3</item>
+    </string-array>
+
+    <!-- Silent mode options. -->
+    <string-array name="silent_mode_entries">
+        <item>Off</item>
+        <item>Vibrate</item>
+        <item>Mute</item>
+    </string-array>
+
+    <!-- Values for Silent mode. Do not translate. -->
+    <string-array name="silent_mode_values" translatable="false">
+        <item>off</item>
+        <item>vibrate</item>
+        <item>mute</item>
+    </string-array>
+    <!-- SPRD : add by spreadst @{ -->
+
+    <!-- Names of categories of app ops tabs -->
+    <string-array name="app_ops_categories">
+        <item>Location</item>
+        <item>Personal</item>
+        <item>Messaging</item>
+        <item>Media</item>
+        <item>Device</item>
+    </string-array>
+
+    <!-- User display names for app ops codes -->
+    <string-array name="app_ops_summaries">
+        <item>coarse location</item>
+        <item>fine location</item>
+        <item>GPS</item>
+        <item>vibrate</item>
+        <item>read contacts</item>
+        <item>modify contacts</item>
+        <item>read call log</item>
+        <item>modify call log</item>
+        <item>read calendar</item>
+        <item>modify calendar</item>
+        <item>wi-fi scan</item>
+        <item>notification</item>
+        <item>cell scan</item>
+        <item>call phone</item>
+        <item>read SMS</item>
+        <item>write SMS</item>
+        <item>receive SMS</item>
+        <item>receive emergency SMS</item>
+        <item>receive MMS</item>
+        <item>receive WAP push</item>
+        <item>send SMS</item>
+        <item>read ICC SMS</item>
+        <item>write ICC SMS</item>
+        <item>modify settings</item>
+        <item>draw on top</item>
+        <item>access notifications</item>
+        <item>camera</item>
+        <item>record audio</item>
+        <item>play audio</item>
+        <item>read clipboard</item>
+        <item>modify clipboard</item>
+        <item>media buttons</item>
+        <item>audio focus</item>
+        <item>master volume</item>
+        <item>voice volume</item>
+        <item>ring volume</item>
+        <item>media volume</item>
+        <item>alarm volume</item>
+        <item>notification volume</item>
+        <item>bluetooth volume</item>
+        <item>keep awake</item>
+        <item>monitor location</item>
+        <item>monitor high power location</item>
+    </string-array>
+
+    <!-- User display names for app ops codes -->
+    <string-array name="app_ops_labels">
+        <item>Location</item>
+        <item>Location</item>
+        <item>Location</item>
+        <item>Vibrate</item>
+        <item>Read contacts</item>
+        <item>Modify contacts</item>
+        <item>Read call log</item>
+        <item>Modify call log</item>
+        <item>Read calendar</item>
+        <item>Modify calendar</item>
+        <item>Location</item>
+        <item>Post notification</item>
+        <item>Location</item>
+        <item>Call phone</item>
+        <item>Read SMS/MMS</item>
+        <item>Write SMS/MMS</item>
+        <item>Receive SMS/MMS</item>
+        <item>Receive SMS/MMS</item>
+        <item>Receive SMS/MMS</item>
+        <item>Receive SMS/MMS</item>
+        <item>Send SMS/MMS</item>
+        <item>Read SMS/MMS</item>
+        <item>Write SMS/MMS</item>
+        <item>Modify settings</item>
+        <item>Draw on top</item>
+        <item>Access notifications</item>
+        <item>Camera</item>
+        <item>Record audio</item>
+        <item>Play audio</item>
+        <item>Read clipboard</item>
+        <item>Modify clipboard</item>
+        <item>Media buttons</item>
+        <item>Audio focus</item>
+        <item>Master volume</item>
+        <item>Voice volume</item>
+        <item>Ring volume</item>
+        <item>Media volume</item>
+        <item>Alarm volume</item>
+        <item>Notification volume</item>
+        <item>Bluetooth volume</item>
+        <item>Keep awake</item>
+        <item>Location</item>
+        <item>Location</item>
+    </string-array>
+
+    <!-- Titles for the list of long press timeout options. -->
+    <string-array name="long_press_timeout_selector_titles">
+        <!-- A title for the option for short long-press timeout [CHAR LIMIT=25] -->
+        <item>Short</item>
+        <!-- A title for the option for medium long-press timeout [CHAR LIMIT=25] -->
+        <item>Medium</item>
+        <!-- A title for the option for long long-press timeout [CHAR LIMIT=25] -->
+        <item>Long</item>
+    </string-array>
+
+    <!-- Values for the list of long press timeout options. -->
+    <string-array name="long_press_timeout_selector_values" translatable="false">
+        <item>500</item>
+        <item>1000</item>
+        <item>1500</item>
+    </string-array>
+
+    <!-- Titles for captioning typeface preference. [CHAR LIMIT=35] -->
+    <string-array name="captioning_typeface_selector_titles">
+        <item>Default</item>
+        <item>Sans-serif</item>
+        <item>Sans-serif condensed</item>
+        <item>Serif</item>
+        <item>Monospace</item>
+    </string-array>
+
+    <!-- Values for captioning typeface preference. -->
+    <string-array name="captioning_typeface_selector_values" translatable="false" >
+        <item></item>
+        <item>sans-serif</item>
+        <item>sans-serif-condensed</item>
+        <item>serif</item>
+        <item>monospace</item>
+    </string-array>
+
+    <!-- Titles for captioning font size preference. [CHAR LIMIT=35] -->
+    <string-array name="captioning_font_size_selector_titles">
+        <item>Very small</item>
+        <item>Small</item>
+        <item>Normal</item>
+        <item>Large</item>
+        <item>Very large</item>
+    </string-array>
+
+    <!-- Values for captioning font size preference. -->
+    <string-array name="captioning_font_size_selector_values" translatable="false" >
+        <item>0.25</item>
+        <item>0.5</item>
+        <item>1.0</item>
+        <item>1.25</item>
+        <item>1.5</item>
+    </string-array>
+
+    <!-- Titles for captioning character edge type preference. [CHAR LIMIT=35] -->
+    <string-array name="captioning_edge_type_selector_titles">
+        <item>None</item>
+        <item>Outline</item>
+        <item>Drop shadow</item>
+    </string-array>
+
+    <!-- Values for captioning character edge type preference. -->
+    <integer-array name="captioning_edge_type_selector_values" translatable="false" >
+        <item>0</item>
+        <item>1</item>
+        <item>2</item>
+    </integer-array>
+
+
+
+    <!-- Values for captioning color preference. -->
+    <integer-array name="captioning_color_selector_values" translatable="false" >
+        <item>0xFFFFFFFF</item>
+        <item>0xFF000000</item>
+        <item>0xFFFF0000</item>
+        <item>0xFFFFFF00</item>
+        <item>0xFF00FF00</item>
+        <item>0xFF00FFFF</item>
+        <item>0xFF0000FF</item>
+        <item>0xFFFF00FF</item>
+        <item>0xFF000055</item>
+        <item>0xFF0000AA</item>
+        <item>0xFF005500</item>
+        <item>0xFF005555</item>
+        <item>0xFF0055AA</item>
+        <item>0xFF0055FF</item>
+        <item>0xFF00AA00</item>
+        <item>0xFF00AA55</item>
+        <item>0xFF00AAAA</item>
+        <item>0xFF00AAFF</item>
+        <item>0xFF00FF55</item>
+        <item>0xFF00FFAA</item>
+        <item>0xFF550000</item>
+        <item>0xFF550055</item>
+        <item>0xFF5500AA</item>
+        <item>0xFF5500FF</item>
+        <item>0xFF555500</item>
+        <item>0xFF555555</item>
+        <item>0xFF5555AA</item>
+        <item>0xFF5555FF</item>
+        <item>0xFF55AA00</item>
+        <item>0xFF55AA55</item>
+        <item>0xFF55AAAA</item>
+        <item>0xFF55AAFF</item>
+        <item>0xFF55FF00</item>
+        <item>0xFF55FF55</item>
+        <item>0xFF55FFAA</item>
+        <item>0xFF55FFFF</item>
+        <item>0xFFAA0000</item>
+        <item>0xFFAA0055</item>
+        <item>0xFFAA00AA</item>
+        <item>0xFFAA00FF</item>
+        <item>0xFFAA5500</item>
+        <item>0xFFAA5555</item>
+        <item>0xFFAA55AA</item>
+        <item>0xFFAA55FF</item>
+        <item>0xFFAAAA00</item>
+        <item>0xFFAAAA55</item>
+        <item>0xFFAAAAAA</item>
+        <item>0xFFAAAAFF</item>
+        <item>0xFFAAFF00</item>
+        <item>0xFFAAFF55</item>
+        <item>0xFFAAFFAA</item>
+        <item>0xFFAAFFFF</item>
+        <item>0xFFFF0055</item>
+        <item>0xFFFF00AA</item>
+        <item>0xFFFF5500</item>
+        <item>0xFFFF5555</item>
+        <item>0xFFFF55AA</item>
+        <item>0xFFFF55FF</item>
+        <item>0xFFFFAA00</item>
+        <item>0xFFFFAA55</item>
+        <item>0xFFFFAAAA</item>
+        <item>0xFFFFAAFF</item>
+        <item>0xFFFFFF55</item>
+        <item>0xFFFFFFAA</item>
+    </integer-array>
+
+    <!-- Titles for captioning opacity preference. [CHAR LIMIT=35] -->
+    <string-array name="captioning_opacity_selector_titles" >
+        <item>25%</item>
+        <item>50%</item>
+        <item>75%</item>
+        <item>100%</item>
+    </string-array>
+
+    <!-- Values for captioning opacity preference. -->
+    <integer-array name="captioning_opacity_selector_values" translatable="false" >
+        <item>0x40FFFFFF</item>
+        <item>0x80FFFFFF</item>
+        <item>0xC0FFFFFF</item>
+        <item>0xFFFFFFFF</item>
+    </integer-array>
+
+    <!-- Titles for captioning text style preset preference. [CHAR LIMIT=35] -->
+    <string-array name="captioning_preset_selector_titles" >
+        <item>White on black</item>
+        <item>Black on white</item>
+        <item>Yellow on black</item>
+        <item>Yellow on blue</item>
+        <item>Custom</item>
+    </string-array>
+
+    <!-- Values for captioning text style preset preference. -->
+    <integer-array name="captioning_preset_selector_values" translatable="false" >
+        <item>0</item>
+        <item>1</item>
+        <item>2</item>
+        <item>3</item>
+        <item>-1</item>
+    </integer-array>
+
+    <!-- Titles for runtime selection preference. [CHAR LIMIT=35] -->
+    <string-array name="select_runtime_titles">
+        <item>Dalvik</item>
+        <item>ART</item>
+        <item>ART (debug)</item>
+    </string-array>
+
+    <!-- Values for runtime selection preference. -->
+    <string-array name="select_runtime_values" translatable="false" >
+        <item>libdvm.so</item>
+        <item>libart.so</item>
+        <item>libartd.so</item>
+    </string-array>
+
+    <!-- Summaries for runtime selection preference. [CHAR LIMIT=100]-->
+    <string-array name="select_runtime_summaries" >
+        <item>Use Dalvik</item>
+        <item>Use ART</item>
+        <item>Use ART debug build</item>
+    </string-array>
+
+    <!-- Titles for HDCP checking preference. [CHAR LIMIT=35] -->
+    <string-array name="hdcp_checking_titles">
+        <item>Never check</item>
+        <item>Check for DRM content only</item>
+        <item>Always check</item>
+    </string-array>
+
+    <!-- Values for HDCP checking preference. -->
+    <string-array name="hdcp_checking_values" translatable="false" >
+        <item>never</item>
+        <item>drm-only</item>
+        <item>always</item>
+    </string-array>
+
+    <!-- Summaries for HDCP checking preference. [CHAR LIMIT=100]-->
+    <string-array name="hdcp_checking_summaries" >
+        <item>Never use HDCP checking</item>
+        <item>Use HDCP checking for DRM content only</item>
+        <item>Always use HDCP checking</item>
+    </string-array>
+
+    <!-- Titles for window animation scale preference. [CHAR LIMIT=35] -->
+    <string-array name="window_animation_scale_entries">
+        <item>Animation off</item>
+        <item>Animation scale .5x</item>
+        <item>Animation scale 1x</item>
+        <item>Animation scale 1.5x</item>
+        <item>Animation scale 2x</item>
+        <item>Animation scale 5x</item>
+        <item>Animation scale 10x</item>
+    </string-array>
+
+    <!-- Values for window animation scale preference. -->
+    <string-array name="window_animation_scale_values" translatable="false" >
+        <item>0</item>
+        <item>.5</item>
+        <item>1</item>
+        <item>1.5</item>
+        <item>2</item>
+        <item>5</item>
+        <item>10</item>
+    </string-array>
+
+    <!-- Titles for transition animation scale preference. [CHAR LIMIT=35] -->
+    <string-array name="transition_animation_scale_entries">
+        <item>Animation off</item>
+        <item>Animation scale .5x</item>
+        <item>Animation scale 1x</item>
+        <item>Animation scale 1.5x</item>
+        <item>Animation scale 2x</item>
+        <item>Animation scale 5x</item>
+        <item>Animation scale 10x</item>
+    </string-array>
+
+    <!-- Values for transition animation scale preference. -->
+    <string-array name="transition_animation_scale_values" translatable="false" >
+        <item>0</item>
+        <item>.5</item>
+        <item>1</item>
+        <item>1.5</item>
+        <item>2</item>
+        <item>5</item>
+        <item>10</item>
+    </string-array>
+
+    <!-- Titles for animator duration scale preference. [CHAR LIMIT=35] -->
+    <string-array name="animator_duration_scale_entries">
+        <item>Animation off</item>
+        <item>Animation scale .5x</item>
+        <item>Animation scale 1x</item>
+        <item>Animation scale 1.5x</item>
+        <item>Animation scale 2x</item>
+        <item>Animation scale 5x</item>
+        <item>Animation scale 10x</item>
+    </string-array>
+
+    <!-- Values for animator duration scale preference. -->
+    <string-array name="animator_duration_scale_values" translatable="false" >
+        <item>0</item>
+        <item>.5</item>
+        <item>1</item>
+        <item>1.5</item>
+        <item>2</item>
+        <item>5</item>
+        <item>10</item>
+    </string-array>
+
+    <!-- Titles for overlay display devices preference. [CHAR LIMIT=35] -->
+    <string-array name="overlay_display_devices_entries">
+        <item>None</item>
+        <item>720x480 mdpi</item>
+        <item>720x480 mdpi (secure)</item>
+        <item>1280x720 tvdpi</item>
+        <item>1280x720 tvdpi (secure)</item>
+        <item>1920x1080 xhdpi</item>
+        <item>1920x1080 xhdpi (secure)</item>
+        <item>1280x720 tvdpi and 1920x1080 xhdpi</item>
+    </string-array>
+
+    <!-- Values for overlay display devices preference. -->
+    <string-array name="overlay_display_devices_values" translatable="false" >
+        <item></item>
+        <item>720x480/160</item>
+        <item>720x480/160,secure</item>
+        <item>1280x720/213</item>
+        <item>1280x720/213,secure</item>
+        <item>1920x1080/320</item>
+        <item>1920x1080/320,secure</item>
+        <item>1280x720/213;1920x1080/320</item>
+    </string-array>
+
+    <!-- Titles for OpenGL traces preference. [CHAR LIMIT=35] -->
+    <string-array name="enable_opengl_traces_entries">
+        <item>None</item>
+        <item>Logcat</item>
+        <item>Systrace (Graphics)</item>
+        <item>Call stack on glGetError</item>
+    </string-array>
+
+    <!-- Values for OpenGL traces preference. -->
+    <string-array name="enable_opengl_traces_values" translatable="false" >
+        <item>0</item>
+        <item>1</item>
+        <item>systrace</item>
+        <item>error</item>
+    </string-array>
+
+    <!-- Titles for non-rectangular clipping preference. [CHAR LIMIT=35] -->
+    <string-array name="show_non_rect_clip_entries">
+        <item>Off</item>
+        <item>Draw non-rectangular clip region in blue</item>
+        <item>Highlight tested drawing commands in green</item>
+    </string-array>
+
+    <!-- Values for non-rectangular clipping preference. -->
+    <string-array name="show_non_rect_clip_values" translatable="false" >
+        <item>hide</item>
+        <item>region</item>
+        <item>highlight</item>
+    </string-array>
+
+    <!-- Titles for frame time tracking preference. [CHAR LIMIT=35] -->
+    <string-array name="track_frame_time_entries">
+        <item>Off</item>
+        <item>On screen as bars</item>
+        <item>On screen as lines</item>
+        <item>In adb shell dumpsys gfxinfo</item>
+    </string-array>
+
+    <!-- Values for frame time tracking preference. -->
+    <string-array name="track_frame_time_values" translatable="false" >
+        <item>false</item>
+        <item>visual_bars</item>
+        <item>visual_lines</item>
+        <item>true</item>
+    </string-array>
+
+    <!-- Titles for debug overdraw preference. [CHAR LIMIT=50] -->
+    <string-array name="debug_hw_overdraw_entries">
+        <item>Off</item>
+        <item>Show overdraw areas</item>
+        <item>Show areas for Deuteranomaly</item>
+        <item>Show overdraw counter</item>
+    </string-array>
+
+    <!-- Values for debug overdraw preference. -->
+    <string-array name="debug_hw_overdraw_values" translatable="false" >
+        <item>false</item>
+        <item>show</item>
+        <item>show_deuteranomaly</item>
+        <item>count</item>
+    </string-array>
+
+    <!-- Titles for app process limit preference. [CHAR LIMIT=35] -->
+    <string-array name="app_process_limit_entries">
+        <item>Standard limit</item>
+        <item>No background processes</item>
+        <item>At most 1 process</item>
+        <item>At most 2 processes</item>
+        <item>At most 3 processes</item>
+        <item>At most 4 processes</item>
+    </string-array>
+
+    <!-- Values for app process limit preference. -->
+    <string-array name="app_process_limit_values" translatable="false" >
+        <item>-1</item>
+        <item>0</item>
+        <item>1</item>
+        <item>2</item>
+        <item>3</item>
+        <item>4</item>
+    </string-array>
+
+    <!-- Match this with the constants in VpnProfile. --> <skip />
+    <!-- Short names for each VPN type, not really translatable. [CHAR LIMIT=20] -->
+    <string-array name="vpn_types" translatable="false">
+        <item>PPTP</item>
+        <item>L2TP/IPSec PSK</item>
+        <item>L2TP/IPSec RSA</item>
+        <item>IPSec Xauth PSK</item>
+        <item>IPSec Xauth RSA</item>
+        <item>IPSec Hybrid RSA</item>
+    </string-array>
+
+    <!-- Match this with the constants in VpnProfile. --> <skip />
+    <!-- Longer descriptions for each VPN type. [CHAR LIMIT=100] -->
+    <string-array name="vpn_types_long">
+        <item>PPTP VPN</item>
+        <item>L2TP/IPSec VPN with pre-shared keys</item>
+        <item>L2TP/IPSec VPN with certificates</item>
+        <item>IPSec VPN with pre-shared keys and Xauth authentication</item>
+        <item>IPSec VPN with certificates and Xauth authentication</item>
+        <item>IPSec VPN with certificates and hybrid authentication</item>
+    </string-array>
+
+    <!-- Match this with the constants in LegacyVpnInfo. --> <skip />
+    <!-- Status for a VPN network. [CHAR LIMIT=100] -->
+    <string-array name="vpn_states">
+        <!-- Status message when VPN is disconnected. -->
+        <item>Disconnected</item>
+        <!-- Status message when VPN is initializing. -->
+        <item>Initializing\u2026</item>
+        <!-- Status message when VPN is connecting. -->
+        <item>Connecting\u2026</item>
+        <!-- Status message when VPN is connected. -->
+        <item>Connected</item>
+        <!-- Status message when VPN is timeout. -->
+        <item>Timeout</item>
+        <!-- Status message when VPN is failed. -->
+        <item>Unsuccessful</item>
+    </string-array>
+
+    <!-- User content ratings for restricted users [CHAR LIMIT=30] -->
+    <string-array name="user_content_ratings_entries" translatable="false">
+        <item>Ascended being</item>
+        <item>Human</item>
+        <item>Neanderthal</item>
+        <item>Chimp</item>
+        <item>Monkey</item>
+    </string-array>
+
+    <!-- Values for user content ratings for restricted users -->
+    <string-array name="user_content_ratings_values" translatable="false">
+        <item>5</item>
+        <item>4</item>
+        <item>3</item>
+        <item>2</item>
+        <item>1</item>
+    </string-array>
+
+    <!-- Values for premium SMS permission selector [CHAR LIMIT=30] -->
+    <string-array name="security_settings_premium_sms_values">
+        <!-- Ask user before sending to premium SMS short code. -->
+        <item>Ask</item>
+        <!-- Never allow app to send to premium SMS short code. -->
+        <item>Never allow</item>
+        <!-- Always allow app to send to premium SMS short code. -->
+        <item>Always allow</item>
+    </string-array>
+
+    <!-- [CHAR LIMIT=30] Labels for memory states -->
+    <string-array name="ram_states">
+        <!-- Normal desired memory state. -->
+        <item>normal</item>
+        <!-- Moderate memory state, not as good as normal. -->
+        <item>moderate</item>
+        <!-- Memory is running low. -->
+        <item>low</item>
+        <!-- Memory is critical. -->
+        <item>critical</item>
+    </string-array>
+
+    <!-- SPRD:Modify Bug 208839, Regular boot developmen @{ -->
+    <string-array name="alarm_set">
+        <item>This is set for less than 1 minute from now.</item>
+        <item>This is set for <xliff:g id="DAYS" example="2 days">%1$s</xliff:g> from now.</item>
+        <item>This is set for <xliff:g id="HOURS" example="2 hours">%2$s</xliff:g> from now.</item>
+        <item>This is set for <xliff:g id="DAYS" example="2 days">%1$s</xliff:g> and <xliff:g id="HOURS" example="2 hours">%2$s</xliff:g> from now.</item>
+        <item>This is set for <xliff:g id="MINUTES" example="2 minutes">%3$s</xliff:g> from now.</item>
+        <item>This is set for <xliff:g id="DAYS" example="2 days">%1$s</xliff:g> and <xliff:g id="MINUTES" example="2 minutes">%3$s</xliff:g> from now.</item>
+        <item>This is set for <xliff:g id="HOURS" example="2 hours">%2$s</xliff:g> and <xliff:g id="MINUTES" example="2 minutes">%3$s</xliff:g> from now.</item>
+     <item>This is set for <xliff:g id="DAYS" example="2 days">%1$s</xliff:g>, <xliff:g id="HOURS" example="2 hours">%2$s</xliff:g>, and <xliff:g id="MINUTES" example="2 minutes">%3$s</xliff:g> from now.</item>
+    </string-array>
+    <!-- @} -->
+
+    <!-- SPRD: Add for bug671718. @{ -->
+    <string-array name="cannot_stop_app" translatable="false">
+        <item>com.iflytek.inputmethod</item>
+        <item>com.android.dialer</item>
+    </string-array>
+    <!-- @} -->
+
+    <!-- SPRD:ADD for keep app can not be forced killed.@{ -->
+     <string-array name="cannot_kill_app" translatable="false">
+        <item>com.android.providers.downloads.ui</item>
+        <item>com.android.providers.downloads</item>
+        <item>com.android.dialer</item>
+        <item>com.android.contacts</item>
+        <item>com.android.mms</item>
+        <!-- SPRD:  ADD for bug639331 port form pikel 6.0 start-->
+        <item>com.android.music</item>
+        <item>com.android.providers.userdictionary</item>
+        <item>com.android.providers.calendar</item>
+        <item>com.android.calendar</item>
+        <item>com.android.providers.media</item>
+        <item>com.android.providers.contacts</item>
+        <item>com.google.android.inputmethod.latin</item>
+        <item>com.android.inputmethod.latin</item>
+        <!-- SPRD:  ADD for bug639331 port form pikel 6.0 end-->
+     </string-array>
+    <!-- @} -->
+
+    <!-- SPRD: ADD for cmcc authentication @{ -->
+    <!-- the name of app that we wan't to kill -->
+    <!-- SPRD: for Bug256654, kill the thread of audioprofile,cause the settings thread dead, so add the audioprofile in this white list, make sure the audioprofile thread would not be killed. -->
+    <string-array name="recent_keep_app" translatable="false">
+        <item>com.android.settings</item>
+        <item>com.android.smspush</item>
+        <item>com.android.providers.telephony</item>
+        <item>com.android.phone</item>
+        <item>com.android.defcontainer</item>
+        <item>jp.co.omronsoft.openwnn</item>
+        <item>com.android.systemui</item>
+        <item>android</item>
+        <item>com.android.providers.settings</item>
+        <item>com.android.musicfx</item>
+        <item>com.android.providers.applications</item>
+        <item>com.android.providers.contacts</item>
+        <item>com.android.providers.userdictionary</item>
+        <item>com.android.quicksearchbox</item>
+        <item>com.svox.pico</item>
+        <item>com.android.gallery3d</item>
+        <item>com.android.keychain</item>
+        <item>com.android.launcher</item>
+        <item>com.android.browser</item>
+        <item>com.android.deskclock</item>
+        <item>com.android.providers.calendar</item>
+        <item>com.android.calendar</item>
+        <item>com.android.email</item>
+        <item>com.android.exchange</item>
+        <item>com.android.providers.drm</item>
+        <item>com.android.providers.downloads</item>
+        <item>com.android.providers.media</item>
+        <item>com.android.contacts</item>
+        <item>com.google.android.apps.maps</item>
+        <item>com.android.inputmethod.latin</item>
+
+        <item>com.sprd.audioprofile</item>
+        <item>com.sprd.ramoptimizer</item>
+        <item>com.android.launcher3</item>
+        <item>com.android.sprdlauncher2</item>
+    </string-array>
+    <!-- the name of service that we wan't to kill -->
+    <string-array name="recent_keep_service" translatable="false">
+        <item>com.sprd.ramoptimizer</item>
+    </string-array>
+    <string name="recent_kill_level" translatable="false">1</string>
+    <!-- @} -->
+
+
+    <string-array name="network_type_values">
+        <item>1</item>
+        <item>0</item>
+    </string-array>
+    <!-- @} -->
+
+    <!-- SPRD: add for cmcc wifi feature -->
+    <string-array name="mobile_to_wlan_values">
+        <item>0</item>
+        <item>1</item>
+        <item>2</item>
+    </string-array>
+    <string-array name="mobile_to_wlan">
+        <item>Auto Connect</item>
+        <item>Manual Connect</item>
+        <item>Always Ask</item>
+    </string-array>
+    <!-- @} -->
+
+    <!-- SPRD: add for wep index -->
+    <string-array name="wep_key_index">
+        <item>1</item>
+        <item>2</item>
+        <item>3</item>
+        <item>4</item>
+    </string-array>
+
+    <!-- SPRD: for Bug257276,add new function that user can do multi choice for apn type, and also can edit @{ -->
+    <string-array name="apn_type_array">
+        <item>default</item>
+        <item>mms</item>
+        <item>supl</item>
+        <item>dun</item>
+        <item>hipri</item>
+    </string-array>
+
+    <string-array name="full_apn_type_array">
+        <item>*</item>
+        <item>default</item>
+        <item>mms</item>
+        <item>supl</item>
+        <item>dun</item>
+        <item>hipri</item>
+        <item>fota</item>
+        <item>ims</item>
+        <item>cbs</item>
+        <item>wap</item>
+        <item>dm</item>
+        <item>stk</item>
+        <item>xcap</item>
+    </string-array>
+    <!-- @} -->
+     <!-- SPRD: gps cmcc development -->
+    <string-array name="gps_location_suplserver_entries">
+        <item>MONTERNET</item>
+        <item>GOOGLE</item>
+        <item>NOKIA</item>
+    </string-array>
+    <string-array name="gps_location_suplserver_entries_values">
+        <item>0</item>
+        <item>1</item>
+        <item>2</item>
+    </string-array>
+    <string-array name="gps_config_location_method_entries">
+        <item>msb</item>
+        <item>msa</item>
+    </string-array>
+    <string-array name="gps_config_location_method_entries_values">
+        <item>1</item>
+        <item>2</item>
+    </string-array>
+    <string-array name="agps_setting_entries">
+        <item>open</item>
+        <item>close</item>
+    </string-array>
+    <string-array name="agps_setting_entries_values">
+        <item>1</item>
+        <item>2</item>
+    </string-array>
+
+    <!-- SPRD:ADD for Auto GPS time for bug320995 @{  -->
+    <string-array name="auto_time_entries">
+       <item>Use network-provided time</item>
+       <item>Use GPS-provided time</item>
+       <item>Off</item>
+    </string-array>
+    <string-array name="auto_time_entries_no_gps">
+       <item>Use network-provided time</item>
+       <item>Off</item>
+    </string-array>
+    <!-- @} -->
+    <!-- Array of titles for sim color for multi-sim -->
+     <string-array name="color_picker">
+         <item>Teal</item>
+         <item>Blue</item>
+         <item>Indigo</item>
+         <item>Purple</item>
+         <item>Pink</item>
+         <item>Red</item>
+     </string-array>
+     <attr name="colorAccent" format="color" />
+    <!-- SPRD:ADD for keep Wi-Fi hotspot on entries @{  -->
+    <string-array name="soft_ap_sleep_policy_entries">
+        <item>Always</item>
+        <item>Turn off when idle for 5 mins</item>
+        <item>Turn off when idle for 10 mins</item>
+    </string-array>
+    <string-array name="soft_ap_sleep_policy_entryvalues">
+        <item>0</item>
+        <item>1</item>
+        <item>2</item>
+    </string-array>
+    <!-- @} -->
+    <string-array name="wifi_ap_max_connect">
+        <item>1</item>
+        <item>2</item>
+        <item>3</item>
+        <item>4</item>
+        <item>5</item>
+        <item>6</item>
+        <item>7</item>
+        <item>8</item>
+    </string-array>
+</resources>
index d430323..54a0de9 100644 (file)
     <string name="fr">法语</string>
     <string name="de">德语</string>
 
+
+    <string name="untitled_apn">Untitled</string>
+    <!-- APN error dialog title -->
+    <string name="error_title"></string>
+    <!-- APN error dialog messages: -->
+    <string name="error_name_empty">The Name field can\'t be empty.</string>
+    <!-- APN error dialog messages: -->
+    <string name="error_apn_empty">The APN can\'t be empty.</string>
+    <!-- APN error dialog messages: -->
+    <string name="error_mcc_not3">MCC field must be 3 digits.</string>
+    <!-- APN error dialog messages: -->
+    <string name="error_mnc_not23">MNC field must be 2 or 3 digits.</string>
+    <!-- The message of dialog indicated restoring default APN settings in progress -->
+    <string name="restore_default_apn">Restoring default APN settings.</string>
+    <!-- APNs screen menu option to reset default APN settings -->
+    <string name="menu_restore">Reset to default</string>
+    <!-- APNs screen toast message to inform reset default APN settings is completed -->
+    <string name="restore_default_apn_completed">Reset default APN settings completed.</string>
+    <string name="apn_type_setting">"Setting apn type"</string>
+    <string name="user_could_input_apn_type">"User could input apn type"</string>
+    <string name="could_not_input_the_same_apn_type">"Could not input the same apn type"</string>
+    <string name="apn_type_message">"There does not contain a default type in your new APN, will not be able to select the APN."</string>
+    <string name="error_apn_type_message">"APN type cannot be empty"</string>
+    <string name="error_apn_type">"Apn type you entered is not supported, please re-enter!"</string>
+    <string name="same_apn_type">"You have entered the same type of APN, please re-enter!"</string>
+    <string name="empty_apn_type">"You did not entered or select any type of APN, please re-enter!"</string>
     <!--    法语,德语,意大利-->
 </resources>
index f9afab3..3ee8026 100644 (file)
@@ -3,10 +3,12 @@
 buildscript {
     repositories {
         jcenter()
-        maven {
-            url 'https://maven.google.com/'
-            name 'Google'
-        }
+    maven {
+        url 'https://maven.aliyun.com/repository/public/'
+        name 'Google'
+    }
+    mavenLocal()
+    mavenCentral()
         google()
     }
     dependencies {
@@ -23,13 +25,18 @@ allprojects {
         jcenter()
         maven { url 'https://jitpack.io' }
         maven {
-            url 'https://maven.google.com/'
+            url 'https://maven.aliyun.com/repository/public/'
             name 'Google'
         }
+        mavenLocal()
+        mavenCentral()
+        google()
     }
+
     gradle.projectsEvaluated {
         tasks.withType(JavaCompile) {
             options.compilerArgs.add('-Xbootclasspath/p:app\\libs\\frameworks-full-debug.jar')
+//            options.compilerArgs.add('-Xbootclasspath/p:app\\libs\\frameworks-2-full-debug.jar')
         }
     }
 }
diff --git a/core/core.iml b/core/core.iml
deleted file mode 100644 (file)
index 8f38a0d..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id=":core" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="java-gradle" name="Java-Gradle">
-      <configuration>
-        <option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
-        <option name="BUILDABLE" value="true" />
-      </configuration>
-    </facet>
-    <facet type="android-gradle" name="Android-Gradle">
-      <configuration>
-        <option name="GRADLE_PROJECT_PATH" value=":core" />
-        <option name="LAST_SUCCESSFUL_SYNC_AGP_VERSION" />
-        <option name="LAST_KNOWN_AGP_VERSION" />
-      </configuration>
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
-    <output url="file://$MODULE_DIR$/build/classes/java/main" />
-    <output-test url="file://$MODULE_DIR$/build/classes/java/test" />
-    <exclude-output />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
-      <excludeFolder url="file://$MODULE_DIR$/.gradle" />
-      <excludeFolder url="file://$MODULE_DIR$/build" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" exported="" name="Gradle: juniversalchardet-1.0.3" level="project" />
-  </component>
-</module>
\ No newline at end of file