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