Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5d5af9b1 authored by Jeff DeCew's avatar Jeff DeCew
Browse files

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
parent 8fac557d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)
+1 −1
Original line number Diff line number Diff line
@@ -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)