.. | .. |
---|
3373 | 3373 | Log.e(TAG, "No config to change MAC address to"); |
---|
3374 | 3374 | return; |
---|
3375 | 3375 | } |
---|
3376 | | - MacAddress currentMac = MacAddress.fromString(mWifiNative.getMacAddress(mInterfaceName)); |
---|
| 3376 | + //MacAddress currentMac = MacAddress.fromString(mWifiNative.getMacAddress(mInterfaceName)); |
---|
3377 | 3377 | MacAddress newMac = config.getOrCreateRandomizedMacAddress(); |
---|
3378 | 3378 | mWifiConfigManager.setNetworkRandomizedMacAddress(config.networkId, newMac); |
---|
3379 | 3379 | if (!WifiConfiguration.isValidMacAddressForRandomization(newMac)) { |
---|
3380 | 3380 | Log.wtf(TAG, "Config generated an invalid MAC address"); |
---|
3381 | | - } else if (currentMac.equals(newMac)) { |
---|
3382 | | - Log.d(TAG, "No changes in MAC address"); |
---|
| 3381 | + //} else if (currentMac.equals(newMac)) { |
---|
| 3382 | + // Log.d(TAG, "No changes in MAC address"); |
---|
3383 | 3383 | } else { |
---|
3384 | 3384 | mWifiMetrics.logStaEvent(StaEvent.TYPE_MAC_CHANGE, config); |
---|
3385 | 3385 | boolean setMacSuccess = |
---|
3386 | 3386 | mWifiNative.setMacAddress(mInterfaceName, newMac); |
---|
3387 | 3387 | Log.d(TAG, "ConnectedMacRandomization SSID(" + config.getPrintableSsid() |
---|
3388 | 3388 | + "). setMacAddress(" + newMac.toString() + ") from " |
---|
3389 | | - + currentMac.toString() + " = " + setMacSuccess); |
---|
| 3389 | + + " = " + setMacSuccess); |
---|
3390 | 3390 | } |
---|
3391 | 3391 | } |
---|
3392 | 3392 | |
---|