State which fragment is the culprit
Bug:
29565251
Change-Id: If571488882e495c09344bb06376346b3ae8dff16
if (targetSdkVersion > Build.VERSION_CODES.N && (fragmentClass.isAnonymousClass()
|| !Modifier.isPublic(modifiers)
|| (fragmentClass.isMemberClass() && !Modifier.isStatic(modifiers)))) {
- throw new IllegalStateException("Fragment must be a public static class to be "
- + "properly recreated on configuration change.");
+ throw new IllegalStateException("Fragment " + fragmentClass.getCanonicalName()
+ + " must be a public static class to be properly recreated from"
+ + " instance state.");
}
}
fragment.mFragmentManager = mManager;