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

Commit 79a10584 authored by Sreeram Ramachandran's avatar Sreeram Ramachandran Committed by Lorenzo Colitti
Browse files

Set and clear the default network.

Change-Id: I305951e0c4735d708804baa597cc2d9b10f501c0
parent f047f2a8
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -2120,6 +2120,11 @@ public class ConnectivityService extends IConnectivityManager.Stub {
                    log("tryFailover: set mActiveDefaultNetwork=-1, prevNetType=" + prevNetType);
                    log("tryFailover: set mActiveDefaultNetwork=-1, prevNetType=" + prevNetType);
                }
                }
                mActiveDefaultNetwork = -1;
                mActiveDefaultNetwork = -1;
                try {
                    mNetd.clearDefaultNetId();
                } catch (Exception e) {
                    loge("Exception clearing default network :" + e);
                }
            }
            }


            // don't signal a reconnect for anything lower or equal priority than our
            // don't signal a reconnect for anything lower or equal priority than our
@@ -2423,6 +2428,11 @@ public class ConnectivityService extends IConnectivityManager.Stub {
                }
                }
            }
            }
            mActiveDefaultNetwork = newNetType;
            mActiveDefaultNetwork = newNetType;
            try {
                mNetd.setDefaultNetId(thisNetId);
            } catch (Exception e) {
                loge("Exception setting default network :" + e);
            }
            // this will cause us to come up initially as unconnected and switching
            // this will cause us to come up initially as unconnected and switching
            // to connected after our normal pause unless somebody reports us as reall
            // to connected after our normal pause unless somebody reports us as reall
            // disconnected
            // disconnected