Deprecate a bunch of APIs.

And clean up some documentation.

Change-Id: I7882183b3daf883b7ac6098d19f88dc7cfbcdf61
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index ed39457..389d4856 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -1437,6 +1437,10 @@
     }
     
     /**
+     * @deprecated Use the new {@link Fragment} API
+     * {@link Fragment#setRetainInstance(boolean)} instead; this is also
+     * available on older platforms through the Android compatibility package.
+     *
      * Retrieve the non-configuration instance data that was previously
      * returned by {@link #onRetainNonConfigurationInstance()}.  This will
      * be available from the initial {@link #onCreate} and
@@ -1453,12 +1457,17 @@
      * @return Returns the object previously returned by
      * {@link #onRetainNonConfigurationInstance()}.
      */
+    @Deprecated
     public Object getLastNonConfigurationInstance() {
         return mLastNonConfigurationInstances != null
                 ? mLastNonConfigurationInstances.activity : null;
     }
     
     /**
+     * @deprecated Use the new {@link Fragment} API
+     * {@link Fragment#setRetainInstance(boolean)} instead; this is also
+     * available on older platforms through the Android compatibility package.
+     *
      * Called by the system, as part of destroying an
      * activity due to a configuration change, when it is known that a new
      * instance will immediately be created for the new configuration.  You
@@ -1674,6 +1683,10 @@
     }
 
     /**
+     * @deprecated Use the new {@link android.content.CursorLoader} class with
+     * {@link LoaderManager} instead; this is also
+     * available on older platforms through the Android compatibility package.
+     *
      * This method allows the activity to take care of managing the given
      * {@link Cursor}'s lifecycle for you based on the activity's lifecycle.
      * That is, when the activity is stopped it will automatically call
@@ -1689,8 +1702,6 @@
      * 
      * @see #managedQuery(android.net.Uri , String[], String, String[], String)
      * @see #stopManagingCursor
-     *
-     * @deprecated Use {@link CursorLoader} instead.
      */
     @Deprecated
     public void startManagingCursor(Cursor c) {
@@ -1700,6 +1711,10 @@
     }
 
     /**
+     * @deprecated Use the new {@link android.content.CursorLoader} class with
+     * {@link LoaderManager} instead; this is also
+     * available on older platforms through the Android compatibility package.
+     *
      * Given a Cursor that was previously given to
      * {@link #startManagingCursor}, stop the activity's management of that
      * cursor.
@@ -1707,8 +1722,6 @@
      * @param c The Cursor that was being managed.
      * 
      * @see #startManagingCursor
-     *
-     * @deprecated Use {@link CursorLoader} instead.
      */
     @Deprecated
     public void stopManagingCursor(Cursor c) {
@@ -2714,6 +2727,10 @@
     }
 
     /**
+     * @deprecated Use the new {@link DialogFragment} class with
+     * {@link FragmentManager} instead; this is also
+     * available on older platforms through the Android compatibility package.
+     *
      * Callback for creating dialogs that are managed (saved and restored) for you
      * by the activity.  The default implementation calls through to
      * {@link #onCreateDialog(int)} for compatibility.
@@ -2742,6 +2759,7 @@
      * @see #dismissDialog(int)
      * @see #removeDialog(int)
      */
+    @Deprecated
     protected Dialog onCreateDialog(int id, Bundle args) {
         return onCreateDialog(id);
     }
@@ -2756,6 +2774,10 @@
     }
 
     /**
+     * @deprecated Use the new {@link DialogFragment} class with
+     * {@link FragmentManager} instead; this is also
+     * available on older platforms through the Android compatibility package.
+     *
      * Provides an opportunity to prepare a managed dialog before it is being
      * shown.  The default implementation calls through to
      * {@link #onPrepareDialog(int, Dialog)} for compatibility.
@@ -2775,20 +2797,30 @@
      * @see #dismissDialog(int)
      * @see #removeDialog(int)
      */
+    @Deprecated
     protected void onPrepareDialog(int id, Dialog dialog, Bundle args) {
         onPrepareDialog(id, dialog);
     }
 
     /**
+     * @deprecated Use the new {@link DialogFragment} class with
+     * {@link FragmentManager} instead; this is also
+     * available on older platforms through the Android compatibility package.
+     *
      * Simple version of {@link #showDialog(int, Bundle)} that does not
      * take any arguments.  Simply calls {@link #showDialog(int, Bundle)}
      * with null arguments.
      */
+    @Deprecated
     public final void showDialog(int id) {
         showDialog(id, null);
     }
 
     /**
+     * @deprecated Use the new {@link DialogFragment} class with
+     * {@link FragmentManager} instead; this is also
+     * available on older platforms through the Android compatibility package.
+     *
      * Show a dialog managed by this activity.  A call to {@link #onCreateDialog(int, Bundle)}
      * will be made with the same id the first time this is called for a given
      * id.  From thereafter, the dialog will be automatically saved and restored.
@@ -2814,6 +2846,7 @@
      * @see #dismissDialog(int)
      * @see #removeDialog(int)
      */
+    @Deprecated
     public final boolean showDialog(int id, Bundle args) {
         if (mManagedDialogs == null) {
             mManagedDialogs = new SparseArray<ManagedDialog>();
@@ -2835,6 +2868,10 @@
     }
 
     /**
+     * @deprecated Use the new {@link DialogFragment} class with
+     * {@link FragmentManager} instead; this is also
+     * available on older platforms through the Android compatibility package.
+     *
      * Dismiss a dialog that was previously shown via {@link #showDialog(int)}.
      *
      * @param id The id of the managed dialog.
@@ -2847,6 +2884,7 @@
      * @see #showDialog(int)
      * @see #removeDialog(int)
      */
+    @Deprecated
     public final void dismissDialog(int id) {
         if (mManagedDialogs == null) {
             throw missingDialog(id);
@@ -2869,6 +2907,10 @@
     }
 
     /**
+     * @deprecated Use the new {@link DialogFragment} class with
+     * {@link FragmentManager} instead; this is also
+     * available on older platforms through the Android compatibility package.
+     *
      * Removes any internal references to a dialog managed by this Activity.
      * If the dialog is showing, it will dismiss it as part of the clean up.
      *
@@ -2886,6 +2928,7 @@
      * @see #showDialog(int)
      * @see #dismissDialog(int)
      */
+    @Deprecated
     public final void removeDialog(int id) {
         if (mManagedDialogs != null) {
             final ManagedDialog md = mManagedDialogs.get(id);