Loading core/java/android/app/DialogFragment.java +8 −5 Original line number Diff line number Diff line Loading @@ -361,8 +361,8 @@ public class DialogFragment extends Fragment } @Override public void onAttach(Activity activity) { super.onAttach(activity); public void onAttach(Context context) { super.onAttach(context); if (!mShownByMe) { // If not explicitly shown through our API, take this as an // indication that the dialog is no longer dismissed. Loading Loading @@ -394,7 +394,6 @@ public class DialogFragment extends Fragment mShowsDialog = savedInstanceState.getBoolean(SAVED_SHOWS_DIALOG, mShowsDialog); mBackStackId = savedInstanceState.getInt(SAVED_BACK_STACK_ID, -1); } } /** @hide */ Loading Loading @@ -473,11 +472,15 @@ public class DialogFragment extends Fragment View view = getView(); if (view != null) { if (view.getParent() != null) { throw new IllegalStateException("DialogFragment can not be attached to a container view"); throw new IllegalStateException( "DialogFragment can not be attached to a container view"); } mDialog.setContentView(view); } mDialog.setOwnerActivity(getActivity()); final Activity activity = getActivity(); if (activity != null) { mDialog.setOwnerActivity(activity); } mDialog.setCancelable(mCancelable); if (!mDialog.takeCancelAndDismissListeners("DialogFragment", this, this)) { throw new IllegalStateException( Loading core/java/android/app/ListFragment.java +6 −6 Original line number Diff line number Diff line Loading @@ -274,7 +274,7 @@ public class ListFragment extends Fragment { } /** * Get the activity's list view widget. * Get the fragment's list view widget. */ public ListView getListView() { ensureList(); Loading Loading @@ -346,9 +346,9 @@ public class ListFragment extends Fragment { if (shown) { if (animate) { mProgressContainer.startAnimation(AnimationUtils.loadAnimation( getActivity(), android.R.anim.fade_out)); getContext(), android.R.anim.fade_out)); mListContainer.startAnimation(AnimationUtils.loadAnimation( getActivity(), android.R.anim.fade_in)); getContext(), android.R.anim.fade_in)); } else { mProgressContainer.clearAnimation(); mListContainer.clearAnimation(); Loading @@ -358,9 +358,9 @@ public class ListFragment extends Fragment { } else { if (animate) { mProgressContainer.startAnimation(AnimationUtils.loadAnimation( getActivity(), android.R.anim.fade_in)); getContext(), android.R.anim.fade_in)); mListContainer.startAnimation(AnimationUtils.loadAnimation( getActivity(), android.R.anim.fade_out)); getContext(), android.R.anim.fade_out)); } else { mProgressContainer.clearAnimation(); mListContainer.clearAnimation(); Loading @@ -371,7 +371,7 @@ public class ListFragment extends Fragment { } /** * Get the ListAdapter associated with this activity's ListView. * Get the ListAdapter associated with this fragment's ListView. */ public ListAdapter getListAdapter() { return mAdapter; Loading core/java/android/webkit/WebViewFragment.java +1 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ public class WebViewFragment extends Fragment { if (mWebView != null) { mWebView.destroy(); } mWebView = new WebView(getActivity()); mWebView = new WebView(getContext()); mIsWebViewAvailable = true; return mWebView; } Loading core/java/com/android/internal/app/MediaRouteControllerDialogFragment.java +1 −1 Original line number Diff line number Diff line Loading @@ -55,6 +55,6 @@ public class MediaRouteControllerDialogFragment extends DialogFragment { @Override public Dialog onCreateDialog(Bundle savedInstanceState) { return onCreateControllerDialog(getActivity(), savedInstanceState); return onCreateControllerDialog(getContext(), savedInstanceState); } } Loading
core/java/android/app/DialogFragment.java +8 −5 Original line number Diff line number Diff line Loading @@ -361,8 +361,8 @@ public class DialogFragment extends Fragment } @Override public void onAttach(Activity activity) { super.onAttach(activity); public void onAttach(Context context) { super.onAttach(context); if (!mShownByMe) { // If not explicitly shown through our API, take this as an // indication that the dialog is no longer dismissed. Loading Loading @@ -394,7 +394,6 @@ public class DialogFragment extends Fragment mShowsDialog = savedInstanceState.getBoolean(SAVED_SHOWS_DIALOG, mShowsDialog); mBackStackId = savedInstanceState.getInt(SAVED_BACK_STACK_ID, -1); } } /** @hide */ Loading Loading @@ -473,11 +472,15 @@ public class DialogFragment extends Fragment View view = getView(); if (view != null) { if (view.getParent() != null) { throw new IllegalStateException("DialogFragment can not be attached to a container view"); throw new IllegalStateException( "DialogFragment can not be attached to a container view"); } mDialog.setContentView(view); } mDialog.setOwnerActivity(getActivity()); final Activity activity = getActivity(); if (activity != null) { mDialog.setOwnerActivity(activity); } mDialog.setCancelable(mCancelable); if (!mDialog.takeCancelAndDismissListeners("DialogFragment", this, this)) { throw new IllegalStateException( Loading
core/java/android/app/ListFragment.java +6 −6 Original line number Diff line number Diff line Loading @@ -274,7 +274,7 @@ public class ListFragment extends Fragment { } /** * Get the activity's list view widget. * Get the fragment's list view widget. */ public ListView getListView() { ensureList(); Loading Loading @@ -346,9 +346,9 @@ public class ListFragment extends Fragment { if (shown) { if (animate) { mProgressContainer.startAnimation(AnimationUtils.loadAnimation( getActivity(), android.R.anim.fade_out)); getContext(), android.R.anim.fade_out)); mListContainer.startAnimation(AnimationUtils.loadAnimation( getActivity(), android.R.anim.fade_in)); getContext(), android.R.anim.fade_in)); } else { mProgressContainer.clearAnimation(); mListContainer.clearAnimation(); Loading @@ -358,9 +358,9 @@ public class ListFragment extends Fragment { } else { if (animate) { mProgressContainer.startAnimation(AnimationUtils.loadAnimation( getActivity(), android.R.anim.fade_in)); getContext(), android.R.anim.fade_in)); mListContainer.startAnimation(AnimationUtils.loadAnimation( getActivity(), android.R.anim.fade_out)); getContext(), android.R.anim.fade_out)); } else { mProgressContainer.clearAnimation(); mListContainer.clearAnimation(); Loading @@ -371,7 +371,7 @@ public class ListFragment extends Fragment { } /** * Get the ListAdapter associated with this activity's ListView. * Get the ListAdapter associated with this fragment's ListView. */ public ListAdapter getListAdapter() { return mAdapter; Loading
core/java/android/webkit/WebViewFragment.java +1 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ public class WebViewFragment extends Fragment { if (mWebView != null) { mWebView.destroy(); } mWebView = new WebView(getActivity()); mWebView = new WebView(getContext()); mIsWebViewAvailable = true; return mWebView; } Loading
core/java/com/android/internal/app/MediaRouteControllerDialogFragment.java +1 −1 Original line number Diff line number Diff line Loading @@ -55,6 +55,6 @@ public class MediaRouteControllerDialogFragment extends DialogFragment { @Override public Dialog onCreateDialog(Bundle savedInstanceState) { return onCreateControllerDialog(getActivity(), savedInstanceState); return onCreateControllerDialog(getContext(), savedInstanceState); } }