diff --git a/res/values/strings.xml b/res/values/strings.xml
index 533c130..21bec16 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -10041,6 +10041,9 @@
     <!-- Title for HFP(hands free profile) output switch button in settings. -->
     <string name="take_call_on_title">Take call on</string>
 
+    <!-- Toast that appears when users tap an APN for which parameters cannot be viewed. [CHAR LIMIT=NONE] -->
+    <string name="cannot_change_apn_toast">This APN cannot be changed.</string>
+
     <!--  Title for battery Suggestion. (tablet) [CHAR LIMIT=46] -->
     <string name="battery_suggestion_title" product="tablet" >Improve tablet\'s battery life</string>
     <!--  Title for battery Suggestion. (device) [CHAR LIMIT=46] -->
diff --git a/src/com/android/settings/network/ApnPreference.java b/src/com/android/settings/network/ApnPreference.java
index 27d275f..73837af 100755
--- a/src/com/android/settings/network/ApnPreference.java
+++ b/src/com/android/settings/network/ApnPreference.java
@@ -29,6 +29,7 @@
 import android.view.View;
 import android.widget.CompoundButton;
 import android.widget.RadioButton;
+import android.widget.Toast;
 
 import com.android.settings.R;
 
@@ -53,6 +54,7 @@
     private static CompoundButton mCurrentChecked = null;
     private boolean mProtectFromCheckedChange = false;
     private boolean mSelectable = true;
+    private boolean mHideDetails = false;
 
     @Override
     public void onBindViewHolder(PreferenceViewHolder view) {
@@ -112,6 +114,11 @@
         super.onClick();
         Context context = getContext();
         if (context != null) {
+            if (mHideDetails) {
+                Toast.makeText(context, context.getString(
+                        R.string.cannot_change_apn_toast), Toast.LENGTH_LONG).show();
+                return;
+            }
             int pos = Integer.parseInt(getKey());
             Uri url = ContentUris.withAppendedId(Telephony.Carriers.CONTENT_URI, pos);
             Intent editIntent = new Intent(Intent.ACTION_EDIT, url);
@@ -131,4 +138,8 @@
     public void setSubId(int subId) {
         mSubId = subId;
     }
+
+    public void setHideDetails() {
+        mHideDetails = true;
+    }
 }
diff --git a/src/com/android/settings/network/ApnSettings.java b/src/com/android/settings/network/ApnSettings.java
index 5bc52cc..ad7f463 100755
--- a/src/com/android/settings/network/ApnSettings.java
+++ b/src/com/android/settings/network/ApnSettings.java
@@ -77,12 +77,23 @@
     public static final String MVNO_TYPE = "mvno_type";
     public static final String MVNO_MATCH_DATA = "mvno_match_data";
 
+    private static final String[] CARRIERS_PROJECTION = new String[] {
+            Telephony.Carriers._ID,
+            Telephony.Carriers.NAME,
+            Telephony.Carriers.APN,
+            Telephony.Carriers.TYPE,
+            Telephony.Carriers.MVNO_TYPE,
+            Telephony.Carriers.MVNO_MATCH_DATA,
+            Telephony.Carriers.EDITED,
+    };
+
     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 TYPES_INDEX = 3;
     private static final int MVNO_TYPE_INDEX = 4;
     private static final int MVNO_MATCH_DATA_INDEX = 5;
+    private static final int EDITED_INDEX = 6;
 
     private static final int MENU_NEW = Menu.FIRST;
     private static final int MENU_RESTORE = Menu.FIRST + 1;
@@ -115,6 +126,7 @@
 
     private boolean mHideImsApn;
     private boolean mAllowAddingApns;
+    private boolean mHidePresetApnDetails;
 
     public ApnSettings() {
         super(UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS);
@@ -195,6 +207,7 @@
                 mAllowAddingApns = false;
             }
         }
+        mHidePresetApnDetails = b.getBoolean(CarrierConfigManager.KEY_HIDE_PRESET_APN_DETAILS_BOOL);
         mUserManager = UserManager.get(activity);
     }
 
@@ -276,9 +289,8 @@
             where.append(" AND NOT (type='ims')");
         }
 
-        Cursor cursor = getContentResolver().query(Telephony.Carriers.CONTENT_URI, new String[] {
-                "_id", "name", "apn", "type", "mvno_type", "mvno_match_data"}, where.toString(),
-                null, Telephony.Carriers.DEFAULT_SORT_ORDER);
+        Cursor cursor = getContentResolver().query(Telephony.Carriers.CONTENT_URI,
+                CARRIERS_PROJECTION, where.toString(), null, Telephony.Carriers.DEFAULT_SORT_ORDER);
 
         if (cursor != null) {
             IccRecords r = null;
@@ -303,14 +315,19 @@
                 String type = cursor.getString(TYPES_INDEX);
                 String mvnoType = cursor.getString(MVNO_TYPE_INDEX);
                 String mvnoMatchData = cursor.getString(MVNO_MATCH_DATA_INDEX);
+                int edited = cursor.getInt(EDITED_INDEX);
 
                 ApnPreference pref = new ApnPreference(getPrefContext());
 
                 pref.setKey(key);
                 pref.setTitle(name);
-                pref.setSummary(apn);
                 pref.setPersistent(false);
                 pref.setSubId(subId);
+                if (mHidePresetApnDetails && edited == Telephony.Carriers.UNEDITED) {
+                    pref.setHideDetails();
+                } else {
+                    pref.setSummary(apn);
+                }
 
                 boolean selectable = ((type == null) || !type.equals("mms"));
                 pref.setSelectable(selectable);
