The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2007 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 17 | package android.app; |
| 18 | |
Benjamin Franz | cde0a2a | 2015-04-23 17:19:48 +0100 | [diff] [blame] | 19 | import android.annotation.IntDef; |
Evan Laird | 2c4d0cf | 2019-02-28 12:10:29 -0500 | [diff] [blame] | 20 | import android.annotation.NonNull; |
Fabian Kozynski | e3137e3 | 2018-09-28 11:20:04 -0400 | [diff] [blame] | 21 | import android.annotation.Nullable; |
Evan Laird | ab19659 | 2019-02-26 17:21:32 -0500 | [diff] [blame] | 22 | import android.annotation.RequiresPermission; |
Evan Laird | edd016f | 2019-01-23 18:36:29 -0500 | [diff] [blame] | 23 | import android.annotation.SystemApi; |
Jeff Sharkey | d86b8fe | 2017-06-02 17:36:26 -0600 | [diff] [blame] | 24 | import android.annotation.SystemService; |
Mathew Inwood | 61e8ae6 | 2018-08-14 14:17:44 +0100 | [diff] [blame] | 25 | import android.annotation.UnsupportedAppUsage; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 26 | import android.content.Context; |
| 27 | import android.os.Binder; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 28 | import android.os.IBinder; |
Charles He | ede3909 | 2017-09-18 09:19:28 +0100 | [diff] [blame] | 29 | import android.os.RemoteException; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 30 | import android.os.ServiceManager; |
Evan Laird | edd016f | 2019-01-23 18:36:29 -0500 | [diff] [blame] | 31 | import android.util.Pair; |
Daniel Sandler | 9cbd360 | 2011-10-18 22:59:00 -0400 | [diff] [blame] | 32 | import android.util.Slog; |
Joe Onorato | 7bb8eeb | 2011-01-27 16:00:58 -0800 | [diff] [blame] | 33 | import android.view.View; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 34 | |
Joe Onorato | 0cbda99 | 2010-05-02 16:28:15 -0700 | [diff] [blame] | 35 | import com.android.internal.statusbar.IStatusBarService; |
| 36 | |
Benjamin Franz | cde0a2a | 2015-04-23 17:19:48 +0100 | [diff] [blame] | 37 | import java.lang.annotation.Retention; |
| 38 | import java.lang.annotation.RetentionPolicy; |
| 39 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 40 | /** |
| 41 | * Allows an app to control the status bar. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 42 | */ |
Jeff Sharkey | d86b8fe | 2017-06-02 17:36:26 -0600 | [diff] [blame] | 43 | @SystemService(Context.STATUS_BAR_SERVICE) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 44 | public class StatusBarManager { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 45 | |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 46 | /** @hide */ |
Joe Onorato | 7bb8eeb | 2011-01-27 16:00:58 -0800 | [diff] [blame] | 47 | public static final int DISABLE_EXPAND = View.STATUS_BAR_DISABLE_EXPAND; |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 48 | /** @hide */ |
Joe Onorato | 7bb8eeb | 2011-01-27 16:00:58 -0800 | [diff] [blame] | 49 | public static final int DISABLE_NOTIFICATION_ICONS = View.STATUS_BAR_DISABLE_NOTIFICATION_ICONS; |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 50 | /** @hide */ |
Joe Onorato | 7bb8eeb | 2011-01-27 16:00:58 -0800 | [diff] [blame] | 51 | public static final int DISABLE_NOTIFICATION_ALERTS |
| 52 | = View.STATUS_BAR_DISABLE_NOTIFICATION_ALERTS; |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 53 | |
| 54 | /** @hide */ |
Dan Sandler | a5e0f41 | 2014-01-23 15:11:54 -0500 | [diff] [blame] | 55 | @Deprecated |
Mathew Inwood | 61e8ae6 | 2018-08-14 14:17:44 +0100 | [diff] [blame] | 56 | @UnsupportedAppUsage |
Joe Onorato | 7bb8eeb | 2011-01-27 16:00:58 -0800 | [diff] [blame] | 57 | public static final int DISABLE_NOTIFICATION_TICKER |
| 58 | = View.STATUS_BAR_DISABLE_NOTIFICATION_TICKER; |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 59 | /** @hide */ |
Joe Onorato | 7bb8eeb | 2011-01-27 16:00:58 -0800 | [diff] [blame] | 60 | public static final int DISABLE_SYSTEM_INFO = View.STATUS_BAR_DISABLE_SYSTEM_INFO; |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 61 | /** @hide */ |
Daniel Sandler | dba9356 | 2011-10-06 16:39:58 -0400 | [diff] [blame] | 62 | public static final int DISABLE_HOME = View.STATUS_BAR_DISABLE_HOME; |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 63 | /** @hide */ |
Daniel Sandler | dba9356 | 2011-10-06 16:39:58 -0400 | [diff] [blame] | 64 | public static final int DISABLE_RECENT = View.STATUS_BAR_DISABLE_RECENT; |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 65 | /** @hide */ |
Joe Onorato | 6478adc | 2011-01-27 21:15:01 -0800 | [diff] [blame] | 66 | public static final int DISABLE_BACK = View.STATUS_BAR_DISABLE_BACK; |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 67 | /** @hide */ |
Joe Onorato | 7bb8eeb | 2011-01-27 16:00:58 -0800 | [diff] [blame] | 68 | public static final int DISABLE_CLOCK = View.STATUS_BAR_DISABLE_CLOCK; |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 69 | /** @hide */ |
Daniel Sandler | d5483c3 | 2012-10-19 16:44:15 -0400 | [diff] [blame] | 70 | public static final int DISABLE_SEARCH = View.STATUS_BAR_DISABLE_SEARCH; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 71 | |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 72 | /** @hide */ |
Daniel Sandler | dba9356 | 2011-10-06 16:39:58 -0400 | [diff] [blame] | 73 | @Deprecated |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 74 | public static final int DISABLE_NAVIGATION = |
Daniel Sandler | dba9356 | 2011-10-06 16:39:58 -0400 | [diff] [blame] | 75 | View.STATUS_BAR_DISABLE_HOME | View.STATUS_BAR_DISABLE_RECENT; |
| 76 | |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 77 | /** @hide */ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 78 | public static final int DISABLE_NONE = 0x00000000; |
| 79 | |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 80 | /** @hide */ |
Joe Onorato | 7bb8eeb | 2011-01-27 16:00:58 -0800 | [diff] [blame] | 81 | public static final int DISABLE_MASK = DISABLE_EXPAND | DISABLE_NOTIFICATION_ICONS |
| 82 | | DISABLE_NOTIFICATION_ALERTS | DISABLE_NOTIFICATION_TICKER |
Daniel Sandler | d5483c3 | 2012-10-19 16:44:15 -0400 | [diff] [blame] | 83 | | DISABLE_SYSTEM_INFO | DISABLE_RECENT | DISABLE_HOME | DISABLE_BACK | DISABLE_CLOCK |
| 84 | | DISABLE_SEARCH; |
Joe Onorato | 7bb8eeb | 2011-01-27 16:00:58 -0800 | [diff] [blame] | 85 | |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 86 | /** @hide */ |
Charles Chen | f3d295c | 2018-11-30 18:15:21 +0800 | [diff] [blame] | 87 | @IntDef(flag = true, prefix = {"DISABLE_"}, value = { |
| 88 | DISABLE_NONE, |
| 89 | DISABLE_EXPAND, |
| 90 | DISABLE_NOTIFICATION_ICONS, |
| 91 | DISABLE_NOTIFICATION_ALERTS, |
| 92 | DISABLE_NOTIFICATION_TICKER, |
| 93 | DISABLE_SYSTEM_INFO, |
| 94 | DISABLE_HOME, |
| 95 | DISABLE_RECENT, |
| 96 | DISABLE_BACK, |
| 97 | DISABLE_CLOCK, |
| 98 | DISABLE_SEARCH |
| 99 | }) |
| 100 | @Retention(RetentionPolicy.SOURCE) |
| 101 | public @interface DisableFlags {} |
| 102 | |
Benjamin Franz | 27cf146 | 2015-04-23 19:36:42 +0100 | [diff] [blame] | 103 | /** |
| 104 | * Flag to disable quick settings. |
| 105 | * |
| 106 | * Setting this flag disables quick settings completely, but does not disable expanding the |
| 107 | * notification shade. |
| 108 | */ |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 109 | /** @hide */ |
Charles He | 6a79b0d | 2017-09-18 09:50:58 +0100 | [diff] [blame] | 110 | public static final int DISABLE2_QUICK_SETTINGS = 1; |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 111 | /** @hide */ |
Charles He | 6a79b0d | 2017-09-18 09:50:58 +0100 | [diff] [blame] | 112 | public static final int DISABLE2_SYSTEM_ICONS = 1 << 1; |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 113 | /** @hide */ |
Charles He | 2eda242 | 2017-09-24 17:55:21 +0100 | [diff] [blame] | 114 | public static final int DISABLE2_NOTIFICATION_SHADE = 1 << 2; |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 115 | /** @hide */ |
Charles He | 9851a8d | 2017-10-10 17:31:30 +0100 | [diff] [blame] | 116 | public static final int DISABLE2_GLOBAL_ACTIONS = 1 << 3; |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 117 | /** @hide */ |
Mike Digman | dd2f49e | 2018-03-16 10:54:22 -0700 | [diff] [blame] | 118 | public static final int DISABLE2_ROTATE_SUGGESTIONS = 1 << 4; |
Benjamin Franz | 27cf146 | 2015-04-23 19:36:42 +0100 | [diff] [blame] | 119 | |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 120 | /** @hide */ |
Benjamin Franz | cde0a2a | 2015-04-23 17:19:48 +0100 | [diff] [blame] | 121 | public static final int DISABLE2_NONE = 0x00000000; |
| 122 | |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 123 | /** @hide */ |
Charles He | 2eda242 | 2017-09-24 17:55:21 +0100 | [diff] [blame] | 124 | public static final int DISABLE2_MASK = DISABLE2_QUICK_SETTINGS | DISABLE2_SYSTEM_ICONS |
Mike Digman | dd2f49e | 2018-03-16 10:54:22 -0700 | [diff] [blame] | 125 | | DISABLE2_NOTIFICATION_SHADE | DISABLE2_GLOBAL_ACTIONS | DISABLE2_ROTATE_SUGGESTIONS; |
Benjamin Franz | cde0a2a | 2015-04-23 17:19:48 +0100 | [diff] [blame] | 126 | |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 127 | /** @hide */ |
Jeff Sharkey | ce8db99 | 2017-12-13 20:05:05 -0700 | [diff] [blame] | 128 | @IntDef(flag = true, prefix = { "DISABLE2_" }, value = { |
| 129 | DISABLE2_NONE, |
| 130 | DISABLE2_MASK, |
| 131 | DISABLE2_QUICK_SETTINGS, |
| 132 | DISABLE2_SYSTEM_ICONS, |
| 133 | DISABLE2_NOTIFICATION_SHADE, |
Mike Digman | dd2f49e | 2018-03-16 10:54:22 -0700 | [diff] [blame] | 134 | DISABLE2_GLOBAL_ACTIONS, |
| 135 | DISABLE2_ROTATE_SUGGESTIONS |
Jeff Sharkey | ce8db99 | 2017-12-13 20:05:05 -0700 | [diff] [blame] | 136 | }) |
Benjamin Franz | cde0a2a | 2015-04-23 17:19:48 +0100 | [diff] [blame] | 137 | @Retention(RetentionPolicy.SOURCE) |
| 138 | public @interface Disable2Flags {} |
| 139 | |
Evan Laird | edd016f | 2019-01-23 18:36:29 -0500 | [diff] [blame] | 140 | /** |
| 141 | * Default disable flags for setup |
| 142 | * |
| 143 | * @hide |
| 144 | */ |
| 145 | public static final int DEFAULT_SETUP_DISABLE_FLAGS = DISABLE_NOTIFICATION_ALERTS |
| 146 | | DISABLE_HOME | DISABLE_EXPAND | DISABLE_RECENT | DISABLE_CLOCK | DISABLE_SEARCH; |
| 147 | |
| 148 | /** |
| 149 | * Default disable2 flags for setup |
| 150 | * |
| 151 | * @hide |
| 152 | */ |
| 153 | public static final int DEFAULT_SETUP_DISABLE2_FLAGS = DISABLE2_ROTATE_SUGGESTIONS; |
| 154 | |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 155 | /** @hide */ |
John Spurlock | 56d007b | 2013-10-28 18:40:56 -0400 | [diff] [blame] | 156 | public static final int NAVIGATION_HINT_BACK_ALT = 1 << 0; |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 157 | /** @hide */ |
Jason Monk | f1ff209 | 2014-04-29 16:50:53 -0400 | [diff] [blame] | 158 | public static final int NAVIGATION_HINT_IME_SHOWN = 1 << 1; |
Daniel Sandler | 328310c | 2011-09-23 15:56:52 -0400 | [diff] [blame] | 159 | |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 160 | /** @hide */ |
John Spurlock | 9764218 | 2013-07-29 17:58:39 -0400 | [diff] [blame] | 161 | public static final int WINDOW_STATUS_BAR = 1; |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 162 | /** @hide */ |
John Spurlock | 9764218 | 2013-07-29 17:58:39 -0400 | [diff] [blame] | 163 | public static final int WINDOW_NAVIGATION_BAR = 2; |
| 164 | |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 165 | /** @hide */ |
Charles Chen | f3d295c | 2018-11-30 18:15:21 +0800 | [diff] [blame] | 166 | @IntDef(flag = true, prefix = { "WINDOW_" }, value = { |
| 167 | WINDOW_STATUS_BAR, |
| 168 | WINDOW_NAVIGATION_BAR |
| 169 | }) |
| 170 | @Retention(RetentionPolicy.SOURCE) |
| 171 | public @interface WindowType {} |
| 172 | |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 173 | /** @hide */ |
John Spurlock | 5b9145b | 2013-08-20 15:13:47 -0400 | [diff] [blame] | 174 | public static final int WINDOW_STATE_SHOWING = 0; |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 175 | /** @hide */ |
John Spurlock | 9764218 | 2013-07-29 17:58:39 -0400 | [diff] [blame] | 176 | public static final int WINDOW_STATE_HIDING = 1; |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 177 | /** @hide */ |
John Spurlock | 5b9145b | 2013-08-20 15:13:47 -0400 | [diff] [blame] | 178 | public static final int WINDOW_STATE_HIDDEN = 2; |
John Spurlock | 9764218 | 2013-07-29 17:58:39 -0400 | [diff] [blame] | 179 | |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 180 | /** @hide */ |
Charles Chen | f3d295c | 2018-11-30 18:15:21 +0800 | [diff] [blame] | 181 | @IntDef(flag = true, prefix = { "WINDOW_STATE_" }, value = { |
| 182 | WINDOW_STATE_SHOWING, |
| 183 | WINDOW_STATE_HIDING, |
| 184 | WINDOW_STATE_HIDDEN |
| 185 | }) |
| 186 | @Retention(RetentionPolicy.SOURCE) |
| 187 | public @interface WindowVisibleState {} |
| 188 | |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 189 | /** @hide */ |
Jorim Jaggi | 40aa881 | 2015-09-23 12:59:22 -0700 | [diff] [blame] | 190 | public static final int CAMERA_LAUNCH_SOURCE_WIGGLE = 0; |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 191 | /** @hide */ |
Jorim Jaggi | 40aa881 | 2015-09-23 12:59:22 -0700 | [diff] [blame] | 192 | public static final int CAMERA_LAUNCH_SOURCE_POWER_DOUBLE_TAP = 1; |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 193 | /** @hide */ |
Jonathan Solnit | a413816 | 2017-05-10 21:06:04 -0700 | [diff] [blame] | 194 | public static final int CAMERA_LAUNCH_SOURCE_LIFT_TRIGGER = 2; |
Jorim Jaggi | 40aa881 | 2015-09-23 12:59:22 -0700 | [diff] [blame] | 195 | |
Mathew Inwood | 61e8ae6 | 2018-08-14 14:17:44 +0100 | [diff] [blame] | 196 | @UnsupportedAppUsage |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 197 | private Context mContext; |
Joe Onorato | 25f95f9 | 2010-04-08 18:37:10 -0500 | [diff] [blame] | 198 | private IStatusBarService mService; |
Mathew Inwood | 61e8ae6 | 2018-08-14 14:17:44 +0100 | [diff] [blame] | 199 | @UnsupportedAppUsage |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 200 | private IBinder mToken = new Binder(); |
| 201 | |
Mathew Inwood | 61e8ae6 | 2018-08-14 14:17:44 +0100 | [diff] [blame] | 202 | @UnsupportedAppUsage |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 203 | StatusBarManager(Context context) { |
| 204 | mContext = context; |
Daniel Sandler | 9cbd360 | 2011-10-18 22:59:00 -0400 | [diff] [blame] | 205 | } |
| 206 | |
Mathew Inwood | 61e8ae6 | 2018-08-14 14:17:44 +0100 | [diff] [blame] | 207 | @UnsupportedAppUsage |
Daniel Sandler | 9cbd360 | 2011-10-18 22:59:00 -0400 | [diff] [blame] | 208 | private synchronized IStatusBarService getService() { |
| 209 | if (mService == null) { |
| 210 | mService = IStatusBarService.Stub.asInterface( |
| 211 | ServiceManager.getService(Context.STATUS_BAR_SERVICE)); |
| 212 | if (mService == null) { |
| 213 | Slog.w("StatusBarManager", "warning: no STATUS_BAR_SERVICE"); |
| 214 | } |
| 215 | } |
| 216 | return mService; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 217 | } |
| 218 | |
| 219 | /** |
| 220 | * Disable some features in the status bar. Pass the bitwise-or of the DISABLE_* flags. |
| 221 | * To re-enable everything, pass {@link #DISABLE_NONE}. |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 222 | * |
| 223 | * @hide |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 224 | */ |
Mathew Inwood | 61e8ae6 | 2018-08-14 14:17:44 +0100 | [diff] [blame] | 225 | @UnsupportedAppUsage |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 226 | public void disable(int what) { |
| 227 | try { |
Evan Laird | a6917e1 | 2018-05-29 17:28:58 -0400 | [diff] [blame] | 228 | final int userId = Binder.getCallingUserHandle().getIdentifier(); |
Daniel Sandler | 9cbd360 | 2011-10-18 22:59:00 -0400 | [diff] [blame] | 229 | final IStatusBarService svc = getService(); |
| 230 | if (svc != null) { |
Evan Laird | a6917e1 | 2018-05-29 17:28:58 -0400 | [diff] [blame] | 231 | svc.disableForUser(what, mToken, mContext.getPackageName(), userId); |
Jim Miller | 305c78c | 2011-10-16 14:54:38 -0700 | [diff] [blame] | 232 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 233 | } catch (RemoteException ex) { |
Jeff Sharkey | c53962d | 2016-03-01 19:27:23 -0700 | [diff] [blame] | 234 | throw ex.rethrowFromSystemServer(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 235 | } |
| 236 | } |
Benjamin Franz | cde0a2a | 2015-04-23 17:19:48 +0100 | [diff] [blame] | 237 | |
| 238 | /** |
| 239 | * Disable additional status bar features. Pass the bitwise-or of the DISABLE2_* flags. |
| 240 | * To re-enable everything, pass {@link #DISABLE_NONE}. |
| 241 | * |
| 242 | * Warning: Only pass DISABLE2_* flags into this function, do not use DISABLE_* flags. |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 243 | * |
| 244 | * @hide |
Benjamin Franz | cde0a2a | 2015-04-23 17:19:48 +0100 | [diff] [blame] | 245 | */ |
| 246 | public void disable2(@Disable2Flags int what) { |
| 247 | try { |
Evan Laird | a6917e1 | 2018-05-29 17:28:58 -0400 | [diff] [blame] | 248 | final int userId = Binder.getCallingUserHandle().getIdentifier(); |
Benjamin Franz | cde0a2a | 2015-04-23 17:19:48 +0100 | [diff] [blame] | 249 | final IStatusBarService svc = getService(); |
| 250 | if (svc != null) { |
Evan Laird | a6917e1 | 2018-05-29 17:28:58 -0400 | [diff] [blame] | 251 | svc.disable2ForUser(what, mToken, mContext.getPackageName(), userId); |
Benjamin Franz | cde0a2a | 2015-04-23 17:19:48 +0100 | [diff] [blame] | 252 | } |
| 253 | } catch (RemoteException ex) { |
Jeff Sharkey | c53962d | 2016-03-01 19:27:23 -0700 | [diff] [blame] | 254 | throw ex.rethrowFromSystemServer(); |
Benjamin Franz | cde0a2a | 2015-04-23 17:19:48 +0100 | [diff] [blame] | 255 | } |
| 256 | } |
| 257 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 258 | /** |
Daniel Sandler | 11cf178 | 2012-09-27 14:03:08 -0400 | [diff] [blame] | 259 | * Expand the notifications panel. |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 260 | * |
| 261 | * @hide |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 262 | */ |
Mathew Inwood | 61e8ae6 | 2018-08-14 14:17:44 +0100 | [diff] [blame] | 263 | @UnsupportedAppUsage |
Daniel Sandler | 11cf178 | 2012-09-27 14:03:08 -0400 | [diff] [blame] | 264 | public void expandNotificationsPanel() { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 265 | try { |
Daniel Sandler | 9cbd360 | 2011-10-18 22:59:00 -0400 | [diff] [blame] | 266 | final IStatusBarService svc = getService(); |
| 267 | if (svc != null) { |
Daniel Sandler | 11cf178 | 2012-09-27 14:03:08 -0400 | [diff] [blame] | 268 | svc.expandNotificationsPanel(); |
Daniel Sandler | 9cbd360 | 2011-10-18 22:59:00 -0400 | [diff] [blame] | 269 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 270 | } catch (RemoteException ex) { |
Jeff Sharkey | c53962d | 2016-03-01 19:27:23 -0700 | [diff] [blame] | 271 | throw ex.rethrowFromSystemServer(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 272 | } |
| 273 | } |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 274 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 275 | /** |
Daniel Sandler | 11cf178 | 2012-09-27 14:03:08 -0400 | [diff] [blame] | 276 | * Collapse the notifications and settings panels. |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 277 | * |
| 278 | * @hide |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 279 | */ |
Mathew Inwood | 61e8ae6 | 2018-08-14 14:17:44 +0100 | [diff] [blame] | 280 | @UnsupportedAppUsage |
Daniel Sandler | 11cf178 | 2012-09-27 14:03:08 -0400 | [diff] [blame] | 281 | public void collapsePanels() { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 282 | try { |
Daniel Sandler | 9cbd360 | 2011-10-18 22:59:00 -0400 | [diff] [blame] | 283 | final IStatusBarService svc = getService(); |
| 284 | if (svc != null) { |
Daniel Sandler | 11cf178 | 2012-09-27 14:03:08 -0400 | [diff] [blame] | 285 | svc.collapsePanels(); |
Svetoslav Ganov | e20a177 | 2012-09-25 16:07:46 -0700 | [diff] [blame] | 286 | } |
| 287 | } catch (RemoteException ex) { |
Jeff Sharkey | c53962d | 2016-03-01 19:27:23 -0700 | [diff] [blame] | 288 | throw ex.rethrowFromSystemServer(); |
Svetoslav Ganov | e20a177 | 2012-09-25 16:07:46 -0700 | [diff] [blame] | 289 | } |
| 290 | } |
| 291 | |
| 292 | /** |
Daniel Sandler | 11cf178 | 2012-09-27 14:03:08 -0400 | [diff] [blame] | 293 | * Expand the settings panel. |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 294 | * |
| 295 | * @hide |
Svetoslav Ganov | e20a177 | 2012-09-25 16:07:46 -0700 | [diff] [blame] | 296 | */ |
Mathew Inwood | 61e8ae6 | 2018-08-14 14:17:44 +0100 | [diff] [blame] | 297 | @UnsupportedAppUsage |
Daniel Sandler | 11cf178 | 2012-09-27 14:03:08 -0400 | [diff] [blame] | 298 | public void expandSettingsPanel() { |
Jason Monk | a992732 | 2015-12-13 16:22:37 -0500 | [diff] [blame] | 299 | expandSettingsPanel(null); |
| 300 | } |
| 301 | |
| 302 | /** |
Fabian Kozynski | e3137e3 | 2018-09-28 11:20:04 -0400 | [diff] [blame] | 303 | * Expand the settings panel and open a subPanel. If the subpanel is null or does not have a |
| 304 | * corresponding tile, the QS panel is simply expanded |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 305 | * |
| 306 | * @hide |
Jason Monk | a992732 | 2015-12-13 16:22:37 -0500 | [diff] [blame] | 307 | */ |
Mathew Inwood | 61e8ae6 | 2018-08-14 14:17:44 +0100 | [diff] [blame] | 308 | @UnsupportedAppUsage |
Fabian Kozynski | e3137e3 | 2018-09-28 11:20:04 -0400 | [diff] [blame] | 309 | public void expandSettingsPanel(@Nullable String subPanel) { |
Svetoslav Ganov | e20a177 | 2012-09-25 16:07:46 -0700 | [diff] [blame] | 310 | try { |
| 311 | final IStatusBarService svc = getService(); |
| 312 | if (svc != null) { |
Jason Monk | a992732 | 2015-12-13 16:22:37 -0500 | [diff] [blame] | 313 | svc.expandSettingsPanel(subPanel); |
Daniel Sandler | 9cbd360 | 2011-10-18 22:59:00 -0400 | [diff] [blame] | 314 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 315 | } catch (RemoteException ex) { |
Jeff Sharkey | c53962d | 2016-03-01 19:27:23 -0700 | [diff] [blame] | 316 | throw ex.rethrowFromSystemServer(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 317 | } |
| 318 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 319 | |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 320 | /** @hide */ |
Mathew Inwood | 61e8ae6 | 2018-08-14 14:17:44 +0100 | [diff] [blame] | 321 | @UnsupportedAppUsage |
Svetoslav Ganov | 6179ea3 | 2011-06-28 01:12:41 -0700 | [diff] [blame] | 322 | public void setIcon(String slot, int iconId, int iconLevel, String contentDescription) { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 323 | try { |
Daniel Sandler | 9cbd360 | 2011-10-18 22:59:00 -0400 | [diff] [blame] | 324 | final IStatusBarService svc = getService(); |
| 325 | if (svc != null) { |
| 326 | svc.setIcon(slot, mContext.getPackageName(), iconId, iconLevel, |
Svetoslav Ganov | 6179ea3 | 2011-06-28 01:12:41 -0700 | [diff] [blame] | 327 | contentDescription); |
Daniel Sandler | 9cbd360 | 2011-10-18 22:59:00 -0400 | [diff] [blame] | 328 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 329 | } catch (RemoteException ex) { |
Jeff Sharkey | c53962d | 2016-03-01 19:27:23 -0700 | [diff] [blame] | 330 | throw ex.rethrowFromSystemServer(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 331 | } |
| 332 | } |
| 333 | |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 334 | /** @hide */ |
Mathew Inwood | 61e8ae6 | 2018-08-14 14:17:44 +0100 | [diff] [blame] | 335 | @UnsupportedAppUsage |
Joe Onorato | 0cbda99 | 2010-05-02 16:28:15 -0700 | [diff] [blame] | 336 | public void removeIcon(String slot) { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 337 | try { |
Daniel Sandler | 9cbd360 | 2011-10-18 22:59:00 -0400 | [diff] [blame] | 338 | final IStatusBarService svc = getService(); |
| 339 | if (svc != null) { |
| 340 | svc.removeIcon(slot); |
| 341 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 342 | } catch (RemoteException ex) { |
Jeff Sharkey | c53962d | 2016-03-01 19:27:23 -0700 | [diff] [blame] | 343 | throw ex.rethrowFromSystemServer(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 344 | } |
| 345 | } |
Joe Onorato | 798ac4c | 2010-05-27 16:39:00 -0400 | [diff] [blame] | 346 | |
Evan Laird | 2732324 | 2019-01-11 16:08:07 -0500 | [diff] [blame] | 347 | /** @hide */ |
Mathew Inwood | 61e8ae6 | 2018-08-14 14:17:44 +0100 | [diff] [blame] | 348 | @UnsupportedAppUsage |
Joe Onorato | 798ac4c | 2010-05-27 16:39:00 -0400 | [diff] [blame] | 349 | public void setIconVisibility(String slot, boolean visible) { |
| 350 | try { |
Daniel Sandler | 9cbd360 | 2011-10-18 22:59:00 -0400 | [diff] [blame] | 351 | final IStatusBarService svc = getService(); |
| 352 | if (svc != null) { |
| 353 | svc.setIconVisibility(slot, visible); |
| 354 | } |
Joe Onorato | 798ac4c | 2010-05-27 16:39:00 -0400 | [diff] [blame] | 355 | } catch (RemoteException ex) { |
Jeff Sharkey | c53962d | 2016-03-01 19:27:23 -0700 | [diff] [blame] | 356 | throw ex.rethrowFromSystemServer(); |
Joe Onorato | 798ac4c | 2010-05-27 16:39:00 -0400 | [diff] [blame] | 357 | } |
| 358 | } |
John Spurlock | 5b9145b | 2013-08-20 15:13:47 -0400 | [diff] [blame] | 359 | |
Evan Laird | edd016f | 2019-01-23 18:36:29 -0500 | [diff] [blame] | 360 | /** |
| 361 | * Enable or disable status bar elements (notifications, clock) which are inappropriate during |
| 362 | * device setup. |
| 363 | * |
| 364 | * @param disabled whether to apply or remove the disabled flags |
| 365 | * |
| 366 | * @hide |
| 367 | */ |
| 368 | @SystemApi |
Evan Laird | ab19659 | 2019-02-26 17:21:32 -0500 | [diff] [blame] | 369 | @RequiresPermission(android.Manifest.permission.STATUS_BAR) |
Evan Laird | edd016f | 2019-01-23 18:36:29 -0500 | [diff] [blame] | 370 | public void setDisabledForSetup(boolean disabled) { |
| 371 | try { |
| 372 | final int userId = Binder.getCallingUserHandle().getIdentifier(); |
| 373 | final IStatusBarService svc = getService(); |
| 374 | if (svc != null) { |
| 375 | svc.disableForUser(disabled ? DEFAULT_SETUP_DISABLE_FLAGS : DISABLE_NONE, |
| 376 | mToken, mContext.getPackageName(), userId); |
| 377 | svc.disable2ForUser(disabled ? DEFAULT_SETUP_DISABLE2_FLAGS : DISABLE2_NONE, |
| 378 | mToken, mContext.getPackageName(), userId); |
| 379 | } |
| 380 | } catch (RemoteException ex) { |
| 381 | throw ex.rethrowFromSystemServer(); |
| 382 | } |
| 383 | } |
| 384 | |
| 385 | /** |
Evan Laird | ced4aeb | 2019-01-28 16:52:41 -0500 | [diff] [blame] | 386 | * Get this app's currently requested disabled components |
Evan Laird | edd016f | 2019-01-23 18:36:29 -0500 | [diff] [blame] | 387 | * |
Evan Laird | ced4aeb | 2019-01-28 16:52:41 -0500 | [diff] [blame] | 388 | * @return a new DisableInfo |
Evan Laird | edd016f | 2019-01-23 18:36:29 -0500 | [diff] [blame] | 389 | * |
| 390 | * @hide |
| 391 | */ |
| 392 | @SystemApi |
Evan Laird | ab19659 | 2019-02-26 17:21:32 -0500 | [diff] [blame] | 393 | @RequiresPermission(android.Manifest.permission.STATUS_BAR) |
Evan Laird | 2c4d0cf | 2019-02-28 12:10:29 -0500 | [diff] [blame] | 394 | @NonNull |
Evan Laird | ced4aeb | 2019-01-28 16:52:41 -0500 | [diff] [blame] | 395 | public DisableInfo getDisableInfo() { |
Evan Laird | edd016f | 2019-01-23 18:36:29 -0500 | [diff] [blame] | 396 | try { |
| 397 | final int userId = Binder.getCallingUserHandle().getIdentifier(); |
| 398 | final IStatusBarService svc = getService(); |
| 399 | int[] flags = new int[] {0, 0}; |
| 400 | if (svc != null) { |
| 401 | flags = svc.getDisableFlags(mToken, userId); |
| 402 | } |
| 403 | |
Evan Laird | ced4aeb | 2019-01-28 16:52:41 -0500 | [diff] [blame] | 404 | return new DisableInfo(flags[0], flags[1]); |
Evan Laird | edd016f | 2019-01-23 18:36:29 -0500 | [diff] [blame] | 405 | } catch (RemoteException ex) { |
| 406 | throw ex.rethrowFromSystemServer(); |
| 407 | } |
| 408 | } |
| 409 | |
John Spurlock | 5b9145b | 2013-08-20 15:13:47 -0400 | [diff] [blame] | 410 | /** @hide */ |
| 411 | public static String windowStateToString(int state) { |
| 412 | if (state == WINDOW_STATE_HIDING) return "WINDOW_STATE_HIDING"; |
| 413 | if (state == WINDOW_STATE_HIDDEN) return "WINDOW_STATE_HIDDEN"; |
| 414 | if (state == WINDOW_STATE_SHOWING) return "WINDOW_STATE_SHOWING"; |
| 415 | return "WINDOW_STATE_UNKNOWN"; |
| 416 | } |
Evan Laird | ced4aeb | 2019-01-28 16:52:41 -0500 | [diff] [blame] | 417 | |
| 418 | /** |
| 419 | * DisableInfo describes this app's requested state of the StatusBar with regards to which |
| 420 | * components are enabled/disabled |
| 421 | * |
| 422 | * @hide |
| 423 | */ |
| 424 | @SystemApi |
| 425 | public static final class DisableInfo { |
| 426 | |
| 427 | private boolean mStatusBarExpansion; |
| 428 | private boolean mNavigateHome; |
| 429 | private boolean mNotificationPeeking; |
| 430 | private boolean mRecents; |
| 431 | private boolean mSearch; |
| 432 | |
| 433 | /** @hide */ |
| 434 | public DisableInfo(int flags1, int flags2) { |
| 435 | mStatusBarExpansion = (flags1 & DISABLE_EXPAND) != 0; |
| 436 | mNavigateHome = (flags1 & DISABLE_HOME) != 0; |
| 437 | mNotificationPeeking = (flags1 & DISABLE_NOTIFICATION_ALERTS) != 0; |
| 438 | mRecents = (flags1 & DISABLE_RECENT) != 0; |
| 439 | mSearch = (flags1 & DISABLE_SEARCH) != 0; |
| 440 | } |
| 441 | |
| 442 | /** @hide */ |
| 443 | public DisableInfo() {} |
| 444 | |
| 445 | /** |
| 446 | * @return {@code true} if expanding the notification shade is disabled |
| 447 | * |
| 448 | * @hide |
| 449 | */ |
| 450 | @SystemApi |
| 451 | public boolean isStatusBarExpansionDisabled() { |
| 452 | return mStatusBarExpansion; |
| 453 | } |
| 454 | |
| 455 | /** * @hide */ |
| 456 | public void setStatusBarExpansionDisabled(boolean disabled) { |
| 457 | mStatusBarExpansion = disabled; |
| 458 | } |
| 459 | |
| 460 | /** |
| 461 | * @return {@code true} if navigation home is disabled |
| 462 | * |
| 463 | * @hide |
| 464 | */ |
| 465 | @SystemApi |
| 466 | public boolean isNavigateToHomeDisabled() { |
| 467 | return mNavigateHome; |
| 468 | } |
| 469 | |
| 470 | /** * @hide */ |
| 471 | public void setNagivationHomeDisabled(boolean disabled) { |
| 472 | mNavigateHome = disabled; |
| 473 | } |
| 474 | |
| 475 | /** |
| 476 | * @return {@code true} if notification peeking (heads-up notification) is disabled |
| 477 | * |
| 478 | * @hide |
| 479 | */ |
| 480 | @SystemApi |
| 481 | public boolean isNotificationPeekingDisabled() { |
| 482 | return mNotificationPeeking; |
| 483 | } |
| 484 | |
| 485 | /** @hide */ |
| 486 | public void setNotificationPeekingDisabled(boolean disabled) { |
| 487 | mNotificationPeeking = disabled; |
| 488 | } |
| 489 | |
| 490 | /** |
| 491 | * @return {@code true} if mRecents/overview is disabled |
| 492 | * |
| 493 | * @hide |
| 494 | */ |
| 495 | @SystemApi |
| 496 | public boolean isRecentsDisabled() { |
| 497 | return mRecents; |
| 498 | } |
| 499 | |
| 500 | /** @hide */ |
| 501 | public void setRecentsDisabled(boolean disabled) { |
| 502 | mRecents = disabled; |
| 503 | } |
| 504 | |
| 505 | /** |
| 506 | * @return {@code true} if mSearch is disabled |
| 507 | * |
| 508 | * @hide |
| 509 | */ |
| 510 | @SystemApi |
| 511 | public boolean isSearchDisabled() { |
| 512 | return mSearch; |
| 513 | } |
| 514 | |
| 515 | /** @hide */ |
| 516 | public void setSearchDisabled(boolean disabled) { |
| 517 | mSearch = disabled; |
| 518 | } |
| 519 | |
| 520 | /** |
| 521 | * @return {@code true} if no components are disabled (default state) |
| 522 | * |
| 523 | * @hide |
| 524 | */ |
| 525 | @SystemApi |
Evan Laird | ab19659 | 2019-02-26 17:21:32 -0500 | [diff] [blame] | 526 | public boolean areAllComponentsEnabled() { |
Evan Laird | ced4aeb | 2019-01-28 16:52:41 -0500 | [diff] [blame] | 527 | return !mStatusBarExpansion && !mNavigateHome && !mNotificationPeeking && !mRecents |
| 528 | && !mSearch; |
| 529 | } |
| 530 | |
| 531 | /** @hide */ |
| 532 | public void setEnableAll() { |
| 533 | mStatusBarExpansion = false; |
| 534 | mNavigateHome = false; |
| 535 | mNotificationPeeking = false; |
| 536 | mRecents = false; |
| 537 | mSearch = false; |
| 538 | } |
| 539 | |
| 540 | /** |
| 541 | * @return {@code true} if all status bar components are disabled |
| 542 | * |
| 543 | * @hide |
| 544 | */ |
| 545 | public boolean areAllComponentsDisabled() { |
| 546 | return mStatusBarExpansion && mNavigateHome && mNotificationPeeking |
| 547 | && mRecents && mSearch; |
| 548 | } |
| 549 | |
| 550 | /** @hide */ |
| 551 | public void setDisableAll() { |
| 552 | mStatusBarExpansion = true; |
| 553 | mNavigateHome = true; |
| 554 | mNotificationPeeking = true; |
| 555 | mRecents = true; |
| 556 | mSearch = true; |
| 557 | } |
| 558 | |
| 559 | @Override |
| 560 | public String toString() { |
| 561 | StringBuilder sb = new StringBuilder(); |
| 562 | sb.append("DisableInfo: "); |
| 563 | sb.append(" mStatusBarExpansion=").append(mStatusBarExpansion ? "disabled" : "enabled"); |
| 564 | sb.append(" mNavigateHome=").append(mNavigateHome ? "disabled" : "enabled"); |
| 565 | sb.append(" mNotificationPeeking=") |
| 566 | .append(mNotificationPeeking ? "disabled" : "enabled"); |
| 567 | sb.append(" mRecents=").append(mRecents ? "disabled" : "enabled"); |
| 568 | sb.append(" mSearch=").append(mSearch ? "disabled" : "enabled"); |
| 569 | |
| 570 | return sb.toString(); |
| 571 | |
| 572 | } |
| 573 | |
| 574 | /** |
| 575 | * Convert a DisableInfo to equivalent flags |
| 576 | * @return a pair of equivalent disable flags |
| 577 | * |
| 578 | * @hide |
| 579 | */ |
| 580 | public Pair<Integer, Integer> toFlags() { |
| 581 | int disable1 = DISABLE_NONE; |
| 582 | int disable2 = DISABLE2_NONE; |
| 583 | |
| 584 | if (mStatusBarExpansion) disable1 |= DISABLE_EXPAND; |
| 585 | if (mNavigateHome) disable1 |= DISABLE_HOME; |
| 586 | if (mNotificationPeeking) disable1 |= DISABLE_NOTIFICATION_ALERTS; |
| 587 | if (mRecents) disable1 |= DISABLE_RECENT; |
| 588 | if (mSearch) disable1 |= DISABLE_SEARCH; |
| 589 | |
| 590 | return new Pair<Integer, Integer>(disable1, disable2); |
| 591 | } |
| 592 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 593 | } |