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 17 package android.app; 18 19 import android.annotation.IntDef; 20 import android.annotation.NonNull; 21 import android.annotation.Nullable; 22 import android.annotation.RequiresPermission; 23 import android.annotation.SystemApi; 24 import android.annotation.SystemService; 25 import android.annotation.TestApi; 26 import android.compat.annotation.UnsupportedAppUsage; 27 import android.content.Context; 28 import android.os.Binder; 29 import android.os.IBinder; 30 import android.os.RemoteException; 31 import android.os.ServiceManager; 32 import android.util.Pair; 33 import android.util.Slog; 34 import android.view.View; 35 36 import com.android.internal.statusbar.IStatusBarService; 37 38 import java.lang.annotation.Retention; 39 import java.lang.annotation.RetentionPolicy; 40 41 /** 42 * Allows an app to control the status bar. 43 */ 44 @SystemService(Context.STATUS_BAR_SERVICE) 45 public class StatusBarManager { 46 47 /** @hide */ 48 public static final int DISABLE_EXPAND = View.STATUS_BAR_DISABLE_EXPAND; 49 /** @hide */ 50 public static final int DISABLE_NOTIFICATION_ICONS = View.STATUS_BAR_DISABLE_NOTIFICATION_ICONS; 51 /** @hide */ 52 public static final int DISABLE_NOTIFICATION_ALERTS 53 = View.STATUS_BAR_DISABLE_NOTIFICATION_ALERTS; 54 55 /** @hide */ 56 @Deprecated 57 @UnsupportedAppUsage 58 public static final int DISABLE_NOTIFICATION_TICKER 59 = View.STATUS_BAR_DISABLE_NOTIFICATION_TICKER; 60 /** @hide */ 61 public static final int DISABLE_SYSTEM_INFO = View.STATUS_BAR_DISABLE_SYSTEM_INFO; 62 /** @hide */ 63 public static final int DISABLE_HOME = View.STATUS_BAR_DISABLE_HOME; 64 /** @hide */ 65 public static final int DISABLE_RECENT = View.STATUS_BAR_DISABLE_RECENT; 66 /** @hide */ 67 public static final int DISABLE_BACK = View.STATUS_BAR_DISABLE_BACK; 68 /** @hide */ 69 public static final int DISABLE_CLOCK = View.STATUS_BAR_DISABLE_CLOCK; 70 /** @hide */ 71 public static final int DISABLE_SEARCH = View.STATUS_BAR_DISABLE_SEARCH; 72 73 /** @hide */ 74 @Deprecated 75 public static final int DISABLE_NAVIGATION = 76 View.STATUS_BAR_DISABLE_HOME | View.STATUS_BAR_DISABLE_RECENT; 77 78 /** @hide */ 79 public static final int DISABLE_NONE = 0x00000000; 80 81 /** @hide */ 82 public static final int DISABLE_MASK = DISABLE_EXPAND | DISABLE_NOTIFICATION_ICONS 83 | DISABLE_NOTIFICATION_ALERTS | DISABLE_NOTIFICATION_TICKER 84 | DISABLE_SYSTEM_INFO | DISABLE_RECENT | DISABLE_HOME | DISABLE_BACK | DISABLE_CLOCK 85 | DISABLE_SEARCH; 86 87 /** @hide */ 88 @IntDef(flag = true, prefix = {"DISABLE_"}, value = { 89 DISABLE_NONE, 90 DISABLE_EXPAND, 91 DISABLE_NOTIFICATION_ICONS, 92 DISABLE_NOTIFICATION_ALERTS, 93 DISABLE_NOTIFICATION_TICKER, 94 DISABLE_SYSTEM_INFO, 95 DISABLE_HOME, 96 DISABLE_RECENT, 97 DISABLE_BACK, 98 DISABLE_CLOCK, 99 DISABLE_SEARCH 100 }) 101 @Retention(RetentionPolicy.SOURCE) 102 public @interface DisableFlags {} 103 104 /** 105 * Flag to disable quick settings. 106 * 107 * Setting this flag disables quick settings completely, but does not disable expanding the 108 * notification shade. 109 */ 110 /** @hide */ 111 public static final int DISABLE2_QUICK_SETTINGS = 1; 112 /** @hide */ 113 public static final int DISABLE2_SYSTEM_ICONS = 1 << 1; 114 /** @hide */ 115 public static final int DISABLE2_NOTIFICATION_SHADE = 1 << 2; 116 /** @hide */ 117 public static final int DISABLE2_GLOBAL_ACTIONS = 1 << 3; 118 /** @hide */ 119 public static final int DISABLE2_ROTATE_SUGGESTIONS = 1 << 4; 120 121 /** @hide */ 122 public static final int DISABLE2_NONE = 0x00000000; 123 124 /** @hide */ 125 public static final int DISABLE2_MASK = DISABLE2_QUICK_SETTINGS | DISABLE2_SYSTEM_ICONS 126 | DISABLE2_NOTIFICATION_SHADE | DISABLE2_GLOBAL_ACTIONS | DISABLE2_ROTATE_SUGGESTIONS; 127 128 /** @hide */ 129 @IntDef(flag = true, prefix = { "DISABLE2_" }, value = { 130 DISABLE2_NONE, 131 DISABLE2_MASK, 132 DISABLE2_QUICK_SETTINGS, 133 DISABLE2_SYSTEM_ICONS, 134 DISABLE2_NOTIFICATION_SHADE, 135 DISABLE2_GLOBAL_ACTIONS, 136 DISABLE2_ROTATE_SUGGESTIONS 137 }) 138 @Retention(RetentionPolicy.SOURCE) 139 public @interface Disable2Flags {} 140 141 /** 142 * Default disable flags for setup 143 * 144 * @hide 145 */ 146 public static final int DEFAULT_SETUP_DISABLE_FLAGS = DISABLE_NOTIFICATION_ALERTS 147 | DISABLE_HOME | DISABLE_EXPAND | DISABLE_RECENT | DISABLE_CLOCK | DISABLE_SEARCH; 148 149 /** 150 * Default disable2 flags for setup 151 * 152 * @hide 153 */ 154 public static final int DEFAULT_SETUP_DISABLE2_FLAGS = DISABLE2_ROTATE_SUGGESTIONS; 155 156 /** 157 * disable flags to be applied when the device is sim-locked. 158 */ 159 private static final int DEFAULT_SIM_LOCKED_DISABLED_FLAGS = DISABLE_EXPAND; 160 161 /** @hide */ 162 public static final int NAVIGATION_HINT_BACK_ALT = 1 << 0; 163 /** @hide */ 164 public static final int NAVIGATION_HINT_IME_SHOWN = 1 << 1; 165 166 /** @hide */ 167 public static final int WINDOW_STATUS_BAR = 1; 168 /** @hide */ 169 public static final int WINDOW_NAVIGATION_BAR = 2; 170 171 /** @hide */ 172 @IntDef(flag = true, prefix = { "WINDOW_" }, value = { 173 WINDOW_STATUS_BAR, 174 WINDOW_NAVIGATION_BAR 175 }) 176 @Retention(RetentionPolicy.SOURCE) 177 public @interface WindowType {} 178 179 /** @hide */ 180 public static final int WINDOW_STATE_SHOWING = 0; 181 /** @hide */ 182 public static final int WINDOW_STATE_HIDING = 1; 183 /** @hide */ 184 public static final int WINDOW_STATE_HIDDEN = 2; 185 186 /** @hide */ 187 @IntDef(flag = true, prefix = { "WINDOW_STATE_" }, value = { 188 WINDOW_STATE_SHOWING, 189 WINDOW_STATE_HIDING, 190 WINDOW_STATE_HIDDEN 191 }) 192 @Retention(RetentionPolicy.SOURCE) 193 public @interface WindowVisibleState {} 194 195 /** @hide */ 196 public static final int CAMERA_LAUNCH_SOURCE_WIGGLE = 0; 197 /** @hide */ 198 public static final int CAMERA_LAUNCH_SOURCE_POWER_DOUBLE_TAP = 1; 199 /** @hide */ 200 public static final int CAMERA_LAUNCH_SOURCE_LIFT_TRIGGER = 2; 201 202 @UnsupportedAppUsage 203 private Context mContext; 204 private IStatusBarService mService; 205 @UnsupportedAppUsage 206 private IBinder mToken = new Binder(); 207 208 @UnsupportedAppUsage StatusBarManager(Context context)209 StatusBarManager(Context context) { 210 mContext = context; 211 } 212 213 @UnsupportedAppUsage getService()214 private synchronized IStatusBarService getService() { 215 if (mService == null) { 216 mService = IStatusBarService.Stub.asInterface( 217 ServiceManager.getService(Context.STATUS_BAR_SERVICE)); 218 if (mService == null) { 219 Slog.w("StatusBarManager", "warning: no STATUS_BAR_SERVICE"); 220 } 221 } 222 return mService; 223 } 224 225 /** 226 * Disable some features in the status bar. Pass the bitwise-or of the DISABLE_* flags. 227 * To re-enable everything, pass {@link #DISABLE_NONE}. 228 * 229 * @hide 230 */ 231 @UnsupportedAppUsage disable(int what)232 public void disable(int what) { 233 try { 234 final int userId = Binder.getCallingUserHandle().getIdentifier(); 235 final IStatusBarService svc = getService(); 236 if (svc != null) { 237 svc.disableForUser(what, mToken, mContext.getPackageName(), userId); 238 } 239 } catch (RemoteException ex) { 240 throw ex.rethrowFromSystemServer(); 241 } 242 } 243 244 /** 245 * Disable additional status bar features. Pass the bitwise-or of the DISABLE2_* flags. 246 * To re-enable everything, pass {@link #DISABLE_NONE}. 247 * 248 * Warning: Only pass DISABLE2_* flags into this function, do not use DISABLE_* flags. 249 * 250 * @hide 251 */ disable2(@isable2Flags int what)252 public void disable2(@Disable2Flags int what) { 253 try { 254 final int userId = Binder.getCallingUserHandle().getIdentifier(); 255 final IStatusBarService svc = getService(); 256 if (svc != null) { 257 svc.disable2ForUser(what, mToken, mContext.getPackageName(), userId); 258 } 259 } catch (RemoteException ex) { 260 throw ex.rethrowFromSystemServer(); 261 } 262 } 263 264 /** 265 * Expand the notifications panel. 266 * 267 * @hide 268 */ 269 @UnsupportedAppUsage 270 @TestApi expandNotificationsPanel()271 public void expandNotificationsPanel() { 272 try { 273 final IStatusBarService svc = getService(); 274 if (svc != null) { 275 svc.expandNotificationsPanel(); 276 } 277 } catch (RemoteException ex) { 278 throw ex.rethrowFromSystemServer(); 279 } 280 } 281 282 /** 283 * Collapse the notifications and settings panels. 284 * 285 * @hide 286 */ 287 @UnsupportedAppUsage 288 @TestApi collapsePanels()289 public void collapsePanels() { 290 try { 291 final IStatusBarService svc = getService(); 292 if (svc != null) { 293 svc.collapsePanels(); 294 } 295 } catch (RemoteException ex) { 296 throw ex.rethrowFromSystemServer(); 297 } 298 } 299 300 /** 301 * Expand the settings panel. 302 * 303 * @hide 304 */ 305 @UnsupportedAppUsage expandSettingsPanel()306 public void expandSettingsPanel() { 307 expandSettingsPanel(null); 308 } 309 310 /** 311 * Expand the settings panel and open a subPanel. If the subpanel is null or does not have a 312 * corresponding tile, the QS panel is simply expanded 313 * 314 * @hide 315 */ 316 @UnsupportedAppUsage expandSettingsPanel(@ullable String subPanel)317 public void expandSettingsPanel(@Nullable String subPanel) { 318 try { 319 final IStatusBarService svc = getService(); 320 if (svc != null) { 321 svc.expandSettingsPanel(subPanel); 322 } 323 } catch (RemoteException ex) { 324 throw ex.rethrowFromSystemServer(); 325 } 326 } 327 328 /** @hide */ 329 @UnsupportedAppUsage setIcon(String slot, int iconId, int iconLevel, String contentDescription)330 public void setIcon(String slot, int iconId, int iconLevel, String contentDescription) { 331 try { 332 final IStatusBarService svc = getService(); 333 if (svc != null) { 334 svc.setIcon(slot, mContext.getPackageName(), iconId, iconLevel, 335 contentDescription); 336 } 337 } catch (RemoteException ex) { 338 throw ex.rethrowFromSystemServer(); 339 } 340 } 341 342 /** @hide */ 343 @UnsupportedAppUsage removeIcon(String slot)344 public void removeIcon(String slot) { 345 try { 346 final IStatusBarService svc = getService(); 347 if (svc != null) { 348 svc.removeIcon(slot); 349 } 350 } catch (RemoteException ex) { 351 throw ex.rethrowFromSystemServer(); 352 } 353 } 354 355 /** @hide */ 356 @UnsupportedAppUsage setIconVisibility(String slot, boolean visible)357 public void setIconVisibility(String slot, boolean visible) { 358 try { 359 final IStatusBarService svc = getService(); 360 if (svc != null) { 361 svc.setIconVisibility(slot, visible); 362 } 363 } catch (RemoteException ex) { 364 throw ex.rethrowFromSystemServer(); 365 } 366 } 367 368 /** 369 * Enable or disable status bar elements (notifications, clock) which are inappropriate during 370 * device setup. 371 * 372 * @param disabled whether to apply or remove the disabled flags 373 * 374 * @hide 375 */ 376 @SystemApi 377 @TestApi 378 @RequiresPermission(android.Manifest.permission.STATUS_BAR) setDisabledForSetup(boolean disabled)379 public void setDisabledForSetup(boolean disabled) { 380 try { 381 final int userId = Binder.getCallingUserHandle().getIdentifier(); 382 final IStatusBarService svc = getService(); 383 if (svc != null) { 384 svc.disableForUser(disabled ? DEFAULT_SETUP_DISABLE_FLAGS : DISABLE_NONE, 385 mToken, mContext.getPackageName(), userId); 386 svc.disable2ForUser(disabled ? DEFAULT_SETUP_DISABLE2_FLAGS : DISABLE2_NONE, 387 mToken, mContext.getPackageName(), userId); 388 } 389 } catch (RemoteException ex) { 390 throw ex.rethrowFromSystemServer(); 391 } 392 } 393 394 /** 395 * Enable or disable expansion of the status bar. When the device is SIM-locked, the status 396 * bar should not be expandable. 397 * 398 * @param disabled If {@code true}, the status bar will be set to non-expandable. If 399 * {@code false}, re-enables expansion of the status bar. 400 * @hide 401 */ 402 @TestApi 403 @RequiresPermission(android.Manifest.permission.STATUS_BAR) setDisabledForSimNetworkLock(boolean disabled)404 public void setDisabledForSimNetworkLock(boolean disabled) { 405 try { 406 final int userId = Binder.getCallingUserHandle().getIdentifier(); 407 final IStatusBarService svc = getService(); 408 if (svc != null) { 409 svc.disableForUser(disabled ? DEFAULT_SIM_LOCKED_DISABLED_FLAGS : DISABLE_NONE, 410 mToken, mContext.getPackageName(), userId); 411 } 412 } catch (RemoteException ex) { 413 throw ex.rethrowFromSystemServer(); 414 } 415 } 416 417 /** 418 * Get this app's currently requested disabled components 419 * 420 * @return a new DisableInfo 421 * 422 * @hide 423 */ 424 @SystemApi 425 @TestApi 426 @RequiresPermission(android.Manifest.permission.STATUS_BAR) 427 @NonNull getDisableInfo()428 public DisableInfo getDisableInfo() { 429 try { 430 final int userId = Binder.getCallingUserHandle().getIdentifier(); 431 final IStatusBarService svc = getService(); 432 int[] flags = new int[] {0, 0}; 433 if (svc != null) { 434 flags = svc.getDisableFlags(mToken, userId); 435 } 436 437 return new DisableInfo(flags[0], flags[1]); 438 } catch (RemoteException ex) { 439 throw ex.rethrowFromSystemServer(); 440 } 441 } 442 443 /** @hide */ windowStateToString(int state)444 public static String windowStateToString(int state) { 445 if (state == WINDOW_STATE_HIDING) return "WINDOW_STATE_HIDING"; 446 if (state == WINDOW_STATE_HIDDEN) return "WINDOW_STATE_HIDDEN"; 447 if (state == WINDOW_STATE_SHOWING) return "WINDOW_STATE_SHOWING"; 448 return "WINDOW_STATE_UNKNOWN"; 449 } 450 451 /** 452 * DisableInfo describes this app's requested state of the StatusBar with regards to which 453 * components are enabled/disabled 454 * 455 * @hide 456 */ 457 @SystemApi 458 @TestApi 459 public static final class DisableInfo { 460 461 private boolean mStatusBarExpansion; 462 private boolean mNavigateHome; 463 private boolean mNotificationPeeking; 464 private boolean mRecents; 465 private boolean mSearch; 466 private boolean mSystemIcons; 467 private boolean mClock; 468 private boolean mNotificationIcons; 469 470 /** @hide */ DisableInfo(int flags1, int flags2)471 public DisableInfo(int flags1, int flags2) { 472 mStatusBarExpansion = (flags1 & DISABLE_EXPAND) != 0; 473 mNavigateHome = (flags1 & DISABLE_HOME) != 0; 474 mNotificationPeeking = (flags1 & DISABLE_NOTIFICATION_ALERTS) != 0; 475 mRecents = (flags1 & DISABLE_RECENT) != 0; 476 mSearch = (flags1 & DISABLE_SEARCH) != 0; 477 mSystemIcons = (flags1 & DISABLE_SYSTEM_INFO) != 0; 478 mClock = (flags1 & DISABLE_CLOCK) != 0; 479 mNotificationIcons = (flags1 & DISABLE_NOTIFICATION_ICONS) != 0; 480 } 481 482 /** @hide */ DisableInfo()483 public DisableInfo() {} 484 485 /** 486 * @return {@code true} if expanding the notification shade is disabled 487 * 488 * @hide 489 */ 490 @SystemApi 491 @TestApi isStatusBarExpansionDisabled()492 public boolean isStatusBarExpansionDisabled() { 493 return mStatusBarExpansion; 494 } 495 496 /** * @hide */ setStatusBarExpansionDisabled(boolean disabled)497 public void setStatusBarExpansionDisabled(boolean disabled) { 498 mStatusBarExpansion = disabled; 499 } 500 501 /** 502 * @return {@code true} if navigation home is disabled 503 * 504 * @hide 505 */ 506 @SystemApi 507 @TestApi isNavigateToHomeDisabled()508 public boolean isNavigateToHomeDisabled() { 509 return mNavigateHome; 510 } 511 512 /** * @hide */ setNagivationHomeDisabled(boolean disabled)513 public void setNagivationHomeDisabled(boolean disabled) { 514 mNavigateHome = disabled; 515 } 516 517 /** 518 * @return {@code true} if notification peeking (heads-up notification) is disabled 519 * 520 * @hide 521 */ 522 @SystemApi 523 @TestApi isNotificationPeekingDisabled()524 public boolean isNotificationPeekingDisabled() { 525 return mNotificationPeeking; 526 } 527 528 /** @hide */ setNotificationPeekingDisabled(boolean disabled)529 public void setNotificationPeekingDisabled(boolean disabled) { 530 mNotificationPeeking = disabled; 531 } 532 533 /** 534 * @return {@code true} if mRecents/overview is disabled 535 * 536 * @hide 537 */ 538 @SystemApi 539 @TestApi isRecentsDisabled()540 public boolean isRecentsDisabled() { 541 return mRecents; 542 } 543 544 /** @hide */ setRecentsDisabled(boolean disabled)545 public void setRecentsDisabled(boolean disabled) { 546 mRecents = disabled; 547 } 548 549 /** 550 * @return {@code true} if mSearch is disabled 551 * 552 * @hide 553 */ 554 @SystemApi 555 @TestApi isSearchDisabled()556 public boolean isSearchDisabled() { 557 return mSearch; 558 } 559 560 /** @hide */ setSearchDisabled(boolean disabled)561 public void setSearchDisabled(boolean disabled) { 562 mSearch = disabled; 563 } 564 565 /** 566 * @return {@code true} if system icons are disabled 567 * 568 * @hide 569 */ areSystemIconsDisabled()570 public boolean areSystemIconsDisabled() { 571 return mSystemIcons; 572 } 573 574 /** * @hide */ setSystemIconsDisabled(boolean disabled)575 public void setSystemIconsDisabled(boolean disabled) { 576 mSystemIcons = disabled; 577 } 578 579 /** 580 * @return {@code true} if the clock icon is disabled 581 * 582 * @hide 583 */ isClockDisabled()584 public boolean isClockDisabled() { 585 return mClock; 586 } 587 588 /** * @hide */ setClockDisabled(boolean disabled)589 public void setClockDisabled(boolean disabled) { 590 mClock = disabled; 591 } 592 593 /** 594 * @return {@code true} if notification icons are disabled 595 * 596 * @hide 597 */ areNotificationIconsDisabled()598 public boolean areNotificationIconsDisabled() { 599 return mNotificationIcons; 600 } 601 602 /** * @hide */ setNotificationIconsDisabled(boolean disabled)603 public void setNotificationIconsDisabled(boolean disabled) { 604 mNotificationIcons = disabled; 605 } 606 607 /** 608 * @return {@code true} if no components are disabled (default state) 609 * 610 * @hide 611 */ 612 @SystemApi 613 @TestApi areAllComponentsEnabled()614 public boolean areAllComponentsEnabled() { 615 return !mStatusBarExpansion && !mNavigateHome && !mNotificationPeeking && !mRecents 616 && !mSearch && !mSystemIcons && !mClock && !mNotificationIcons; 617 } 618 619 /** @hide */ setEnableAll()620 public void setEnableAll() { 621 mStatusBarExpansion = false; 622 mNavigateHome = false; 623 mNotificationPeeking = false; 624 mRecents = false; 625 mSearch = false; 626 mSystemIcons = false; 627 mClock = false; 628 mNotificationIcons = false; 629 } 630 631 /** 632 * @return {@code true} if all status bar components are disabled 633 * 634 * @hide 635 */ areAllComponentsDisabled()636 public boolean areAllComponentsDisabled() { 637 return mStatusBarExpansion && mNavigateHome && mNotificationPeeking 638 && mRecents && mSearch && mSystemIcons && mClock && mNotificationIcons; 639 } 640 641 /** @hide */ setDisableAll()642 public void setDisableAll() { 643 mStatusBarExpansion = true; 644 mNavigateHome = true; 645 mNotificationPeeking = true; 646 mRecents = true; 647 mSearch = true; 648 mSystemIcons = true; 649 mClock = true; 650 mNotificationIcons = true; 651 } 652 653 @NonNull 654 @Override toString()655 public String toString() { 656 StringBuilder sb = new StringBuilder(); 657 sb.append("DisableInfo: "); 658 sb.append(" mStatusBarExpansion=").append(mStatusBarExpansion ? "disabled" : "enabled"); 659 sb.append(" mNavigateHome=").append(mNavigateHome ? "disabled" : "enabled"); 660 sb.append(" mNotificationPeeking=") 661 .append(mNotificationPeeking ? "disabled" : "enabled"); 662 sb.append(" mRecents=").append(mRecents ? "disabled" : "enabled"); 663 sb.append(" mSearch=").append(mSearch ? "disabled" : "enabled"); 664 sb.append(" mSystemIcons=").append(mSystemIcons ? "disabled" : "enabled"); 665 sb.append(" mClock=").append(mClock ? "disabled" : "enabled"); 666 sb.append(" mNotificationIcons=").append(mNotificationIcons ? "disabled" : "enabled"); 667 668 return sb.toString(); 669 670 } 671 672 /** 673 * Convert a DisableInfo to equivalent flags 674 * @return a pair of equivalent disable flags 675 * 676 * @hide 677 */ toFlags()678 public Pair<Integer, Integer> toFlags() { 679 int disable1 = DISABLE_NONE; 680 int disable2 = DISABLE2_NONE; 681 682 if (mStatusBarExpansion) disable1 |= DISABLE_EXPAND; 683 if (mNavigateHome) disable1 |= DISABLE_HOME; 684 if (mNotificationPeeking) disable1 |= DISABLE_NOTIFICATION_ALERTS; 685 if (mRecents) disable1 |= DISABLE_RECENT; 686 if (mSearch) disable1 |= DISABLE_SEARCH; 687 if (mSystemIcons) disable1 |= DISABLE_SYSTEM_INFO; 688 if (mClock) disable1 |= DISABLE_CLOCK; 689 if (mNotificationIcons) disable1 |= DISABLE_NOTIFICATION_ICONS; 690 691 return new Pair<Integer, Integer>(disable1, disable2); 692 } 693 } 694 } 695