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

Commit d7dccd26 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android Git Automerger
Browse files

am 55f1b0b8: am 9d6824cd: Merge "Make Activity.removeDialog() less strict." into gingerbread

Merge commit '55f1b0b8'

* commit '55f1b0b8':
  Make Activity.removeDialog() less strict.
parents 682d143d 55f1b0b8
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -2852,6 +2852,10 @@ public class Activity extends ContextThemeWrapper
     * <p>This can be useful if you know that you will never show a dialog again and
     * want to avoid the overhead of saving and restoring it in the future.
     *
     * <p>As of {@link android.os.Build.VERSION_CODES#GINGERBREAD}, this function
     * will not throw an exception if you try to remove an ID that does not
     * currently have an associated dialog.</p>
     * 
     * @param id The id of the managed dialog.
     *
     * @see #onCreateDialog(int, Bundle)
@@ -2860,18 +2864,14 @@ public class Activity extends ContextThemeWrapper
     * @see #dismissDialog(int)
     */
    public final void removeDialog(int id) {
        if (mManagedDialogs == null) {
            return;
        }

        if (mManagedDialogs != null) {
            final ManagedDialog md = mManagedDialogs.get(id);
        if (md == null) {
            return;
        }

            if (md != null) {
                md.mDialog.dismiss();
                mManagedDialogs.remove(id);
            }
        }
    }

    /**
     * This hook is called when the user signals the desire to start a search.