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.hardware.biometrics.IBiometricPromptReceiver; 22 import android.os.Bundle; 23 import android.service.notification.StatusBarNotification; 24 25 import com.android.internal.statusbar.StatusBarIcon; 26 27 /** @hide */ 28 oneway interface IStatusBar 29 { setIcon(String slot, in StatusBarIcon icon)30 void setIcon(String slot, in StatusBarIcon icon); removeIcon(String slot)31 void removeIcon(String slot); disable(int state1, int state2)32 void disable(int state1, int state2); animateExpandNotificationsPanel()33 void animateExpandNotificationsPanel(); animateExpandSettingsPanel(String subPanel)34 void animateExpandSettingsPanel(String subPanel); animateCollapsePanels()35 void animateCollapsePanels(); togglePanel()36 void togglePanel(); 37 showWirelessChargingAnimation(int batteryLevel)38 void showWirelessChargingAnimation(int batteryLevel); 39 40 /** 41 * Notifies the status bar of a System UI visibility flag change. 42 * 43 * @param vis the visibility flags except SYSTEM_UI_FLAG_LIGHT_STATUS_BAR which will be reported 44 * separately in fullscreenStackVis and dockedStackVis 45 * @param fullscreenStackVis the flags which only apply in the region of the fullscreen stack, 46 * which is currently only SYSTEM_UI_FLAG_LIGHT_STATUS_BAR 47 * @param dockedStackVis the flags that only apply in the region of the docked stack, which is 48 * currently only SYSTEM_UI_FLAG_LIGHT_STATUS_BAR 49 * @param mask which flags to change 50 * @param fullscreenBounds the current bounds of the fullscreen stack, in screen coordinates 51 * @param dockedBounds the current bounds of the docked stack, in screen coordinates 52 */ setSystemUiVisibility(int vis, int fullscreenStackVis, int dockedStackVis, int mask, in Rect fullscreenBounds, in Rect dockedBounds)53 void setSystemUiVisibility(int vis, int fullscreenStackVis, int dockedStackVis, int mask, 54 in Rect fullscreenBounds, in Rect dockedBounds); 55 topAppWindowChanged(boolean menuVisible)56 void topAppWindowChanged(boolean menuVisible); setImeWindowStatus(in IBinder token, int vis, int backDisposition, boolean showImeSwitcher)57 void setImeWindowStatus(in IBinder token, int vis, int backDisposition, 58 boolean showImeSwitcher); setWindowState(int window, int state)59 void setWindowState(int window, int state); 60 showRecentApps(boolean triggeredFromAltTab)61 void showRecentApps(boolean triggeredFromAltTab); hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey)62 void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey); toggleRecentApps()63 void toggleRecentApps(); toggleSplitScreen()64 void toggleSplitScreen(); preloadRecentApps()65 void preloadRecentApps(); cancelPreloadRecentApps()66 void cancelPreloadRecentApps(); showScreenPinningRequest(int taskId)67 void showScreenPinningRequest(int taskId); 68 dismissKeyboardShortcutsMenu()69 void dismissKeyboardShortcutsMenu(); toggleKeyboardShortcutsMenu(int deviceId)70 void toggleKeyboardShortcutsMenu(int deviceId); 71 72 /** 73 * Notifies the status bar that an app transition is pending to delay applying some flags with 74 * visual impact until {@link #appTransitionReady} is called. 75 */ appTransitionPending()76 void appTransitionPending(); 77 78 /** 79 * Notifies the status bar that a pending app transition has been cancelled. 80 */ appTransitionCancelled()81 void appTransitionCancelled(); 82 83 /** 84 * Notifies the status bar that an app transition is now being executed. 85 * 86 * @param statusBarAnimationsStartTime the desired start time for all visual animations in the 87 * status bar caused by this app transition in uptime millis 88 * @param statusBarAnimationsDuration the duration for all visual animations in the status 89 * bar caused by this app transition in millis 90 */ appTransitionStarting(long statusBarAnimationsStartTime, long statusBarAnimationsDuration)91 void appTransitionStarting(long statusBarAnimationsStartTime, long statusBarAnimationsDuration); 92 93 /** 94 * Notifies the status bar that an app transition is done. 95 */ appTransitionFinished()96 void appTransitionFinished(); 97 showAssistDisclosure()98 void showAssistDisclosure(); startAssist(in Bundle args)99 void startAssist(in Bundle args); 100 101 /** 102 * Notifies the status bar that a camera launch gesture has been detected. 103 * 104 * @param source the identifier for the gesture, see {@link StatusBarManager} 105 */ onCameraLaunchGestureDetected(int source)106 void onCameraLaunchGestureDetected(int source); 107 108 /** 109 * Shows the picture-in-picture menu if an activity is in picture-in-picture mode. 110 */ showPictureInPictureMenu()111 void showPictureInPictureMenu(); 112 113 /** 114 * Shows the global actions menu. 115 */ showGlobalActionsMenu()116 void showGlobalActionsMenu(); 117 118 /** 119 * Notifies the status bar that a new rotation suggestion is available. 120 */ onProposedRotationChanged(int rotation, boolean isValid)121 void onProposedRotationChanged(int rotation, boolean isValid); 122 123 /** 124 * Set whether the top app currently hides the statusbar. 125 * 126 * @param hidesStatusBar whether it is being hidden 127 */ setTopAppHidesStatusBar(boolean hidesStatusBar)128 void setTopAppHidesStatusBar(boolean hidesStatusBar); 129 addQsTile(in ComponentName tile)130 void addQsTile(in ComponentName tile); remQsTile(in ComponentName tile)131 void remQsTile(in ComponentName tile); clickQsTile(in ComponentName tile)132 void clickQsTile(in ComponentName tile); handleSystemKey(in int key)133 void handleSystemKey(in int key); 134 135 /** 136 * Methods to show toast messages for screen pinning 137 */ showPinningEnterExitToast(boolean entering)138 void showPinningEnterExitToast(boolean entering); showPinningEscapeToast()139 void showPinningEscapeToast(); 140 showShutdownUi(boolean isReboot, String reason)141 void showShutdownUi(boolean isReboot, String reason); 142 143 // Used to show the dialog when FingerprintService starts authentication showFingerprintDialog(in Bundle bundle, IBiometricPromptReceiver receiver)144 void showFingerprintDialog(in Bundle bundle, IBiometricPromptReceiver receiver); 145 // Used to hide the dialog when a finger is authenticated onFingerprintAuthenticated()146 void onFingerprintAuthenticated(); 147 // Used to set a temporary message, e.g. fingerprint not recognized, finger moved too fast, etc onFingerprintHelp(String message)148 void onFingerprintHelp(String message); 149 // Used to set a message - the dialog will dismiss after a certain amount of time onFingerprintError(String error)150 void onFingerprintError(String error); 151 // Used to hide the fingerprint dialog when the authenticationclient is stopped hideFingerprintDialog()152 void hideFingerprintDialog(); 153 } 154