• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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, boolean fromHome)33     void showRecentApps(boolean triggeredFromAltTab, boolean fromHome);
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 
40     /**
41      * Show picture-in-picture menu.
42      */
showPictureInPictureMenu()43     void showPictureInPictureMenu();
44 
setWindowState(int window, int state)45     void setWindowState(int window, int state);
46 
47     /**
48      * Notifies the status bar that an app transition is pending to delay applying some flags with
49      * visual impact until {@link #appTransitionReady} is called.
50      */
appTransitionPending()51     void appTransitionPending();
52 
53     /**
54      * Notifies the status bar that a pending app transition has been cancelled.
55      */
appTransitionCancelled()56     void appTransitionCancelled();
57 
58     /**
59      * Notifies the status bar that an app transition is now being executed.
60      *
61      * @param statusBarAnimationsStartTime the desired start time for all visual animations in the
62      *        status bar caused by this app transition in uptime millis
63      * @param statusBarAnimationsDuration the duration for all visual animations in the status
64      *        bar caused by this app transition in millis
65      */
appTransitionStarting(long statusBarAnimationsStartTime, long statusBarAnimationsDuration)66     void appTransitionStarting(long statusBarAnimationsStartTime, long statusBarAnimationsDuration);
67 
startAssist(Bundle args)68     void startAssist(Bundle args);
onCameraLaunchGestureDetected(int source)69     void onCameraLaunchGestureDetected(int source);
topAppWindowChanged(boolean menuVisible)70     void topAppWindowChanged(boolean menuVisible);
setSystemUiVisibility(int vis, int fullscreenStackVis, int dockedStackVis, int mask, Rect fullscreenBounds, Rect dockedBounds, String cause)71     void setSystemUiVisibility(int vis, int fullscreenStackVis, int dockedStackVis, int mask,
72             Rect fullscreenBounds, Rect dockedBounds, String cause);
toggleSplitScreen()73     void toggleSplitScreen();
appTransitionFinished()74     void appTransitionFinished();
75 
toggleRecentApps()76     void toggleRecentApps();
77 
setCurrentUser(int newUserId)78     void setCurrentUser(int newUserId);
79 
setGlobalActionsListener(GlobalActionsListener listener)80     void setGlobalActionsListener(GlobalActionsListener listener);
showGlobalActions()81     void showGlobalActions();
82 
83     /**
84      * Set whether the top app currently hides the statusbar.
85      *
86      * @param hidesStatusBar whether it is being hidden
87      */
setTopAppHidesStatusBar(boolean hidesStatusBar)88     void setTopAppHidesStatusBar(boolean hidesStatusBar);
89 
showShutdownUi(boolean isReboot, String requestString)90     boolean showShutdownUi(boolean isReboot, String requestString);
91 
92     public interface GlobalActionsListener {
93         /**
94          * Called when sysui starts and connects its status bar, or when the status bar binder
95          * dies indicating sysui is no longer alive.
96          */
onStatusBarConnectedChanged(boolean connected)97         void onStatusBarConnectedChanged(boolean connected);
98 
99         /**
100          * Callback from sysui to notify system that global actions has been successfully shown.
101          */
onGlobalActionsShown()102         void onGlobalActionsShown();
103 
104         /**
105          * Callback from sysui to notify system that the user has dismissed global actions and
106          * it no longer needs to be displayed (even if sysui dies).
107          */
onGlobalActionsDismissed()108         void onGlobalActionsDismissed();
109     }
110 }
111