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

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

am 476f5525: Small fix to 5008973 fix.

* commit '476f5525':
  Small fix to 5008973 fix.
parents 8550f3b8 476f5525
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -966,12 +966,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) {
@@ -1050,9 +1053,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));
    }