am 0070ee42: am 5381e4ef: Merge "Refine fix I53e91db7 to apply only to wifi network" into eclair am: 2174048ea2

Original change: undetermined

Change-Id: Id7745414e836ef6ec958385003f145aacf473719
This commit is contained in:
Robert Greenwalt
2021-05-31 03:38:41 +00:00
committed by Automerger Merge Worker

View File

@@ -1280,9 +1280,16 @@ public class ConnectivityService extends IConnectivityManager.Stub {
info = (NetworkInfo) msg.obj;
int type = info.getType();
NetworkInfo.State state = info.getState();
if (mNetAttributes[type].mLastState == state) {
// only do this optimization for wifi. It going into scan mode for location
// services generates alot of noise. Meanwhile the mms apn won't send out
// subsequent notifications when on default cellular because it never
// disconnects.. so only do this to wifi notifications. Fixed better when the
// APN notifications are standardized.
if (mNetAttributes[type].mLastState == state &&
mNetAttributes[type].mRadio == ConnectivityManager.TYPE_WIFI) {
if (DBG) {
// TODO - remove this after we validate the dropping doesn't break anything
// TODO - remove this after we validate the dropping doesn't break
// anything
Log.d(TAG, "Dropping ConnectivityChange for " +
info.getTypeName() + ": " +
state + "/" + info.getDetailedState());