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

Commit ef75edaf authored by Robert Greenwalt's avatar Robert Greenwalt Committed by Android Git Automerger
Browse files

am e1635197: am 476f5525: Small fix to 5008973 fix.

* commit 'e1635197':
  Small fix to 5008973 fix.
parents ae68f886 e1635197
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -1083,12 +1083,15 @@ public class ConnectivityService extends IConnectivityManager.Stub {
        if (r.isHostRoute() == false) {
            RouteInfo bestRoute = RouteInfo.selectBestRoute(lp.getRoutes(), r.getGateway());
            if (bestRoute != null) {
                if (bestRoute.getGateway().equals(r.getGateway()) == false) {
                    bestRoute = RouteInfo.makeHostRoute(r.getGateway(), bestRoute.getGateway());
                } else {
                if (bestRoute.getGateway().equals(r.getGateway())) {
                    // if there is no better route, add the implied hostroute for our gateway
                    bestRoute = RouteInfo.makeHostRoute(r.getGateway());
                } else {
                    // if we will connect to our gateway through another route, add a direct
                    // route to it's gateway
                    bestRoute = RouteInfo.makeHostRoute(r.getGateway(), bestRoute.getGateway());
                }
                if (!modifyRoute(ifaceName, lp, bestRoute, cycleCount+1, doAdd)) return false;
                modifyRoute(ifaceName, lp, bestRoute, cycleCount+1, doAdd);
            }
        }
        if (doAdd) {
@@ -1167,9 +1170,6 @@ public class ConnectivityService extends IConnectivityManager.Stub {
    public void setDataDependency(int networkType, boolean met) {
        enforceConnectivityInternalPermission();

        if (DBG) {
            log("setDataDependency(" + networkType + ", " + met + ")");
        }
        mHandler.sendMessage(mHandler.obtainMessage(EVENT_SET_DEPENDENCY_MET,
                (met ? ENABLED : DISABLED), networkType));
    }