Correct a transient view cleanup error

removeView doesn't remove the view view from the transient children list, so the only way the old call would do anything is if the transient container was incorrect. The new code appears to be what the code was intended to do.

Test: manual
Change-Id: I407dc0bcdb779003a40c5beb9ff80ff5759aa418
This commit is contained in:
Jeff DeCew
2022-01-05 15:56:53 +00:00
parent 8fac557def
commit 5d5af9b1bc
2 changed files with 2 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ class MediaContainerController @Inject constructor(
fun reinflateView(parent: ViewGroup) {
var oldPos = -1
mediaContainerView?.let { _view ->
_view.transientContainer?.removeView(_view)
_view.removeFromTransientContainer()
if (_view.parent === parent) {
oldPos = parent.indexOfChild(_view)
parent.removeView(_view)

View File

@@ -60,7 +60,7 @@ internal class SectionHeaderNodeControllerImpl @Inject constructor(
override fun reinflateView(parent: ViewGroup) {
var oldPos = -1
_view?.let { _view ->
_view.transientContainer?.removeView(_view)
_view.removeFromTransientContainer()
if (_view.parent === parent) {
oldPos = parent.indexOfChild(_view)
parent.removeView(_view)