Fix the APN can be edited after tapping the right of APN
in CU mode.
Keep the same when user click the left and right of APN.
Change-Id: Ied5e4f74fab6dfb38352051bd2d1cfe435b2f09b
CRs-Fixed:
1041617
public void setApnReadOnly(boolean apnReadOnly) {
mApnReadOnly = apnReadOnly;
}
+
+ public boolean getApnReadOnly() {
+ return mApnReadOnly;
+ }
}
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));
+ Intent intent = new Intent(Intent.ACTION_EDIT, url);
+ if (preference instanceof ApnPreference) {
+ intent.putExtra("DISABLE_EDITOR", ((ApnPreference) preference).getApnReadOnly());
+ }
+ startActivity(intent);
return true;
}