1 /** 2 * Copyright (c) 2013, 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.server.statusbar; 18 19 import android.graphics.Rect; 20 import android.os.Bundle; 21 22 import com.android.server.notification.NotificationDelegate; 23 24 public interface StatusBarManagerInternal { setNotificationDelegate(NotificationDelegate delegate)25 void setNotificationDelegate(NotificationDelegate delegate); showScreenPinningRequest(int taskId)26 void showScreenPinningRequest(int taskId); showAssistDisclosure()27 void showAssistDisclosure(); 28 preloadRecentApps()29 void preloadRecentApps(); 30 cancelPreloadRecentApps()31 void cancelPreloadRecentApps(); 32 showRecentApps(boolean triggeredFromAltTab)33 void showRecentApps(boolean triggeredFromAltTab); 34 hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey)35 void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey); 36 dismissKeyboardShortcutsMenu()37 void dismissKeyboardShortcutsMenu(); toggleKeyboardShortcutsMenu(int deviceId)38 void toggleKeyboardShortcutsMenu(int deviceId); 39 showChargingAnimation(int batteryLevel)40 void showChargingAnimation(int batteryLevel); 41 42 /** 43 * Show picture-in-picture menu. 44 */ showPictureInPictureMenu()45 void showPictureInPictureMenu(); 46 setWindowState(int window, int state)47 void setWindowState(int window, int state); 48 49 /** 50 * Notifies the status bar that an app transition is pending to delay applying some flags with 51 * visual impact until {@link #appTransitionReady} is called. 52 */ appTransitionPending()53 void appTransitionPending(); 54 55 /** 56 * Notifies the status bar that a pending app transition has been cancelled. 57 */ appTransitionCancelled()58 void appTransitionCancelled(); 59 60 /** 61 * Notifies the status bar that an app transition is now being executed. 62 * 63 * @param statusBarAnimationsStartTime the desired start time for all visual animations in the 64 * status bar caused by this app transition in uptime millis 65 * @param statusBarAnimationsDuration the duration for all visual animations in the status 66 * bar caused by this app transition in millis 67 */ appTransitionStarting(long statusBarAnimationsStartTime, long statusBarAnimationsDuration)68 void appTransitionStarting(long statusBarAnimationsStartTime, long statusBarAnimationsDuration); 69 startAssist(Bundle args)70 void startAssist(Bundle args); onCameraLaunchGestureDetected(int source)71 void onCameraLaunchGestureDetected(int source); topAppWindowChanged(boolean menuVisible)72 void topAppWindowChanged(boolean menuVisible); setSystemUiVisibility(int vis, int fullscreenStackVis, int dockedStackVis, int mask, Rect fullscreenBounds, Rect dockedBounds, String cause)73 void setSystemUiVisibility(int vis, int fullscreenStackVis, int dockedStackVis, int mask, 74 Rect fullscreenBounds, Rect dockedBounds, String cause); toggleSplitScreen()75 void toggleSplitScreen(); appTransitionFinished()76 void appTransitionFinished(); 77 toggleRecentApps()78 void toggleRecentApps(); 79 setCurrentUser(int newUserId)80 void setCurrentUser(int newUserId); 81 82 /** 83 * Set whether the top app currently hides the statusbar. 84 * 85 * @param hidesStatusBar whether it is being hidden 86 */ setTopAppHidesStatusBar(boolean hidesStatusBar)87 void setTopAppHidesStatusBar(boolean hidesStatusBar); 88 showShutdownUi(boolean isReboot, String requestString)89 boolean showShutdownUi(boolean isReboot, String requestString); 90 91 /** 92 * Show a rotation suggestion that a user may approve to rotate the screen. 93 * 94 * @param rotation rotation suggestion 95 */ onProposedRotationChanged(int rotation, boolean isValid)96 void onProposedRotationChanged(int rotation, boolean isValid); 97 } 98