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

Commit 7c23e888 authored by Bryse Flowers's avatar Bryse Flowers Committed by Steve Kondik
Browse files

connectivity: Remove net id broadcast change event

Deprecating custom intent.

Change-Id: Ie2a61deaf4a314421282fdd723fd2c42a4900a86
parent c93ca1f1
Loading
Loading
Loading
Loading
+0 −26
Original line number Diff line number Diff line
@@ -178,9 +178,6 @@ public class ConnectivityService extends IConnectivityManager.Stub
    private static final String ACTION_PKT_CNT_SAMPLE_INTERVAL_ELAPSED =
            "android.net.ConnectivityService.action.PKT_CNT_SAMPLE_INTERVAL_ELAPSED";

    private static final String NETID_UPDATE =
        "org.codeaurora.NETID_UPDATE";

    private static final String EXTRA_NETWORK_TYPE = "netType";

    private static final String EXTRA_NETID = "netID";
@@ -4421,18 +4418,6 @@ public class ConnectivityService extends IConnectivityManager.Stub
        }
    }

    private void sendNetworkInfoUpdateBroadcast(int type, int netid) {
        Intent intent = new Intent(NETID_UPDATE);
        intent.putExtra(EXTRA_NETWORK_TYPE, type);
        intent.putExtra(EXTRA_NETID, netid);
        log("sendNetworkInfoUpdateBroadcast type = " + type + " netid = " + netid);
        try {
            mContext.sendBroadcast(intent);
        } catch (SecurityException se) {
            loge("sendPrefChangedBroadcast() SecurityException: " + se);
        }
    }

    private void updateNetworkInfo(NetworkAgentInfo networkAgent, NetworkInfo newInfo) {
        NetworkInfo.State state = newInfo.getState();
        NetworkInfo oldInfo = null;
@@ -4488,17 +4473,6 @@ public class ConnectivityService extends IConnectivityManager.Stub
            // Consider network even though it is not yet validated.
            rematchNetworkAndRequests(networkAgent, NascentState.NOT_JUST_VALIDATED,
                    ReapUnvalidatedNetworks.REAP);
            int val = SystemProperties.getInt("persist.cne.feature", 0);
            boolean isPropFeatureEnabled = (val == 3) ? true : false;
            if (isPropFeatureEnabled) {
               if ((newInfo.getType() == ConnectivityManager.TYPE_WIFI) ||
                    (newInfo.getType() == ConnectivityManager.TYPE_MOBILE)) {
                  if (DBG) {
                    log("sending network info update for type = " + newInfo.getType());
                  }
                  sendNetworkInfoUpdateBroadcast(newInfo.getType(), networkAgent.network.netId);
               }
            }
        } else if (state == NetworkInfo.State.DISCONNECTED ||
                state == NetworkInfo.State.SUSPENDED) {
            networkAgent.asyncChannel.disconnect();