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

Commit 6aa8a21b authored by Wink Saville's avatar Wink Saville
Browse files

Fix data connection support on emulator.

Bug: 2353316
Change-Id: I34765c70fc6ef160956d400647565c577141c0bf
parent 1337b012
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;
    }