From 4c656b303351ec773906beaf9563d09b35bae43f Mon Sep 17 00:00:00 2001 From: George Mount Date: Wed, 17 Feb 2016 12:59:49 -0800 Subject: [PATCH] Clear child fragment manager after it is destroyed. Bug 26945643 After a child fragment manager has been destroyed, it should not be reused because it is no longer attached to the host. Clearing it ensures that it will be recreated when it is needed again when the fragment has been reattached. Change-Id: I7e52a42a66d761ab69596fdcdb5b2b2e3b4dcc6c --- core/java/android/app/Fragment.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/java/android/app/Fragment.java b/core/java/android/app/Fragment.java index 02a898b33dd1a..6dbda2d21321d 100644 --- a/core/java/android/app/Fragment.java +++ b/core/java/android/app/Fragment.java @@ -2509,6 +2509,7 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene throw new SuperNotCalledException("Fragment " + this + " did not call through to super.onDestroy()"); } + mChildFragmentManager = null; } private static Transition loadTransition(Context context, TypedArray typedArray,