Skip setting persistent randomized mac if null
This commit is contained in:
@@ -572,8 +572,10 @@ data class SoftApConfigurationCompat(
|
|||||||
setIeee80211beEnabled(builder, isIeee80211beEnabled)
|
setIeee80211beEnabled(builder, isIeee80211beEnabled)
|
||||||
setBridgedModeOpportunisticShutdownTimeoutMillis(builder, bridgedModeOpportunisticShutdownTimeoutMillis)
|
setBridgedModeOpportunisticShutdownTimeoutMillis(builder, bridgedModeOpportunisticShutdownTimeoutMillis)
|
||||||
setVendorElements(builder, vendorElements)
|
setVendorElements(builder, vendorElements)
|
||||||
if (sac?.let { getPersistentRandomizedMacAddress(it) as MacAddress } !=
|
val needsUpdate = persistentRandomizedMacAddress != null && sac?.let {
|
||||||
persistentRandomizedMacAddress) try {
|
getPersistentRandomizedMacAddress(it) as MacAddress
|
||||||
|
} != persistentRandomizedMacAddress
|
||||||
|
if (needsUpdate) try {
|
||||||
setRandomizedMacAddress(builder, persistentRandomizedMacAddress)
|
setRandomizedMacAddress(builder, persistentRandomizedMacAddress)
|
||||||
} catch (e: ReflectiveOperationException) {
|
} catch (e: ReflectiveOperationException) {
|
||||||
Timber.w(e)
|
Timber.w(e)
|
||||||
|
|||||||
Reference in New Issue
Block a user