Fix Fragment.onInflate() to actually work correctly.
Like, um, it needs to be given the Activity since this is called before
the activity is attached.
And it was called after the entire fragment and its *view* was created
when being restored from saved state.
And the documentation was whacked.
Also fix the IME selector to dismiss when you tap outside of it.
Change-Id: Icbcafe7558965a570bdef9cda3441b1f0f7a317c
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 3a82c78..edfd6ef 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -4137,7 +4137,7 @@
fragment.mInLayout = true;
fragment.mImmediateActivity = this;
fragment.mFragmentManager = mFragments;
- fragment.onInflate(attrs, fragment.mSavedFragmentState);
+ fragment.onInflate(this, attrs, fragment.mSavedFragmentState);
mFragments.addFragment(fragment, true);
} else if (fragment.mInLayout) {
@@ -4156,7 +4156,7 @@
// from last saved state), then give it the attributes to
// initialize itself.
if (!fragment.mRetaining) {
- fragment.onInflate(attrs, fragment.mSavedFragmentState);
+ fragment.onInflate(this, attrs, fragment.mSavedFragmentState);
}
mFragments.moveToState(fragment);
}