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.os.Bundle; 20 import android.service.notification.StatusBarNotification; 21 22 import com.android.internal.statusbar.IStatusBar; 23 import com.android.internal.statusbar.StatusBarIcon; 24 import com.android.internal.statusbar.StatusBarIconList; 25 import com.android.internal.statusbar.NotificationVisibility; 26 27 /** @hide */ 28 interface IStatusBarService 29 { 30 void expandNotificationsPanel(); 31 void collapsePanels(); 32 void disable(int what, IBinder token, String pkg); 33 void disableForUser(int what, IBinder token, String pkg, int userId); 34 void disable2(int what, IBinder token, String pkg); 35 void disable2ForUser(int what, IBinder token, String pkg, int userId); 36 void setIcon(String slot, String iconPackage, int iconId, int iconLevel, String contentDescription); 37 void setIconVisibility(String slot, boolean visible); 38 void removeIcon(String slot); 39 void topAppWindowChanged(boolean menuVisible); 40 void setImeWindowStatus(in IBinder token, int vis, int backDisposition, 41 boolean showImeSwitcher); 42 void expandSettingsPanel(); 43 void setCurrentUser(int newUserId); 44 45 // ---- Methods below are for use by the status bar policy services ---- 46 // You need the STATUS_BAR_SERVICE permission 47 void registerStatusBar(IStatusBar callbacks, out StatusBarIconList iconList, 48 out int[] switches, out List<IBinder> binders); 49 void onPanelRevealed(boolean clearNotificationEffects, int numItems); 50 void onPanelHidden(); 51 // Mark current notifications as "seen" and stop ringing, vibrating, blinking. 52 void clearNotificationEffects(); 53 void onNotificationClick(String key); 54 void onNotificationActionClick(String key, int actionIndex); 55 void onNotificationError(String pkg, String tag, int id, 56 int uid, int initialPid, String message, int userId); 57 void onClearAllNotifications(int userId); 58 void onNotificationClear(String pkg, String tag, int id, int userId); 59 void onNotificationVisibilityChanged( in NotificationVisibility[] newlyVisibleKeys, 60 in NotificationVisibility[] noLongerVisibleKeys); 61 void onNotificationExpansionChanged(in String key, in boolean userAction, in boolean expanded); 62 void setSystemUiVisibility(int vis, int mask, String cause); 63 void setWindowState(int window, int state); 64 65 void showRecentApps(boolean triggeredFromAltTab); 66 void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey); 67 void toggleRecentApps(); 68 void preloadRecentApps(); 69 void cancelPreloadRecentApps(); 70 71 /** 72 * Notifies the status bar that an app transition is pending to delay applying some flags with 73 * visual impact until {@link #appTransitionReady} is called. 74 */ 75 void appTransitionPending(); 76 77 /** 78 * Notifies the status bar that a pending app transition has been cancelled. 79 */ 80 void appTransitionCancelled(); 81 82 /** 83 * Notifies the status bar that an app transition is now being executed. 84 * 85 * @param statusBarAnimationsStartTime the desired start time for all visual animations in the 86 * status bar caused by this app transition in uptime millis 87 * @param statusBarAnimationsDuration the duration for all visual animations in the status 88 * bar caused by this app transition in millis 89 */ 90 void appTransitionStarting(long statusBarAnimationsStartTime, long statusBarAnimationsDuration); 91 92 void startAssist(in Bundle args); 93 } 94