summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorTodd Kennedy <toddke@google.com>2015-10-19 12:48:55 -0700
committerTodd Kennedy <toddke@google.com>2015-10-19 12:55:19 -0700
commitac0e6ca0d20446d34d9855b898611e6960866853 (patch)
tree283173115d61b1c1ff0ad566d1aec9218abe1694 /core
parentd473a1446e520616c4079594bbcf3c6fbe88ed4f (diff)
downloadframeworks_base-ac0e6ca0d20446d34d9855b898611e6960866853.zip
frameworks_base-ac0e6ca0d20446d34d9855b898611e6960866853.tar.gz
frameworks_base-ac0e6ca0d20446d34d9855b898611e6960866853.tar.bz2
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
Diffstat (limited to 'core')
-rw-r--r--core/java/android/app/FragmentManager.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java
index 51d6132..046c87a 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.