From 1bb9827d76e7f35a5e8b64097684325ea87f9f6c Mon Sep 17 00:00:00 2001 From: Robert Greenwalt Date: Fri, 28 Aug 2015 12:37:54 -0700 Subject: [PATCH] Reduce CONNECTIVITY_CHANGE bcasts If an app uses the new api (requestNetwork) to bring up MMS, don't mark it as a legacy request. This was done because the messaging service had to use a combination of new API and old (requestRouteToHost) due to api problems. This has been resolved so don't mark these as legacy requests anymore. The general stuff is still in for other types due to lack of testing time but this should be removed altogether in the future. bug:23350688 Change-Id: I41c27efb253c39d8af1357ae7916ed5315c716db --- core/java/android/net/ConnectivityManager.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java index ff6dd327e5..8e5573646c 100644 --- a/core/java/android/net/ConnectivityManager.java +++ b/core/java/android/net/ConnectivityManager.java @@ -1038,11 +1038,13 @@ public class ConnectivityManager { type = "enableDUN"; result = TYPE_MOBILE_DUN; } else if (netCap.hasCapability(NetworkCapabilities.NET_CAPABILITY_SUPL)) { - type = "enableSUPL"; + type = "enableSUPL"; result = TYPE_MOBILE_SUPL; - } else if (netCap.hasCapability(NetworkCapabilities.NET_CAPABILITY_MMS)) { - type = "enableMMS"; - result = TYPE_MOBILE_MMS; + // back out this hack for mms as they no longer need this and it's causing + // device slowdowns - b/23350688 (note, supl still needs this) + //} else if (netCap.hasCapability(NetworkCapabilities.NET_CAPABILITY_MMS)) { + // type = "enableMMS"; + // result = TYPE_MOBILE_MMS; } else if (netCap.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)) { type = "enableHIPRI"; result = TYPE_MOBILE_HIPRI;