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

Commit 9ed62e47 authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Deprecate FEATURE_PROGRESS and related methods"

parents 49f34019 4aef7c85
Loading
Loading
Loading
Loading
+15 −15
Original line number Diff line number Diff line
@@ -3480,14 +3480,14 @@ package android.app {
    method public void setImmersive(boolean);
    method public void setIntent(android.content.Intent);
    method public final void setMediaController(android.media.session.MediaController);
    method public final void setProgress(int);
    method public final void setProgressBarIndeterminate(boolean);
    method public final void setProgressBarIndeterminateVisibility(boolean);
    method public final void setProgressBarVisibility(boolean);
    method public final deprecated void setProgress(int);
    method public final deprecated void setProgressBarIndeterminate(boolean);
    method public final deprecated void setProgressBarIndeterminateVisibility(boolean);
    method public final deprecated void setProgressBarVisibility(boolean);
    method public void setRequestedOrientation(int);
    method public final void setResult(int);
    method public final void setResult(int, android.content.Intent);
    method public final void setSecondaryProgress(int);
    method public final deprecated void setSecondaryProgress(int);
    method public void setTaskDescription(android.app.ActivityManager.TaskDescription);
    method public void setTitle(java.lang.CharSequence);
    method public void setTitle(int);
@@ -37379,23 +37379,23 @@ package android.view {
    field public static final int FEATURE_CONTENT_TRANSITIONS = 12; // 0xc
    field public static final int FEATURE_CONTEXT_MENU = 6; // 0x6
    field public static final int FEATURE_CUSTOM_TITLE = 7; // 0x7
    field public static final int FEATURE_INDETERMINATE_PROGRESS = 5; // 0x5
    field public static final deprecated int FEATURE_INDETERMINATE_PROGRESS = 5; // 0x5
    field public static final int FEATURE_LEFT_ICON = 3; // 0x3
    field public static final int FEATURE_NO_TITLE = 1; // 0x1
    field public static final int FEATURE_OPTIONS_PANEL = 0; // 0x0
    field public static final int FEATURE_PROGRESS = 2; // 0x2
    field public static final deprecated int FEATURE_PROGRESS = 2; // 0x2
    field public static final int FEATURE_RIGHT_ICON = 4; // 0x4
    field public static final int FEATURE_SWIPE_TO_DISMISS = 11; // 0xb
    field public static final int ID_ANDROID_CONTENT = 16908290; // 0x1020002
    field public static final java.lang.String NAVIGATION_BAR_BACKGROUND_TRANSITION_NAME = "android:navigation:background";
    field public static final int PROGRESS_END = 10000; // 0x2710
    field public static final int PROGRESS_INDETERMINATE_OFF = -4; // 0xfffffffc
    field public static final int PROGRESS_INDETERMINATE_ON = -3; // 0xfffffffd
    field public static final int PROGRESS_SECONDARY_END = 30000; // 0x7530
    field public static final int PROGRESS_SECONDARY_START = 20000; // 0x4e20
    field public static final int PROGRESS_START = 0; // 0x0
    field public static final int PROGRESS_VISIBILITY_OFF = -2; // 0xfffffffe
    field public static final int PROGRESS_VISIBILITY_ON = -1; // 0xffffffff
    field public static final deprecated int PROGRESS_END = 10000; // 0x2710
    field public static final deprecated int PROGRESS_INDETERMINATE_OFF = -4; // 0xfffffffc
    field public static final deprecated int PROGRESS_INDETERMINATE_ON = -3; // 0xfffffffd
    field public static final deprecated int PROGRESS_SECONDARY_END = 30000; // 0x7530
    field public static final deprecated int PROGRESS_SECONDARY_START = 20000; // 0x4e20
    field public static final deprecated int PROGRESS_START = 0; // 0x0
    field public static final deprecated int PROGRESS_VISIBILITY_OFF = -2; // 0xfffffffe
    field public static final deprecated int PROGRESS_VISIBILITY_ON = -1; // 0xffffffff
    field public static final java.lang.String STATUS_BAR_BACKGROUND_TRANSITION_NAME = "android:status:background";
  }
+15 −15
Original line number Diff line number Diff line
@@ -3583,14 +3583,14 @@ package android.app {
    method public void setImmersive(boolean);
    method public void setIntent(android.content.Intent);
    method public final void setMediaController(android.media.session.MediaController);
    method public final void setProgress(int);
    method public final void setProgressBarIndeterminate(boolean);
    method public final void setProgressBarIndeterminateVisibility(boolean);
    method public final void setProgressBarVisibility(boolean);
    method public final deprecated void setProgress(int);
    method public final deprecated void setProgressBarIndeterminate(boolean);
    method public final deprecated void setProgressBarIndeterminateVisibility(boolean);
    method public final deprecated void setProgressBarVisibility(boolean);
    method public void setRequestedOrientation(int);
    method public final void setResult(int);
    method public final void setResult(int, android.content.Intent);
    method public final void setSecondaryProgress(int);
    method public final deprecated void setSecondaryProgress(int);
    method public void setTaskDescription(android.app.ActivityManager.TaskDescription);
    method public void setTitle(java.lang.CharSequence);
    method public void setTitle(int);
@@ -39674,23 +39674,23 @@ package android.view {
    field public static final int FEATURE_CONTENT_TRANSITIONS = 12; // 0xc
    field public static final int FEATURE_CONTEXT_MENU = 6; // 0x6
    field public static final int FEATURE_CUSTOM_TITLE = 7; // 0x7
    field public static final int FEATURE_INDETERMINATE_PROGRESS = 5; // 0x5
    field public static final deprecated int FEATURE_INDETERMINATE_PROGRESS = 5; // 0x5
    field public static final int FEATURE_LEFT_ICON = 3; // 0x3
    field public static final int FEATURE_NO_TITLE = 1; // 0x1
    field public static final int FEATURE_OPTIONS_PANEL = 0; // 0x0
    field public static final int FEATURE_PROGRESS = 2; // 0x2
    field public static final deprecated int FEATURE_PROGRESS = 2; // 0x2
    field public static final int FEATURE_RIGHT_ICON = 4; // 0x4
    field public static final int FEATURE_SWIPE_TO_DISMISS = 11; // 0xb
    field public static final int ID_ANDROID_CONTENT = 16908290; // 0x1020002
    field public static final java.lang.String NAVIGATION_BAR_BACKGROUND_TRANSITION_NAME = "android:navigation:background";
    field public static final int PROGRESS_END = 10000; // 0x2710
    field public static final int PROGRESS_INDETERMINATE_OFF = -4; // 0xfffffffc
    field public static final int PROGRESS_INDETERMINATE_ON = -3; // 0xfffffffd
    field public static final int PROGRESS_SECONDARY_END = 30000; // 0x7530
    field public static final int PROGRESS_SECONDARY_START = 20000; // 0x4e20
    field public static final int PROGRESS_START = 0; // 0x0
    field public static final int PROGRESS_VISIBILITY_OFF = -2; // 0xfffffffe
    field public static final int PROGRESS_VISIBILITY_ON = -1; // 0xffffffff
    field public static final deprecated int PROGRESS_END = 10000; // 0x2710
    field public static final deprecated int PROGRESS_INDETERMINATE_OFF = -4; // 0xfffffffc
    field public static final deprecated int PROGRESS_INDETERMINATE_ON = -3; // 0xfffffffd
    field public static final deprecated int PROGRESS_SECONDARY_END = 30000; // 0x7530
    field public static final deprecated int PROGRESS_SECONDARY_START = 20000; // 0x4e20
    field public static final deprecated int PROGRESS_START = 0; // 0x0
    field public static final deprecated int PROGRESS_VISIBILITY_OFF = -2; // 0xfffffffe
    field public static final deprecated int PROGRESS_VISIBILITY_ON = -1; // 0xffffffff
    field public static final java.lang.String STATUS_BAR_BACKGROUND_TRANSITION_NAME = "android:status:background";
  }
+10 −0
Original line number Diff line number Diff line
@@ -5436,7 +5436,9 @@ public class Activity extends ContextThemeWrapper
     * via {@link #requestWindowFeature(int)}.
     *
     * @param visible Whether to show the progress bars in the title.
     * @deprecated No longer supported starting in API 21.
     */
    @Deprecated
    public final void setProgressBarVisibility(boolean visible) {
        getWindow().setFeatureInt(Window.FEATURE_PROGRESS, visible ? Window.PROGRESS_VISIBILITY_ON :
            Window.PROGRESS_VISIBILITY_OFF);
@@ -5449,7 +5451,9 @@ public class Activity extends ContextThemeWrapper
     * via {@link #requestWindowFeature(int)}.
     *
     * @param visible Whether to show the progress bars in the title.
     * @deprecated No longer supported starting in API 21.
     */
    @Deprecated
    public final void setProgressBarIndeterminateVisibility(boolean visible) {
        getWindow().setFeatureInt(Window.FEATURE_INDETERMINATE_PROGRESS,
                visible ? Window.PROGRESS_VISIBILITY_ON : Window.PROGRESS_VISIBILITY_OFF);
@@ -5463,7 +5467,9 @@ public class Activity extends ContextThemeWrapper
     * via {@link #requestWindowFeature(int)}.
     *
     * @param indeterminate Whether the horizontal progress bar should be indeterminate.
     * @deprecated No longer supported starting in API 21.
     */
    @Deprecated
    public final void setProgressBarIndeterminate(boolean indeterminate) {
        getWindow().setFeatureInt(Window.FEATURE_PROGRESS,
                indeterminate ? Window.PROGRESS_INDETERMINATE_ON
@@ -5479,7 +5485,9 @@ public class Activity extends ContextThemeWrapper
     * @param progress The progress for the progress bar. Valid ranges are from
     *            0 to 10000 (both inclusive). If 10000 is given, the progress
     *            bar will be completely filled and will fade out.
     * @deprecated No longer supported starting in API 21.
     */
    @Deprecated
    public final void setProgress(int progress) {
        getWindow().setFeatureInt(Window.FEATURE_PROGRESS, progress + Window.PROGRESS_START);
    }
@@ -5496,7 +5504,9 @@ public class Activity extends ContextThemeWrapper
     *
     * @param secondaryProgress The secondary progress for the progress bar. Valid ranges are from
     *            0 to 10000 (both inclusive).
     * @deprecated No longer supported starting in API 21.
     */
    @Deprecated
    public final void setSecondaryProgress(int secondaryProgress) {
        getWindow().setFeatureInt(Window.FEATURE_PROGRESS,
                secondaryProgress + Window.PROGRESS_SECONDARY_START);
+79 −10
Original line number Diff line number Diff line
@@ -58,14 +58,28 @@ public abstract class Window {
    /** Flag for the "no title" feature, turning off the title at the top
     *  of the screen. */
    public static final int FEATURE_NO_TITLE = 1;
    /** Flag for the progress indicator feature */

    /**
     * Flag for the progress indicator feature.
     *
     * @deprecated No longer supported starting in API 21.
     */
    @Deprecated
    public static final int FEATURE_PROGRESS = 2;

    /** Flag for having an icon on the left side of the title bar */
    public static final int FEATURE_LEFT_ICON = 3;
    /** Flag for having an icon on the right side of the title bar */
    public static final int FEATURE_RIGHT_ICON = 4;
    /** Flag for indeterminate progress */

    /**
     * Flag for indeterminate progress.
     *
     * @deprecated No longer supported starting in API 21.
     */
    @Deprecated
    public static final int FEATURE_INDETERMINATE_PROGRESS = 5;

    /** Flag for the context menu.  This is enabled by default. */
    public static final int FEATURE_CONTEXT_MENU = 6;
    /** Flag for custom title. You cannot combine this feature with other title features. */
@@ -133,21 +147,76 @@ public abstract class Window {
     */
    public static final int FEATURE_MAX = FEATURE_ACTIVITY_TRANSITIONS;

    /** Flag for setting the progress bar's visibility to VISIBLE */
    /**
     * Flag for setting the progress bar's visibility to VISIBLE.
     *
     * @deprecated {@link #FEATURE_PROGRESS} and related methods are no longer
     *             supported starting in API 21.
     */
    @Deprecated
    public static final int PROGRESS_VISIBILITY_ON = -1;
    /** Flag for setting the progress bar's visibility to GONE */

    /**
     * Flag for setting the progress bar's visibility to GONE.
     *
     * @deprecated {@link #FEATURE_PROGRESS} and related methods are no longer
     *             supported starting in API 21.
     */
    @Deprecated
    public static final int PROGRESS_VISIBILITY_OFF = -2;
    /** Flag for setting the progress bar's indeterminate mode on */

    /**
     * Flag for setting the progress bar's indeterminate mode on.
     *
     * @deprecated {@link #FEATURE_INDETERMINATE_PROGRESS} and related methods
     *             are no longer supported starting in API 21.
     */
    @Deprecated
    public static final int PROGRESS_INDETERMINATE_ON = -3;
    /** Flag for setting the progress bar's indeterminate mode off */

    /**
     * Flag for setting the progress bar's indeterminate mode off.
     *
     * @deprecated {@link #FEATURE_INDETERMINATE_PROGRESS} and related methods
     *             are no longer supported starting in API 21.
     */
    @Deprecated
    public static final int PROGRESS_INDETERMINATE_OFF = -4;
    /** Starting value for the (primary) progress */

    /**
     * Starting value for the (primary) progress.
     *
     * @deprecated {@link #FEATURE_PROGRESS} and related methods are no longer
     *             supported starting in API 21.
     */
    @Deprecated
    public static final int PROGRESS_START = 0;
    /** Ending value for the (primary) progress */

    /**
     * Ending value for the (primary) progress.
     *
     * @deprecated {@link #FEATURE_PROGRESS} and related methods are no longer
     *             supported starting in API 21.
     */
    @Deprecated
    public static final int PROGRESS_END = 10000;
    /** Lowest possible value for the secondary progress */

    /**
     * Lowest possible value for the secondary progress.
     *
     * @deprecated {@link #FEATURE_PROGRESS} and related methods are no longer
     *             supported starting in API 21.
     */
    @Deprecated
    public static final int PROGRESS_SECONDARY_START = 20000;
    /** Highest possible value for the secondary progress */

    /**
     * Highest possible value for the secondary progress.
     *
     * @deprecated {@link #FEATURE_PROGRESS} and related methods are no longer
     *             supported starting in API 21.
     */
    @Deprecated
    public static final int PROGRESS_SECONDARY_END = 30000;

    /**