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

Commit 81b2d075 authored by Robert Greenwalt's avatar Robert Greenwalt Committed by Android (Google) Code Review
Browse files

Merge "Don't clobber the net hostname if it's already set."

parents b5590846 733c6290
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -264,12 +264,14 @@ public class ConnectivityService extends IConnectivityManager.Stub {
        mHandler = new MyHandler(handlerThread.getLooper());

        // setup our unique device name
        if (TextUtils.isEmpty(SystemProperties.get("net.hostname"))) {
            String id = Settings.Secure.getString(context.getContentResolver(),
                    Settings.Secure.ANDROID_ID);
            if (id != null && id.length() > 0) {
                String name = new String("android_").concat(id);
                SystemProperties.set("net.hostname", name);
            }
        }

        // read our default dns server ip
        String dns = Settings.Secure.getString(context.getContentResolver(),