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

Commit d4132adc authored by yumeng's avatar yumeng Committed by Gerrit - the friendly Code Review server
Browse files

Settings: 8996 MTP "APN Protocol" and "APN Roaming Protocol" is IPv4,not IPv4/IPv6.

set default values for APN protocol when create a new APN.

Change-Id: I6699e7e2942c017f197afb0da91f60363a5f03d1
CRs-Fixed: 921821
parent 7e1f49d2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -106,4 +106,6 @@
    <bool name="config_hide_mms_enable">false</bool>
    <!-- show pop up notification for turn off wifi begin -->
    <bool name="hotspot_show_turn_off_wifi_dialog">false</bool>
    <!-- Whether to enable the default ipv4/v6 for creating new APN -->
    <bool name="config_default_apn_for_new">false</bool>
</resources>
+9 −3
Original line number Diff line number Diff line
@@ -160,6 +160,8 @@ public class ApnEditor extends SettingsPreferenceFragment
    private static final int MVNO_TYPE_INDEX = 21;
    private static final int MVNO_MATCH_DATA_INDEX = 22;

    private static final int DEFAULT_IPV4V6_INDEX = 2;


    @Override
    public void onCreate(Bundle icicle) {
@@ -318,9 +320,13 @@ public class ApnEditor extends SettingsPreferenceFragment
            } else {
                mAuthType.setValue(null);
            }

            if (mNewApn && getResources().getBoolean(R.bool.config_default_apn_for_new)) {
                mProtocol.setValueIndex(DEFAULT_IPV4V6_INDEX);
                mRoamingProtocol.setValueIndex(DEFAULT_IPV4V6_INDEX);
            } else {
                mProtocol.setValue(mCursor.getString(PROTOCOL_INDEX));
                mRoamingProtocol.setValue(mCursor.getString(ROAMING_PROTOCOL_INDEX));
            }
            mCarrierEnabled.setChecked(mCursor.getInt(CARRIER_ENABLED_INDEX)==1);
            mBearerInitialVal = mCursor.getInt(BEARER_INDEX);