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

Commit 6b9e6fe3 authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "Use a system property to determine mobile interfaces" into froyo

parents 05d48044 46e26a06
Loading
Loading
Loading
Loading
+10 −12
Original line number Diff line number Diff line
@@ -79,18 +79,16 @@ public class MobileDataStateTracker extends NetworkStateTracker {
            mEnabled = false;
        }

        mDnsPropNames = new String[] {
                "net.rmnet0.dns1",
                "net.rmnet0.dns2",
                "net.eth0.dns1",
                "net.eth0.dns2",
                "net.eth0.dns3",
                "net.eth0.dns4",
                "net.gprs.dns1",
                "net.gprs.dns2",
                "net.ppp0.dns1",
                "net.ppp0.dns2"};
        String[] ifNames = SystemProperties.get(
            "mobiledata.interfaces",
            "rmnet0,eth0,gprs,ppp0"
        ).split(",");

        mDnsPropNames = new String[2 * ifNames.length];
        for (int i = 0; i < ifNames.length; ++i) {
            mDnsPropNames[2*i+0] = "net." + ifNames[i] + ".dns1";
            mDnsPropNames[2*i+1] = "net." + ifNames[i] + ".dns2";
        }
    }

    /**