Merge "Fix issue that read-only apns can be edited" am: e871464053 am: 6b0237ebfb

am: 502ad46dc1

Change-Id: I6bd527b0fb0b63393d5ddf8414257f543a532805
This commit is contained in:
Youming Ye
2018-11-08 17:47:59 -08:00
committed by android-build-merger
2 changed files with 12 additions and 31 deletions

View File

@@ -21,7 +21,6 @@ import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.BroadcastReceiver;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
@@ -65,8 +64,7 @@ import com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
import java.util.ArrayList;
public class ApnSettings extends RestrictedSettingsFragment implements
Preference.OnPreferenceChangeListener {
public class ApnSettings extends RestrictedSettingsFragment {
static final String TAG = "ApnSettings";
public static final String EXTRA_POSITION = "position";
@@ -313,7 +311,6 @@ public class ApnSettings extends RestrictedSettingsFragment implements
pref.setTitle(name);
pref.setSummary(apn);
pref.setPersistent(false);
pref.setOnPreferenceChangeListener(this);
pref.setSubId(subId);
boolean selectable = ((type == null) || !type.equals("mms"));
@@ -405,14 +402,6 @@ public class ApnSettings extends RestrictedSettingsFragment implements
startActivity(intent);
}
@Override
public boolean onPreferenceTreeClick(Preference preference) {
int pos = Integer.parseInt(preference.getKey());
Uri url = ContentUris.withAppendedId(Telephony.Carriers.CONTENT_URI, pos);
startActivity(new Intent(Intent.ACTION_EDIT, url));
return true;
}
public boolean onPreferenceChange(Preference preference, Object newValue) {
Log.d(TAG, "onPreferenceChange(): Preference - " + preference
+ ", newValue - " + newValue + ", newValue type - "