Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 215e90fc authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "Deprecate a bunch of APIs."

parents 34d06dd9 9567a66a
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -2180,7 +2180,7 @@ package android.app {
    method public void closeContextMenu();
    method public void closeOptionsMenu();
    method public android.app.PendingIntent createPendingResult(int, android.content.Intent, int);
    method public final void dismissDialog(int);
    method public final deprecated void dismissDialog(int);
    method public boolean dispatchGenericMotionEvent(android.view.MotionEvent);
    method public boolean dispatchKeyEvent(android.view.KeyEvent);
    method public boolean dispatchKeyShortcutEvent(android.view.KeyEvent);
@@ -2202,7 +2202,7 @@ package android.app {
    method public android.view.View getCurrentFocus();
    method public android.app.FragmentManager getFragmentManager();
    method public android.content.Intent getIntent();
    method public java.lang.Object getLastNonConfigurationInstance();
    method public deprecated java.lang.Object getLastNonConfigurationInstance();
    method public android.view.LayoutInflater getLayoutInflater();
    method public android.app.LoaderManager getLoaderManager();
    method public java.lang.String getLocalClassName();
@@ -2239,7 +2239,7 @@ package android.app {
    method public void onCreateContextMenu(android.view.ContextMenu, android.view.View, android.view.ContextMenu.ContextMenuInfo);
    method public java.lang.CharSequence onCreateDescription();
    method protected deprecated android.app.Dialog onCreateDialog(int);
    method protected android.app.Dialog onCreateDialog(int, android.os.Bundle);
    method protected deprecated android.app.Dialog onCreateDialog(int, android.os.Bundle);
    method public boolean onCreateOptionsMenu(android.view.Menu);
    method public boolean onCreatePanelMenu(int, android.view.Menu);
    method public android.view.View onCreatePanelView(int);
@@ -2265,13 +2265,13 @@ package android.app {
    method protected void onPostCreate(android.os.Bundle);
    method protected void onPostResume();
    method protected deprecated void onPrepareDialog(int, android.app.Dialog);
    method protected void onPrepareDialog(int, android.app.Dialog, android.os.Bundle);
    method protected deprecated void onPrepareDialog(int, android.app.Dialog, android.os.Bundle);
    method public boolean onPrepareOptionsMenu(android.view.Menu);
    method public boolean onPreparePanel(int, android.view.View, android.view.Menu);
    method protected void onRestart();
    method protected void onRestoreInstanceState(android.os.Bundle);
    method protected void onResume();
    method public java.lang.Object onRetainNonConfigurationInstance();
    method public deprecated java.lang.Object onRetainNonConfigurationInstance();
    method protected void onSaveInstanceState(android.os.Bundle);
    method public boolean onSearchRequested();
    method protected void onStart();
@@ -2289,7 +2289,7 @@ package android.app {
    method public void overridePendingTransition(int, int);
    method public void recreate();
    method public void registerForContextMenu(android.view.View);
    method public final void removeDialog(int);
    method public final deprecated void removeDialog(int);
    method public final boolean requestWindowFeature(int);
    method public final void runOnUiThread(java.lang.Runnable);
    method public void setContentView(int);
@@ -2315,8 +2315,8 @@ package android.app {
    method public void setTitleColor(int);
    method public void setVisible(boolean);
    method public final void setVolumeControlStream(int);
    method public final void showDialog(int);
    method public final boolean showDialog(int, android.os.Bundle);
    method public final deprecated void showDialog(int);
    method public final deprecated boolean showDialog(int, android.os.Bundle);
    method public android.view.ActionMode startActionMode(android.view.ActionMode.Callback);
    method public void startActivityForResult(android.content.Intent, int);
    method public void startActivityFromChild(android.app.Activity, android.content.Intent, int);
@@ -3042,12 +3042,12 @@ package android.app {
  }
  public class KeyguardManager {
    method public void exitKeyguardSecurely(android.app.KeyguardManager.OnKeyguardExitResult);
    method public deprecated void exitKeyguardSecurely(android.app.KeyguardManager.OnKeyguardExitResult);
    method public boolean inKeyguardRestrictedInputMode();
    method public android.app.KeyguardManager.KeyguardLock newKeyguardLock(java.lang.String);
    method public deprecated android.app.KeyguardManager.KeyguardLock newKeyguardLock(java.lang.String);
  }
  public class KeyguardManager.KeyguardLock {
  public deprecated class KeyguardManager.KeyguardLock {
    method public void disableKeyguard();
    method public void reenableKeyguard();
  }
@@ -13961,7 +13961,7 @@ package android.os {
    field public static final int FULL_WAKE_LOCK = 26; // 0x1a
    field public static final int ON_AFTER_RELEASE = 536870912; // 0x20000000
    field public static final int PARTIAL_WAKE_LOCK = 1; // 0x1
    field public static final int SCREEN_BRIGHT_WAKE_LOCK = 10; // 0xa
    field public static final deprecated int SCREEN_BRIGHT_WAKE_LOCK = 10; // 0xa
    field public static final int SCREEN_DIM_WAKE_LOCK = 6; // 0x6
  }
+47 −4
Original line number Diff line number Diff line
@@ -1437,6 +1437,10 @@ public class Activity extends ContextThemeWrapper
    }
    
    /**
     * @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 @@ public class Activity extends ContextThemeWrapper
     * @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 @@ public class Activity extends ContextThemeWrapper
    }

    /**
     * @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 @@ public class Activity extends ContextThemeWrapper
     * 
     * @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 @@ public class Activity extends ContextThemeWrapper
    }

    /**
     * @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 @@ public class Activity extends ContextThemeWrapper
     * @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 @@ public class Activity extends ContextThemeWrapper
    }

    /**
     * @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 @@ public class Activity extends ContextThemeWrapper
     * @see #dismissDialog(int)
     * @see #removeDialog(int)
     */
    @Deprecated
    protected Dialog onCreateDialog(int id, Bundle args) {
        return onCreateDialog(id);
    }
@@ -2756,6 +2774,10 @@ public class Activity extends ContextThemeWrapper
    }

    /**
     * @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 @@ public class Activity extends ContextThemeWrapper
     * @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 @@ public class Activity extends ContextThemeWrapper
     * @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 @@ public class Activity extends ContextThemeWrapper
    }

    /**
     * @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 @@ public class Activity extends ContextThemeWrapper
     * @see #showDialog(int)
     * @see #removeDialog(int)
     */
    @Deprecated
    public final void dismissDialog(int id) {
        if (mManagedDialogs == null) {
            throw missingDialog(id);
@@ -2869,6 +2907,10 @@ public class Activity extends ContextThemeWrapper
    }

    /**
     * @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 @@ public class Activity extends ContextThemeWrapper
     * @see #showDialog(int)
     * @see #dismissDialog(int)
     */
    @Deprecated
    public final void removeDialog(int id) {
        if (mManagedDialogs != null) {
            final ManagedDialog md = mManagedDialogs.get(id);
+10 −0
Original line number Diff line number Diff line
@@ -164,11 +164,21 @@ final class FragmentState implements Parcelable {
 *
 * <p>Topics covered here:
 * <ol>
 * <li><a href="#OlderPlatforms">Older Platforms</a>
 * <li><a href="#Lifecycle">Lifecycle</a>
 * <li><a href="#Layout">Layout</a>
 * <li><a href="#BackStack">Back Stack</a>
 * </ol>
 *
 * <a name="OlderPlatforms"></a>
 * <h3>Older Platforms</h3>
 *
 * While the Fragment API was introduced in
 * {@link android.os.Build.VERSION_CODES#HONEYCOMB}, a version of the API
 * is also available for use on older platforms.  See the blog post
 * <a href="http://android-developers.blogspot.com/2011/03/fragments-for-all.html">
 * Fragments For All</a> for more details.
 *
 * <a name="Lifecycle"></a>
 * <h3>Lifecycle</h3>
 *
+20 −0
Original line number Diff line number Diff line
@@ -35,6 +35,12 @@ public class KeyguardManager {
    private IWindowManager mWM;

    /**
     * @deprecated Use {@link android.view.WindowManager.LayoutParams#FLAG_DISMISS_KEYGUARD}
     * and/or {@link android.view.WindowManager.LayoutParams#FLAG_SHOW_WHEN_LOCKED}
     * instead; this allows you to seamlessly hide the keyguard as your application
     * moves in and out of the foreground and does not require that any special
     * permissions be requested.
     *
     * Handle returned by {@link KeyguardManager#newKeyguardLock} that allows
     * you to disable / reenable the keyguard.
     */
@@ -103,6 +109,12 @@ public class KeyguardManager {
    }

    /**
     * @deprecated Use {@link android.view.WindowManager.LayoutParams#FLAG_DISMISS_KEYGUARD}
     * and/or {@link android.view.WindowManager.LayoutParams#FLAG_SHOW_WHEN_LOCKED}
     * instead; this allows you to seamlessly hide the keyguard as your application
     * moves in and out of the foreground and does not require that any special
     * permissions be requested.
     *
     * Enables you to lock or unlock the keyboard. Get an instance of this class by
     * calling {@link android.content.Context#getSystemService(java.lang.String) Context.getSystemService()}. 
     * This class is wrapped by {@link android.app.KeyguardManager KeyguardManager}.
@@ -112,6 +124,7 @@ public class KeyguardManager {
     * @return A {@link KeyguardLock} handle to use to disable and reenable the
     *   keyguard.
     */
    @Deprecated
    public KeyguardLock newKeyguardLock(String tag) {
        return new KeyguardLock(tag);
    }
@@ -168,6 +181,12 @@ public class KeyguardManager {
    }

    /**
     * @deprecated Use {@link android.view.WindowManager.LayoutParams#FLAG_DISMISS_KEYGUARD}
     * and/or {@link android.view.WindowManager.LayoutParams#FLAG_SHOW_WHEN_LOCKED}
     * instead; this allows you to seamlessly hide the keyguard as your application
     * moves in and out of the foreground and does not require that any special
     * permissions be requested.
     *
     * Exit the keyguard securely.  The use case for this api is that, after
     * disabling the keyguard, your app, which was granted permission to
     * disable the keyguard and show a limited amount of information deemed
@@ -181,6 +200,7 @@ public class KeyguardManager {
     *   it is safe to launch anything that would normally be considered safe
     *   once the user has gotten past the keyguard.
     */
    @Deprecated
    public void exitKeyguardSecurely(final OnKeyguardExitResult callback) {
        try {
            mWM.exitKeyguardSecurely(new IOnKeyguardExitResult.Stub() {
+7 −1
Original line number Diff line number Diff line
@@ -34,12 +34,18 @@ import java.lang.reflect.Modifier;
 * {@link android.content.CursorLoader}, however applications are free to write
 * their own loaders for loading other types of data.
 *
 * While the LoaderManager API was introduced in
 * {@link android.os.Build.VERSION_CODES#HONEYCOMB}, a version of the API
 * is also available for use on older platforms.  See the blog post
 * <a href="http://android-developers.blogspot.com/2011/03/fragments-for-all.html">
 * Fragments For All</a> for more details.
 *
 * <p>As an example, here is the full implementation of a {@link Fragment}
 * that displays a {@link android.widget.ListView} containing the results of
 * a query against the contacts content provider.  It uses a
 * {@link android.content.CursorLoader} to manage the query on the provider.
 *
 * {@sample development/samples/ApiDemos/src/com/example/android/apis/app/FragmentListCursorLoader.java
 * {@sample development/samples/ApiDemos/src/com/example/android/apis/app/LoaderCursor.java
 *      fragment_cursor}
 */
public abstract class LoaderManager {
Loading