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

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

Merge "Set net.hostname sys property to our unique ID."

parents c5dfa704 de8383ca
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -180,6 +180,15 @@ public class ConnectivityService extends IConnectivityManager.Stub {

    private ConnectivityService(Context context) {
        if (DBG) Log.v(TAG, "ConnectivityService starting up");

        // setup our unique device name
        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);
        }

        mContext = context;
        mNetTrackers = new NetworkStateTracker[
                ConnectivityManager.MAX_NETWORK_TYPE+1];