Fix UI flashing after changing network mode

DashboardFragment will dynamically control every preference's visibility according to preference's availability status, but EID and IMEI preference controllers have incorrect visibility control logic when these two preferences are inavailable, which leads to confliction with DashboardFragment's visibility control logic.

Remove EID and IMEI preferences's visibility settings from their controllers.

Bug: 335369817
Test: the author has tested.
Flag: EXEMPT bugfix
Change-Id: I572f9de07ff3fb8b39294d4b54b04a40a26a78ab
This commit is contained in:
hoffc
2024-04-17 16:30:26 +08:00
committed by SongFerng Wang
parent af053aa3cc
commit e55e9dc90b
2 changed files with 0 additions and 3 deletions

View File

@@ -91,7 +91,6 @@ open class MobileNetworkEidPreferenceController(context: Context, key: String) :
) )
return return
} }
preference.isVisible = false
val viewModel by lazyViewModel val viewModel by lazyViewModel
coroutineScope = viewLifecycleOwner.lifecycleScope coroutineScope = viewLifecycleOwner.lifecycleScope
@@ -127,7 +126,6 @@ open class MobileNetworkEidPreferenceController(context: Context, key: String) :
preference.title = title preference.title = title
preference.dialogTitle = title preference.dialogTitle = title
preference.summary = eid preference.summary = eid
preference.isVisible = eid.isNotEmpty()
} }
override fun handlePreferenceTreeClick(preference: Preference): Boolean { override fun handlePreferenceTreeClick(preference: Preference): Boolean {

View File

@@ -113,7 +113,6 @@ class MobileNetworkImeiPreferenceController(context: Context, key: String) :
private fun refreshUi(){ private fun refreshUi(){
preference.title = title preference.title = title
preference.summary = imei preference.summary = imei
preference.isVisible = true
} }
override fun handlePreferenceTreeClick(preference: Preference): Boolean { override fun handlePreferenceTreeClick(preference: Preference): Boolean {