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

Commit 968d9674 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira Committed by Gerrit Code Review
Browse files

Merge "Revert "Vpn: Setup routes."" into cm-11.0

parents cef811df 5d2479d1
Loading
Loading
Loading
Loading
+0 −17
Original line number Diff line number Diff line
@@ -372,16 +372,6 @@ public class Vpn extends BaseNetworkStateTracker {
            if (jniSetAddresses(interfaze, builder.toString()) < 1) {
                throw new IllegalArgumentException("At least one address must be specified");
            }

            if (config.routes != null) {
                builder = new StringBuilder();
                for (RouteInfo route : config.routes) {
                    String[] split = route.toString().split("->");
                    builder.append(" " + split[0].trim());
                }
                jniSetRoutes(interfaze, builder.toString());
            }

            Connection connection = new Connection();
            if (!mContext.bindServiceAsUser(intent, connection, Context.BIND_AUTO_CREATE,
                        new UserHandle(mUserId))) {
@@ -1141,13 +1131,6 @@ public class Vpn extends BaseNetworkStateTracker {
                }

                // Set the routes.
                StringBuilder builder = new StringBuilder();
                for (RouteInfo route : mConfig.routes) {
                    String[] split = route.toString().split("->");
                    builder.append(" " + split[0].trim());
                }
                jniSetRoutes(mConfig.interfaze, builder.toString());

                long token = Binder.clearCallingIdentity();
                try {
                    mCallback.setMarkedForwarding(mConfig.interfaze);