[Catalyst] Fix enable state for Wi-Fi hotspot
NO_IFTTT=Catalyst only Bug: 383232049 Flag: com.android.settings.flags.catalyst_tether_settings Test: manual Change-Id: I067e97820a19822eaad2e93e30d42f7f767bf855
This commit is contained in:
@@ -100,7 +100,7 @@ class WifiHotspotSwitchPreference(context: Context, dataSaverStore: KeyValueStor
|
|||||||
.toIntent()
|
.toIntent()
|
||||||
|
|
||||||
override fun isEnabled(context: Context) =
|
override fun isEnabled(context: Context) =
|
||||||
wifiHotspotStore.dataSaverStore.getBoolean(DATA_SAVER_KEY) == true &&
|
wifiHotspotStore.dataSaverStore.getBoolean(DATA_SAVER_KEY) != true &&
|
||||||
super<PreferenceRestrictionMixin>.isEnabled(context)
|
super<PreferenceRestrictionMixin>.isEnabled(context)
|
||||||
|
|
||||||
override val restrictionKeys
|
override val restrictionKeys
|
||||||
@@ -193,6 +193,7 @@ class WifiHotspotSwitchPreference(context: Context, dataSaverStore: KeyValueStor
|
|||||||
super.bind(preference, metadata)
|
super.bind(preference, metadata)
|
||||||
(preference as PrimarySwitchPreference).apply {
|
(preference as PrimarySwitchPreference).apply {
|
||||||
isChecked = preferenceDataStore!!.getBoolean(key, false)
|
isChecked = preferenceDataStore!!.getBoolean(key, false)
|
||||||
|
isSwitchEnabled = isEnabled
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user