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.IStatusBar;
25 import com.android.internal.statusbar.StatusBarIcon;
26 import com.android.internal.statusbar.StatusBarIconList;
27 import com.android.internal.statusbar.NotificationVisibility;
28 
29 /** @hide */
30 interface IStatusBarService
31 {
expandNotificationsPanel()32     void expandNotificationsPanel();
collapsePanels()33     void collapsePanels();
disable(int what, IBinder token, String pkg)34     void disable(int what, IBinder token, String pkg);
disableForUser(int what, IBinder token, String pkg, int userId)35     void disableForUser(int what, IBinder token, String pkg, int userId);
disable2(int what, IBinder token, String pkg)36     void disable2(int what, IBinder token, String pkg);
disable2ForUser(int what, IBinder token, String pkg, int userId)37     void disable2ForUser(int what, IBinder token, String pkg, int userId);
setIcon(String slot, String iconPackage, int iconId, int iconLevel, String contentDescription)38     void setIcon(String slot, String iconPackage, int iconId, int iconLevel, String contentDescription);
setIconVisibility(String slot, boolean visible)39     void setIconVisibility(String slot, boolean visible);
removeIcon(String slot)40     void removeIcon(String slot);
setImeWindowStatus(in IBinder token, int vis, int backDisposition, boolean showImeSwitcher)41     void setImeWindowStatus(in IBinder token, int vis, int backDisposition,
42             boolean showImeSwitcher);
expandSettingsPanel(String subPanel)43     void expandSettingsPanel(String subPanel);
44 
45     // ---- Methods below are for use by the status bar policy services ----
46     // You need the STATUS_BAR_SERVICE permission
registerStatusBar(IStatusBar callbacks, out List<String> iconSlots, out List<StatusBarIcon> iconList, out int[] switches, out List<IBinder> binders, out Rect fullscreenStackBounds, out Rect dockedStackBounds)47     void registerStatusBar(IStatusBar callbacks, out List<String> iconSlots,
48             out List<StatusBarIcon> iconList,
49             out int[] switches, out List<IBinder> binders, out Rect fullscreenStackBounds,
50             out Rect dockedStackBounds);
onPanelRevealed(boolean clearNotificationEffects, int numItems)51     void onPanelRevealed(boolean clearNotificationEffects, int numItems);
onPanelHidden()52     void onPanelHidden();
53     // Mark current notifications as "seen" and stop ringing, vibrating, blinking.
clearNotificationEffects()54     void clearNotificationEffects();
onNotificationClick(String key)55     void onNotificationClick(String key);
onNotificationActionClick(String key, int actionIndex)56     void onNotificationActionClick(String key, int actionIndex);
onNotificationError(String pkg, String tag, int id, int uid, int initialPid, String message, int userId)57     void onNotificationError(String pkg, String tag, int id,
58             int uid, int initialPid, String message, int userId);
onClearAllNotifications(int userId)59     void onClearAllNotifications(int userId);
onNotificationClear(String pkg, String tag, int id, int userId)60     void onNotificationClear(String pkg, String tag, int id, int userId);
onNotificationVisibilityChanged( in NotificationVisibility[] newlyVisibleKeys, in NotificationVisibility[] noLongerVisibleKeys)61     void onNotificationVisibilityChanged( in NotificationVisibility[] newlyVisibleKeys,
62             in NotificationVisibility[] noLongerVisibleKeys);
onNotificationExpansionChanged(in String key, in boolean userAction, in boolean expanded)63     void onNotificationExpansionChanged(in String key, in boolean userAction, in boolean expanded);
setSystemUiVisibility(int vis, int mask, String cause)64     void setSystemUiVisibility(int vis, int mask, String cause);
65 
onGlobalActionsShown()66     void onGlobalActionsShown();
onGlobalActionsHidden()67     void onGlobalActionsHidden();
68 
69     /**
70      * These methods are needed for global actions control which the UI is shown in sysui.
71      */
shutdown()72     void shutdown();
reboot(boolean safeMode)73     void reboot(boolean safeMode);
74 
addTile(in ComponentName tile)75     void addTile(in ComponentName tile);
remTile(in ComponentName tile)76     void remTile(in ComponentName tile);
clickTile(in ComponentName tile)77     void clickTile(in ComponentName tile);
handleSystemNavigationKey(in int key)78     void handleSystemNavigationKey(in int key);
79 }
80