Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 244d10a1 authored by guangl's avatar guangl
Browse files

Settings: The APN cannot be edited after tapping right of APN

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
parent 374f81c4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -135,4 +135,8 @@ public class ApnPreference extends Preference implements
    public void setApnReadOnly(boolean apnReadOnly) {
        mApnReadOnly = apnReadOnly;
    }

    public boolean getApnReadOnly() {
        return mApnReadOnly;
    }
}
+5 −1
Original line number Diff line number Diff line
@@ -462,7 +462,11 @@ public class ApnSettings extends RestrictedSettingsFragment implements
    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;
    }