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 com.android.internal.statusbar; 18 19 import android.content.ComponentName; 20 import android.graphics.Rect; 21 import android.os.Bundle; 22 import android.service.notification.StatusBarNotification; 23 24 import com.android.internal.statusbar.StatusBarIcon; 25 26 /** @hide */ 27 oneway interface IStatusBar 28 { 29 void setIcon(String slot, in StatusBarIcon icon); 30 void removeIcon(String slot); 31 void disable(int state1, int state2); 32 void animateExpandNotificationsPanel(); 33 void animateExpandSettingsPanel(String subPanel); 34 void animateCollapsePanels(); 35 void togglePanel(); 36 37 /** 38 * Notifies the status bar of a System UI visibility flag change. 39 * 40 * @param vis the visibility flags except SYSTEM_UI_FLAG_LIGHT_STATUS_BAR which will be reported 41 * separately in fullscreenStackVis and dockedStackVis 42 * @param fullscreenStackVis the flags which only apply in the region of the fullscreen stack, 43 * which is currently only SYSTEM_UI_FLAG_LIGHT_STATUS_BAR 44 * @param dockedStackVis the flags that only apply in the region of the docked stack, which is 45 * currently only SYSTEM_UI_FLAG_LIGHT_STATUS_BAR 46 * @param mask which flags to change 47 * @param fullscreenBounds the current bounds of the fullscreen stack, in screen coordinates 48 * @param dockedBounds the current bounds of the docked stack, in screen coordinates 49 */ 50 void setSystemUiVisibility(int vis, int fullscreenStackVis, int dockedStackVis, int mask, 51 in Rect fullscreenBounds, in Rect dockedBounds); 52 53 void topAppWindowChanged(boolean menuVisible); 54 void setImeWindowStatus(in IBinder token, int vis, int backDisposition, 55 boolean showImeSwitcher); 56 void setWindowState(int window, int state); 57 58 void showRecentApps(boolean triggeredFromAltTab, boolean fromHome); 59 void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey); 60 void toggleRecentApps(); 61 void toggleSplitScreen(); 62 void preloadRecentApps(); 63 void cancelPreloadRecentApps(); 64 void showScreenPinningRequest(int taskId); 65 66 void dismissKeyboardShortcutsMenu(); 67 void toggleKeyboardShortcutsMenu(int deviceId); 68 69 /** 70 * Notifies the status bar that an app transition is pending to delay applying some flags with 71 * visual impact until {@link #appTransitionReady} is called. 72 */ 73 void appTransitionPending(); 74 75 /** 76 * Notifies the status bar that a pending app transition has been cancelled. 77 */ 78 void appTransitionCancelled(); 79 80 /** 81 * Notifies the status bar that an app transition is now being executed. 82 * 83 * @param statusBarAnimationsStartTime the desired start time for all visual animations in the 84 * status bar caused by this app transition in uptime millis 85 * @param statusBarAnimationsDuration the duration for all visual animations in the status 86 * bar caused by this app transition in millis 87 */ 88 void appTransitionStarting(long statusBarAnimationsStartTime, long statusBarAnimationsDuration); 89 90 /** 91 * Notifies the status bar that an app transition is done. 92 */ 93 void appTransitionFinished(); 94 95 void showAssistDisclosure(); 96 void startAssist(in Bundle args); 97 98 /** 99 * Notifies the status bar that a camera launch gesture has been detected. 100 * 101 * @param source the identifier for the gesture, see {@link StatusBarManager} 102 */ 103 void onCameraLaunchGestureDetected(int source); 104 105 /** 106 * Shows the picture-in-picture menu if an activity is in picture-in-picture mode. 107 */ 108 void showPictureInPictureMenu(); 109 110 /** 111 * Shows the global actions menu. 112 */ 113 void showGlobalActionsMenu(); 114 115 /** 116 * Set whether the top app currently hides the statusbar. 117 * 118 * @param hidesStatusBar whether it is being hidden 119 */ 120 void setTopAppHidesStatusBar(boolean hidesStatusBar); 121 122 void addQsTile(in ComponentName tile); 123 void remQsTile(in ComponentName tile); 124 void clickQsTile(in ComponentName tile); 125 void handleSystemKey(in int key); 126 127 void showShutdownUi(boolean isReboot, String reason); 128 } 129