Remove useless setUserConfiguration
This commit is contained in:
@@ -161,7 +161,6 @@ Greylisted/blacklisted APIs or internal constants: (some constants are hardcoded
|
|||||||
* (since API 30) `Landroid/net/TetheringManager$TetheringEventCallback;->onTetherableInterfaceRegexpsChanged(Landroid/net/TetheringManager$TetheringInterfaceRegexps;)V,blocked`
|
* (since API 30) `Landroid/net/TetheringManager$TetheringEventCallback;->onTetherableInterfaceRegexpsChanged(Landroid/net/TetheringManager$TetheringInterfaceRegexps;)V,blocked`
|
||||||
* (since API 31) `Landroid/net/wifi/SoftApCapability;->getCountryCode()Ljava/lang/String;,blocked`
|
* (since API 31) `Landroid/net/wifi/SoftApCapability;->getCountryCode()Ljava/lang/String;,blocked`
|
||||||
* (since API 33) `Landroid/net/wifi/SoftApConfiguration$Builder;->setRandomizedMacAddress(Landroid/net/MacAddress;)Landroid/net/wifi/SoftApConfiguration$Builder;,blocked`
|
* (since API 33) `Landroid/net/wifi/SoftApConfiguration$Builder;->setRandomizedMacAddress(Landroid/net/MacAddress;)Landroid/net/wifi/SoftApConfiguration$Builder;,blocked`
|
||||||
* (since API 31) `Landroid/net/wifi/SoftApConfiguration$Builder;->setUserConfiguration(Z)Landroid/net/wifi/SoftApConfiguration$Builder;,blocked`
|
|
||||||
* (since API 31) `Landroid/net/wifi/SoftApConfiguration;->BAND_TYPES:[I,blocked`
|
* (since API 31) `Landroid/net/wifi/SoftApConfiguration;->BAND_TYPES:[I,blocked`
|
||||||
* (since API 31) `Landroid/net/wifi/SoftApInfo;->getApInstanceIdentifier()Ljava/lang/String;,blocked`
|
* (since API 31) `Landroid/net/wifi/SoftApInfo;->getApInstanceIdentifier()Ljava/lang/String;,blocked`
|
||||||
* (since API 31) `Landroid/net/wifi/WifiClient;->getApInstanceIdentifier()Ljava/lang/String;,blocked`
|
* (since API 31) `Landroid/net/wifi/WifiClient;->getApInstanceIdentifier()Ljava/lang/String;,blocked`
|
||||||
|
|||||||
@@ -348,8 +348,6 @@ data class SoftApConfigurationCompat(
|
|||||||
}
|
}
|
||||||
@get:RequiresApi(30)
|
@get:RequiresApi(30)
|
||||||
private val setSsid by lazy @TargetApi(30) { classBuilder.getDeclaredMethod("setSsid", String::class.java) }
|
private val setSsid by lazy @TargetApi(30) { classBuilder.getDeclaredMethod("setSsid", String::class.java) }
|
||||||
@get:RequiresApi(31)
|
|
||||||
private val setUserConfiguration by lazy @TargetApi(31) { UnblockCentral.setUserConfiguration(classBuilder) }
|
|
||||||
@get:RequiresApi(33)
|
@get:RequiresApi(33)
|
||||||
private val setVendorElements by lazy @TargetApi(33) {
|
private val setVendorElements by lazy @TargetApi(33) {
|
||||||
classBuilder.getDeclaredMethod("setVendorElements", java.util.List::class.java)
|
classBuilder.getDeclaredMethod("setVendorElements", java.util.List::class.java)
|
||||||
@@ -556,13 +554,8 @@ data class SoftApConfigurationCompat(
|
|||||||
setMacRandomizationSetting(builder, macRandomizationSetting)
|
setMacRandomizationSetting(builder, macRandomizationSetting)
|
||||||
setBridgedModeOpportunisticShutdownEnabled(builder, isBridgedModeOpportunisticShutdownEnabled)
|
setBridgedModeOpportunisticShutdownEnabled(builder, isBridgedModeOpportunisticShutdownEnabled)
|
||||||
setIeee80211axEnabled(builder, isIeee80211axEnabled)
|
setIeee80211axEnabled(builder, isIeee80211axEnabled)
|
||||||
if (Build.VERSION.SDK_INT >= 33) setIeee80211beEnabled(builder, isIeee80211beEnabled)
|
|
||||||
if (sac?.let { isUserConfiguration(it) as Boolean } != false != isUserConfiguration) try {
|
|
||||||
setUserConfiguration(builder, isUserConfiguration)
|
|
||||||
} catch (e: ReflectiveOperationException) {
|
|
||||||
Timber.w(e) // as far as we are concerned, this field is not used anywhere so ignore for now
|
|
||||||
}
|
|
||||||
if (Build.VERSION.SDK_INT >= 33) {
|
if (Build.VERSION.SDK_INT >= 33) {
|
||||||
|
setIeee80211beEnabled(builder, isIeee80211beEnabled)
|
||||||
setBridgedModeOpportunisticShutdownTimeoutMillis(builder, bridgedModeOpportunisticShutdownTimeoutMillis)
|
setBridgedModeOpportunisticShutdownTimeoutMillis(builder, bridgedModeOpportunisticShutdownTimeoutMillis)
|
||||||
setVendorElements(builder, vendorElements)
|
setVendorElements(builder, vendorElements)
|
||||||
if (sac?.let { getPersistentRandomizedMacAddress(it) as MacAddress } !=
|
if (sac?.let { getPersistentRandomizedMacAddress(it) as MacAddress } !=
|
||||||
|
|||||||
@@ -30,11 +30,6 @@ object UnblockCentral {
|
|||||||
clazz.getDeclaredMethod("setRandomizedMacAddress", MacAddress::class.java)
|
clazz.getDeclaredMethod("setRandomizedMacAddress", MacAddress::class.java)
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(31)
|
|
||||||
fun setUserConfiguration(clazz: Class<*>) = init.let {
|
|
||||||
clazz.getDeclaredMethod("setUserConfiguration", Boolean::class.java)
|
|
||||||
}
|
|
||||||
|
|
||||||
@get:RequiresApi(31)
|
@get:RequiresApi(31)
|
||||||
val SoftApConfiguration_BAND_TYPES get() = init.let {
|
val SoftApConfiguration_BAND_TYPES get() = init.let {
|
||||||
SoftApConfiguration::class.java.getDeclaredField("BAND_TYPES").get(null) as IntArray
|
SoftApConfiguration::class.java.getDeclaredField("BAND_TYPES").get(null) as IntArray
|
||||||
|
|||||||
@@ -429,14 +429,6 @@
|
|||||||
android:layout_marginTop="8dip"
|
android:layout_marginTop="8dip"
|
||||||
android:minHeight="@dimen/touch_target_min"
|
android:minHeight="@dimen/touch_target_min"
|
||||||
android:text="@string/wifi_ieee_80211be" />
|
android:text="@string/wifi_ieee_80211be" />
|
||||||
<com.google.android.material.materialswitch.MaterialSwitch
|
|
||||||
android:id="@+id/user_config"
|
|
||||||
style="@style/wifi_item_label"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="8dip"
|
|
||||||
android:minHeight="@dimen/touch_target_min"
|
|
||||||
android:text="@string/wifi_user_config" />
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/vendor_elements_wrapper"
|
android:id="@+id/vendor_elements_wrapper"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -452,6 +444,15 @@
|
|||||||
android:imeOptions="flagForceAscii"
|
android:imeOptions="flagForceAscii"
|
||||||
android:inputType="textMultiLine|textNoSuggestions" />
|
android:inputType="textMultiLine|textNoSuggestions" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
|
android:id="@+id/user_config"
|
||||||
|
style="@style/wifi_item_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dip"
|
||||||
|
android:enabled="false"
|
||||||
|
android:minHeight="@dimen/touch_target_min"
|
||||||
|
android:text="@string/wifi_user_config" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|||||||
Reference in New Issue
Block a user