From 2732324100d57eef48d49212f117d4062c556625 Mon Sep 17 00:00:00 2001 From: Evan Laird Date: Fri, 11 Jan 2019 16:08:07 -0500 Subject: [PATCH] Remove @hide from top-level StatusBarManager So an API can be added in future commits, remote the top level @hide in favor of @hide-ing every public method/field Test: API is unchanged Bug: 114003699 Change-Id: If1b101e0629ac50bbc8042b5dc3c50f6e44f7a52 --- api/current.txt | 3 ++ core/java/android/app/StatusBarManager.java | 56 +++++++++++++++++++-- 2 files changed, 55 insertions(+), 4 deletions(-) diff --git a/api/current.txt b/api/current.txt index 014ba9d3d7a8a..c89d518391f76 100644 --- a/api/current.txt +++ b/api/current.txt @@ -6205,6 +6205,9 @@ package android.app { method public final android.os.IBinder onBind(android.content.Intent); } + public class StatusBarManager { + } + @Deprecated public class TabActivity extends android.app.ActivityGroup { ctor @Deprecated public TabActivity(); method @Deprecated public android.widget.TabHost getTabHost(); diff --git a/core/java/android/app/StatusBarManager.java b/core/java/android/app/StatusBarManager.java index bbe5b8b51a35e..aa4574b2d706f 100644 --- a/core/java/android/app/StatusBarManager.java +++ b/core/java/android/app/StatusBarManager.java @@ -35,40 +35,53 @@ import java.lang.annotation.RetentionPolicy; /** * Allows an app to control the status bar. - * - * @hide */ @SystemService(Context.STATUS_BAR_SERVICE) public class StatusBarManager { + /** @hide */ @UnsupportedAppUsage public static final int DISABLE_EXPAND = View.STATUS_BAR_DISABLE_EXPAND; + /** @hide */ public static final int DISABLE_NOTIFICATION_ICONS = View.STATUS_BAR_DISABLE_NOTIFICATION_ICONS; + /** @hide */ public static final int DISABLE_NOTIFICATION_ALERTS = View.STATUS_BAR_DISABLE_NOTIFICATION_ALERTS; + + /** @hide */ @Deprecated @UnsupportedAppUsage public static final int DISABLE_NOTIFICATION_TICKER = View.STATUS_BAR_DISABLE_NOTIFICATION_TICKER; + /** @hide */ public static final int DISABLE_SYSTEM_INFO = View.STATUS_BAR_DISABLE_SYSTEM_INFO; + /** @hide */ public static final int DISABLE_HOME = View.STATUS_BAR_DISABLE_HOME; + /** @hide */ public static final int DISABLE_RECENT = View.STATUS_BAR_DISABLE_RECENT; + /** @hide */ public static final int DISABLE_BACK = View.STATUS_BAR_DISABLE_BACK; + /** @hide */ public static final int DISABLE_CLOCK = View.STATUS_BAR_DISABLE_CLOCK; + /** @hide */ public static final int DISABLE_SEARCH = View.STATUS_BAR_DISABLE_SEARCH; + /** @hide */ @Deprecated - public static final int DISABLE_NAVIGATION = + public static final int DISABLE_NAVIGATION = View.STATUS_BAR_DISABLE_HOME | View.STATUS_BAR_DISABLE_RECENT; + /** @hide */ @UnsupportedAppUsage public static final int DISABLE_NONE = 0x00000000; + /** @hide */ public static final int DISABLE_MASK = DISABLE_EXPAND | DISABLE_NOTIFICATION_ICONS | DISABLE_NOTIFICATION_ALERTS | DISABLE_NOTIFICATION_TICKER | DISABLE_SYSTEM_INFO | DISABLE_RECENT | DISABLE_HOME | DISABLE_BACK | DISABLE_CLOCK | DISABLE_SEARCH; + /** @hide */ @IntDef(flag = true, prefix = {"DISABLE_"}, value = { DISABLE_NONE, DISABLE_EXPAND, @@ -91,17 +104,25 @@ public class StatusBarManager { * Setting this flag disables quick settings completely, but does not disable expanding the * notification shade. */ + /** @hide */ public static final int DISABLE2_QUICK_SETTINGS = 1; + /** @hide */ public static final int DISABLE2_SYSTEM_ICONS = 1 << 1; + /** @hide */ public static final int DISABLE2_NOTIFICATION_SHADE = 1 << 2; + /** @hide */ public static final int DISABLE2_GLOBAL_ACTIONS = 1 << 3; + /** @hide */ public static final int DISABLE2_ROTATE_SUGGESTIONS = 1 << 4; + /** @hide */ public static final int DISABLE2_NONE = 0x00000000; + /** @hide */ public static final int DISABLE2_MASK = DISABLE2_QUICK_SETTINGS | DISABLE2_SYSTEM_ICONS | DISABLE2_NOTIFICATION_SHADE | DISABLE2_GLOBAL_ACTIONS | DISABLE2_ROTATE_SUGGESTIONS; + /** @hide */ @IntDef(flag = true, prefix = { "DISABLE2_" }, value = { DISABLE2_NONE, DISABLE2_MASK, @@ -114,12 +135,17 @@ public class StatusBarManager { @Retention(RetentionPolicy.SOURCE) public @interface Disable2Flags {} + /** @hide */ public static final int NAVIGATION_HINT_BACK_ALT = 1 << 0; + /** @hide */ public static final int NAVIGATION_HINT_IME_SHOWN = 1 << 1; + /** @hide */ public static final int WINDOW_STATUS_BAR = 1; + /** @hide */ public static final int WINDOW_NAVIGATION_BAR = 2; + /** @hide */ @IntDef(flag = true, prefix = { "WINDOW_" }, value = { WINDOW_STATUS_BAR, WINDOW_NAVIGATION_BAR @@ -127,10 +153,14 @@ public class StatusBarManager { @Retention(RetentionPolicy.SOURCE) public @interface WindowType {} + /** @hide */ public static final int WINDOW_STATE_SHOWING = 0; + /** @hide */ public static final int WINDOW_STATE_HIDING = 1; + /** @hide */ public static final int WINDOW_STATE_HIDDEN = 2; + /** @hide */ @IntDef(flag = true, prefix = { "WINDOW_STATE_" }, value = { WINDOW_STATE_SHOWING, WINDOW_STATE_HIDING, @@ -139,8 +169,11 @@ public class StatusBarManager { @Retention(RetentionPolicy.SOURCE) public @interface WindowVisibleState {} + /** @hide */ public static final int CAMERA_LAUNCH_SOURCE_WIGGLE = 0; + /** @hide */ public static final int CAMERA_LAUNCH_SOURCE_POWER_DOUBLE_TAP = 1; + /** @hide */ public static final int CAMERA_LAUNCH_SOURCE_LIFT_TRIGGER = 2; @UnsupportedAppUsage @@ -169,6 +202,8 @@ public class StatusBarManager { /** * Disable some features in the status bar. Pass the bitwise-or of the DISABLE_* flags. * To re-enable everything, pass {@link #DISABLE_NONE}. + * + * @hide */ @UnsupportedAppUsage public void disable(int what) { @@ -188,6 +223,8 @@ public class StatusBarManager { * To re-enable everything, pass {@link #DISABLE_NONE}. * * Warning: Only pass DISABLE2_* flags into this function, do not use DISABLE_* flags. + * + * @hide */ public void disable2(@Disable2Flags int what) { try { @@ -203,6 +240,8 @@ public class StatusBarManager { /** * Expand the notifications panel. + * + * @hide */ @UnsupportedAppUsage public void expandNotificationsPanel() { @@ -215,9 +254,11 @@ public class StatusBarManager { throw ex.rethrowFromSystemServer(); } } - + /** * Collapse the notifications and settings panels. + * + * @hide */ @UnsupportedAppUsage public void collapsePanels() { @@ -233,6 +274,8 @@ public class StatusBarManager { /** * Expand the settings panel. + * + * @hide */ @UnsupportedAppUsage public void expandSettingsPanel() { @@ -242,6 +285,8 @@ public class StatusBarManager { /** * Expand the settings panel and open a subPanel. If the subpanel is null or does not have a * corresponding tile, the QS panel is simply expanded + * + * @hide */ @UnsupportedAppUsage public void expandSettingsPanel(@Nullable String subPanel) { @@ -255,6 +300,7 @@ public class StatusBarManager { } } + /** @hide */ @UnsupportedAppUsage public void setIcon(String slot, int iconId, int iconLevel, String contentDescription) { try { @@ -268,6 +314,7 @@ public class StatusBarManager { } } + /** @hide */ @UnsupportedAppUsage public void removeIcon(String slot) { try { @@ -280,6 +327,7 @@ public class StatusBarManager { } } + /** @hide */ @UnsupportedAppUsage public void setIconVisibility(String slot, boolean visible) { try {