From ac0e6ca0d20446d34d9855b898611e6960866853 Mon Sep 17 00:00:00 2001 From: Todd Kennedy Date: Mon, 19 Oct 2015 12:48:55 -0700 Subject: 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 --- core/java/android/app/FragmentManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java index 51d613247c87..046c87a461c2 100644 --- a/core/java/android/app/FragmentManager.java +++ b/core/java/android/app/FragmentManager.java @@ -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. -- cgit v1.2.3-59-g8ed1b