Loading src/java/com/android/internal/telephony/PhoneSwitcher.java +2 −2 Original line number Diff line number Diff line Loading @@ -736,7 +736,7 @@ public class PhoneSwitcher extends Handler { private void collectRequestNetworkMetrics(NetworkRequest networkRequest) { // Request network for MMS will temporary disable the network on default data subscription, // this only happen on multi-sim device. if (mActiveModemCount > 1 && networkRequest.networkCapabilities.hasCapability( if (mActiveModemCount > 1 && networkRequest.hasCapability( NetworkCapabilities.NET_CAPABILITY_MMS)) { OnDemandDataSwitch onDemandDataSwitch = new OnDemandDataSwitch(); onDemandDataSwitch.apn = TelephonyEvent.ApnType.APN_TYPE_MMS; Loading @@ -748,7 +748,7 @@ public class PhoneSwitcher extends Handler { private void collectReleaseNetworkMetrics(NetworkRequest networkRequest) { // Release network for MMS will recover the network on default data subscription, this only // happen on multi-sim device. if (mActiveModemCount > 1 && networkRequest.networkCapabilities.hasCapability( if (mActiveModemCount > 1 && networkRequest.hasCapability( NetworkCapabilities.NET_CAPABILITY_MMS)) { OnDemandDataSwitch onDemandDataSwitch = new OnDemandDataSwitch(); onDemandDataSwitch.apn = TelephonyEvent.ApnType.APN_TYPE_MMS; Loading src/java/com/android/internal/telephony/dataconnection/ApnContext.java +0 −26 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.internal.telephony.dataconnection; import android.net.ConnectivityManager; import android.net.NetworkCapabilities; import android.net.NetworkRequest; import android.os.Message; Loading Loading @@ -534,31 +533,6 @@ public class ApnContext { return mRetryManager.getRetryAfterDisconnectDelay(); } public static int getApnTypeFromNetworkType(int networkType) { switch (networkType) { case ConnectivityManager.TYPE_MOBILE: return ApnSetting.TYPE_DEFAULT; case ConnectivityManager.TYPE_MOBILE_MMS: return ApnSetting.TYPE_MMS; case ConnectivityManager.TYPE_MOBILE_SUPL: return ApnSetting.TYPE_SUPL; case ConnectivityManager.TYPE_MOBILE_DUN: return ApnSetting.TYPE_DUN; case ConnectivityManager.TYPE_MOBILE_FOTA: return ApnSetting.TYPE_FOTA; case ConnectivityManager.TYPE_MOBILE_IMS: return ApnSetting.TYPE_IMS; case ConnectivityManager.TYPE_MOBILE_CBS: return ApnSetting.TYPE_CBS; case ConnectivityManager.TYPE_MOBILE_IA: return ApnSetting.TYPE_IA; case ConnectivityManager.TYPE_MOBILE_EMERGENCY: return ApnSetting.TYPE_EMERGENCY; default: return ApnSetting.TYPE_NONE; } } static @ApnType int getApnTypeFromNetworkRequest(NetworkRequest nr) { NetworkCapabilities nc = nr.networkCapabilities; // For now, ignore the bandwidth stuff Loading src/java/com/android/internal/telephony/dataconnection/DcNetworkAgent.java +6 −6 Original line number Diff line number Diff line Loading @@ -382,11 +382,11 @@ public class DcNetworkAgent extends NetworkAgent { void handleKeepaliveStarted(final int slot, KeepaliveStatus ks) { switch (ks.statusCode) { case KeepaliveStatus.STATUS_INACTIVE: DcNetworkAgent.this.onSocketKeepaliveEvent(slot, DcNetworkAgent.this.sendSocketKeepaliveEvent(slot, keepaliveStatusErrorToPacketKeepaliveError(ks.errorCode)); break; case KeepaliveStatus.STATUS_ACTIVE: DcNetworkAgent.this.onSocketKeepaliveEvent( DcNetworkAgent.this.sendSocketKeepaliveEvent( slot, SocketKeepalive.SUCCESS); // fall through to add record case KeepaliveStatus.STATUS_PENDING: Loading Loading @@ -417,13 +417,13 @@ public class DcNetworkAgent extends NetworkAgent { switch (kr.currentStatus) { case KeepaliveStatus.STATUS_INACTIVE: logd("Inactive Keepalive received status!"); DcNetworkAgent.this.onSocketKeepaliveEvent( DcNetworkAgent.this.sendSocketKeepaliveEvent( kr.slotId, SocketKeepalive.ERROR_HARDWARE_ERROR); break; case KeepaliveStatus.STATUS_PENDING: switch (ks.statusCode) { case KeepaliveStatus.STATUS_INACTIVE: DcNetworkAgent.this.onSocketKeepaliveEvent(kr.slotId, DcNetworkAgent.this.sendSocketKeepaliveEvent(kr.slotId, keepaliveStatusErrorToPacketKeepaliveError(ks.errorCode)); kr.currentStatus = KeepaliveStatus.STATUS_INACTIVE; mKeepalives.remove(ks.sessionHandle); Loading @@ -431,7 +431,7 @@ public class DcNetworkAgent extends NetworkAgent { case KeepaliveStatus.STATUS_ACTIVE: logd("Pending Keepalive received active status!"); kr.currentStatus = KeepaliveStatus.STATUS_ACTIVE; DcNetworkAgent.this.onSocketKeepaliveEvent( DcNetworkAgent.this.sendSocketKeepaliveEvent( kr.slotId, SocketKeepalive.SUCCESS); break; case KeepaliveStatus.STATUS_PENDING: Loading @@ -445,7 +445,7 @@ public class DcNetworkAgent extends NetworkAgent { switch (ks.statusCode) { case KeepaliveStatus.STATUS_INACTIVE: logd("Keepalive received stopped status!"); DcNetworkAgent.this.onSocketKeepaliveEvent( DcNetworkAgent.this.sendSocketKeepaliveEvent( kr.slotId, SocketKeepalive.SUCCESS); kr.currentStatus = KeepaliveStatus.STATUS_INACTIVE; Loading Loading
src/java/com/android/internal/telephony/PhoneSwitcher.java +2 −2 Original line number Diff line number Diff line Loading @@ -736,7 +736,7 @@ public class PhoneSwitcher extends Handler { private void collectRequestNetworkMetrics(NetworkRequest networkRequest) { // Request network for MMS will temporary disable the network on default data subscription, // this only happen on multi-sim device. if (mActiveModemCount > 1 && networkRequest.networkCapabilities.hasCapability( if (mActiveModemCount > 1 && networkRequest.hasCapability( NetworkCapabilities.NET_CAPABILITY_MMS)) { OnDemandDataSwitch onDemandDataSwitch = new OnDemandDataSwitch(); onDemandDataSwitch.apn = TelephonyEvent.ApnType.APN_TYPE_MMS; Loading @@ -748,7 +748,7 @@ public class PhoneSwitcher extends Handler { private void collectReleaseNetworkMetrics(NetworkRequest networkRequest) { // Release network for MMS will recover the network on default data subscription, this only // happen on multi-sim device. if (mActiveModemCount > 1 && networkRequest.networkCapabilities.hasCapability( if (mActiveModemCount > 1 && networkRequest.hasCapability( NetworkCapabilities.NET_CAPABILITY_MMS)) { OnDemandDataSwitch onDemandDataSwitch = new OnDemandDataSwitch(); onDemandDataSwitch.apn = TelephonyEvent.ApnType.APN_TYPE_MMS; Loading
src/java/com/android/internal/telephony/dataconnection/ApnContext.java +0 −26 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.internal.telephony.dataconnection; import android.net.ConnectivityManager; import android.net.NetworkCapabilities; import android.net.NetworkRequest; import android.os.Message; Loading Loading @@ -534,31 +533,6 @@ public class ApnContext { return mRetryManager.getRetryAfterDisconnectDelay(); } public static int getApnTypeFromNetworkType(int networkType) { switch (networkType) { case ConnectivityManager.TYPE_MOBILE: return ApnSetting.TYPE_DEFAULT; case ConnectivityManager.TYPE_MOBILE_MMS: return ApnSetting.TYPE_MMS; case ConnectivityManager.TYPE_MOBILE_SUPL: return ApnSetting.TYPE_SUPL; case ConnectivityManager.TYPE_MOBILE_DUN: return ApnSetting.TYPE_DUN; case ConnectivityManager.TYPE_MOBILE_FOTA: return ApnSetting.TYPE_FOTA; case ConnectivityManager.TYPE_MOBILE_IMS: return ApnSetting.TYPE_IMS; case ConnectivityManager.TYPE_MOBILE_CBS: return ApnSetting.TYPE_CBS; case ConnectivityManager.TYPE_MOBILE_IA: return ApnSetting.TYPE_IA; case ConnectivityManager.TYPE_MOBILE_EMERGENCY: return ApnSetting.TYPE_EMERGENCY; default: return ApnSetting.TYPE_NONE; } } static @ApnType int getApnTypeFromNetworkRequest(NetworkRequest nr) { NetworkCapabilities nc = nr.networkCapabilities; // For now, ignore the bandwidth stuff Loading
src/java/com/android/internal/telephony/dataconnection/DcNetworkAgent.java +6 −6 Original line number Diff line number Diff line Loading @@ -382,11 +382,11 @@ public class DcNetworkAgent extends NetworkAgent { void handleKeepaliveStarted(final int slot, KeepaliveStatus ks) { switch (ks.statusCode) { case KeepaliveStatus.STATUS_INACTIVE: DcNetworkAgent.this.onSocketKeepaliveEvent(slot, DcNetworkAgent.this.sendSocketKeepaliveEvent(slot, keepaliveStatusErrorToPacketKeepaliveError(ks.errorCode)); break; case KeepaliveStatus.STATUS_ACTIVE: DcNetworkAgent.this.onSocketKeepaliveEvent( DcNetworkAgent.this.sendSocketKeepaliveEvent( slot, SocketKeepalive.SUCCESS); // fall through to add record case KeepaliveStatus.STATUS_PENDING: Loading Loading @@ -417,13 +417,13 @@ public class DcNetworkAgent extends NetworkAgent { switch (kr.currentStatus) { case KeepaliveStatus.STATUS_INACTIVE: logd("Inactive Keepalive received status!"); DcNetworkAgent.this.onSocketKeepaliveEvent( DcNetworkAgent.this.sendSocketKeepaliveEvent( kr.slotId, SocketKeepalive.ERROR_HARDWARE_ERROR); break; case KeepaliveStatus.STATUS_PENDING: switch (ks.statusCode) { case KeepaliveStatus.STATUS_INACTIVE: DcNetworkAgent.this.onSocketKeepaliveEvent(kr.slotId, DcNetworkAgent.this.sendSocketKeepaliveEvent(kr.slotId, keepaliveStatusErrorToPacketKeepaliveError(ks.errorCode)); kr.currentStatus = KeepaliveStatus.STATUS_INACTIVE; mKeepalives.remove(ks.sessionHandle); Loading @@ -431,7 +431,7 @@ public class DcNetworkAgent extends NetworkAgent { case KeepaliveStatus.STATUS_ACTIVE: logd("Pending Keepalive received active status!"); kr.currentStatus = KeepaliveStatus.STATUS_ACTIVE; DcNetworkAgent.this.onSocketKeepaliveEvent( DcNetworkAgent.this.sendSocketKeepaliveEvent( kr.slotId, SocketKeepalive.SUCCESS); break; case KeepaliveStatus.STATUS_PENDING: Loading @@ -445,7 +445,7 @@ public class DcNetworkAgent extends NetworkAgent { switch (ks.statusCode) { case KeepaliveStatus.STATUS_INACTIVE: logd("Keepalive received stopped status!"); DcNetworkAgent.this.onSocketKeepaliveEvent( DcNetworkAgent.this.sendSocketKeepaliveEvent( kr.slotId, SocketKeepalive.SUCCESS); kr.currentStatus = KeepaliveStatus.STATUS_INACTIVE; Loading