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:
@@ -91,7 +91,6 @@ open class MobileNetworkEidPreferenceController(context: Context, key: String) :
|
||||
)
|
||||
return
|
||||
}
|
||||
preference.isVisible = false
|
||||
|
||||
val viewModel by lazyViewModel
|
||||
coroutineScope = viewLifecycleOwner.lifecycleScope
|
||||
@@ -127,7 +126,6 @@ open class MobileNetworkEidPreferenceController(context: Context, key: String) :
|
||||
preference.title = title
|
||||
preference.dialogTitle = title
|
||||
preference.summary = eid
|
||||
preference.isVisible = eid.isNotEmpty()
|
||||
}
|
||||
|
||||
override fun handlePreferenceTreeClick(preference: Preference): Boolean {
|
||||
|
||||
@@ -113,7 +113,6 @@ class MobileNetworkImeiPreferenceController(context: Context, key: String) :
|
||||
private fun refreshUi(){
|
||||
preference.title = title
|
||||
preference.summary = imei
|
||||
preference.isVisible = true
|
||||
}
|
||||
|
||||
override fun handlePreferenceTreeClick(preference: Preference): Boolean {
|
||||
|
||||
Reference in New Issue
Block a user