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

Commit ac0e6ca0 authored by Todd Kennedy's avatar Todd Kennedy
Browse files

Set host when restoring a fragment

When we restore a fragment [i.e. on configuration change], we need to
make sure the host is set prior to calling into lifecycle methods
such as onInflate(). These use data contained within the host.

Bug: 22512520
Change-Id: I709365a858cfc555ec5b7fc200629fa8d022faad
parent d473a144
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2221,6 +2221,7 @@ final class FragmentManagerImpl extends FragmentManager implements LayoutInflate
            // This fragment was retained from a previous instance; get it
            // going now.
            fragment.mInLayout = true;
            fragment.mHost = mHost;
            // If this fragment is newly instantiated (either right now, or
            // from last saved state), then give it the attributes to
            // initialize itself.