Set net.hostname sys property to our unique ID. am: d48f8ee465
Original change: undetermined Change-Id: Id96483d156c1d975ba2e1214fb2b97636428a75f
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user