Loading src/java/com/android/internal/telephony/data/DataProfileManager.java +2 −0 Original line number Diff line number Diff line Loading @@ -237,6 +237,7 @@ public class DataProfileManager extends Handler { profiles.add(new DataProfile.Builder() .setApnSetting(buildDefaultApnSetting("DEFAULT IMS", "ims", ApnSetting.TYPE_IMS)) .setTrafficDescriptor(new TrafficDescriptor("ims", null)) .build()); log("Added default IMS data profile."); } Loading @@ -250,6 +251,7 @@ public class DataProfileManager extends Handler { profiles.add(new DataProfile.Builder() .setApnSetting(buildDefaultApnSetting("DEFAULT EIMS", "sos", ApnSetting.TYPE_EMERGENCY)) .setTrafficDescriptor(new TrafficDescriptor("sos", null)) .build()); log("Added default EIMS data profile."); } Loading tests/telephonytests/src/com/android/internal/telephony/data/DataProfileManagerTest.java +12 −0 Original line number Diff line number Diff line Loading @@ -777,4 +777,16 @@ public class DataProfileManagerTest extends TelephonyTest { Telephony.Carriers.MATCH_ALL_APN_SET_ID); assertThat(mDataProfileManagerUT.isDataProfileValid(dataProfile)).isTrue(); } @Test public void testDefaultEmergencyDataProfileValid() { TelephonyNetworkRequest tnr = new TelephonyNetworkRequest(new NetworkRequest.Builder() .addCapability(NetworkCapabilities.NET_CAPABILITY_EIMS) .build(), mPhone); DataProfile dataProfile = mDataProfileManagerUT.getDataProfileForNetworkRequest( tnr, TelephonyManager.NETWORK_TYPE_LTE); assertThat(dataProfile.getApn()).isEqualTo("sos"); assertThat(dataProfile.getTrafficDescriptor().getDataNetworkName()).isEqualTo("sos"); } } Loading
src/java/com/android/internal/telephony/data/DataProfileManager.java +2 −0 Original line number Diff line number Diff line Loading @@ -237,6 +237,7 @@ public class DataProfileManager extends Handler { profiles.add(new DataProfile.Builder() .setApnSetting(buildDefaultApnSetting("DEFAULT IMS", "ims", ApnSetting.TYPE_IMS)) .setTrafficDescriptor(new TrafficDescriptor("ims", null)) .build()); log("Added default IMS data profile."); } Loading @@ -250,6 +251,7 @@ public class DataProfileManager extends Handler { profiles.add(new DataProfile.Builder() .setApnSetting(buildDefaultApnSetting("DEFAULT EIMS", "sos", ApnSetting.TYPE_EMERGENCY)) .setTrafficDescriptor(new TrafficDescriptor("sos", null)) .build()); log("Added default EIMS data profile."); } Loading
tests/telephonytests/src/com/android/internal/telephony/data/DataProfileManagerTest.java +12 −0 Original line number Diff line number Diff line Loading @@ -777,4 +777,16 @@ public class DataProfileManagerTest extends TelephonyTest { Telephony.Carriers.MATCH_ALL_APN_SET_ID); assertThat(mDataProfileManagerUT.isDataProfileValid(dataProfile)).isTrue(); } @Test public void testDefaultEmergencyDataProfileValid() { TelephonyNetworkRequest tnr = new TelephonyNetworkRequest(new NetworkRequest.Builder() .addCapability(NetworkCapabilities.NET_CAPABILITY_EIMS) .build(), mPhone); DataProfile dataProfile = mDataProfileManagerUT.getDataProfileForNetworkRequest( tnr, TelephonyManager.NETWORK_TYPE_LTE); assertThat(dataProfile.getApn()).isEqualTo("sos"); assertThat(dataProfile.getTrafficDescriptor().getDataNetworkName()).isEqualTo("sos"); } }