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

Commit 081b7d7b authored by Wink Saville's avatar Wink Saville Committed by Android (Google) Code Review
Browse files

Merge "Fix data connection support on emulator."

parents 5aded760 6aa8a21b
Loading
Loading
Loading
Loading
+24 −16
Original line number Diff line number Diff line
@@ -389,9 +389,14 @@ public abstract class DataConnection extends HierarchicalStateMachine {
            }
            result = SetupResult.ERR_Stale;
        } else {
//            log("onSetupConnectionCompleted received " + response.length + " response strings:");
//            for (int i = 0; i < response.length; i++) {
//                log("  response[" + i + "]='" + response[i] + "'");
//            }
            if (response.length >= 2) {
                cid = Integer.parseInt(response[0]);
            if (response.length > 2) {
                interfaceName = response[1];
                if (response.length > 2) {
                    ipAddress = response[2];
                    String prefix = "net." + interfaceName + ".";
                    gatewayAddress = SystemProperties.get(prefix + "gw");
@@ -408,12 +413,15 @@ public abstract class DataConnection extends HierarchicalStateMachine {
                    } else {
                        result = SetupResult.ERR_BadDns;
                    }
                } else {
                    result = SetupResult.SUCCESS;
                }
            } else {
                result = SetupResult.ERR_Other;
            }
        }

        if (DBG) log("DataConnection setup result=" + result + " on cid = " + cid);
        if (DBG) log("DataConnection setup result='" + result + "' on cid=" + cid);
        return result;
    }