blob: b792d0f3e521529d1c79115e4fe9f8a47729a832 [file] [log] [blame]
Adam Lesinski182f73f2013-12-05 16:48:06 -08001/**
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
17package com.android.server.statusbar;
18
Jorim Jaggi86905582016-02-09 21:36:09 -080019import android.graphics.Rect;
Jorim Jaggi165ce062015-07-06 16:18:11 -070020import android.os.Bundle;
21
Adam Lesinski182f73f2013-12-05 16:48:06 -080022import com.android.server.notification.NotificationDelegate;
23
Adam Lesinski182f73f2013-12-05 16:48:06 -080024public interface StatusBarManagerInternal {
25 void setNotificationDelegate(NotificationDelegate delegate);
Andrii Kulian0f051f52016-04-14 00:41:51 -070026 void showScreenPinningRequest(int taskId);
Adrian Roos4f43dc02015-06-17 16:43:38 -070027 void showAssistDisclosure();
Adrian Roosf2efdd82016-04-15 17:43:18 -070028
29 void preloadRecentApps();
30
31 void cancelPreloadRecentApps();
32
33 void showRecentApps(boolean triggeredFromAltTab, boolean fromHome);
34
35 void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey);
36
Andrei Stingaceanu0bf096f2016-04-14 18:11:57 +010037 void dismissKeyboardShortcutsMenu();
Adrian Roosf2efdd82016-04-15 17:43:18 -070038 void toggleKeyboardShortcutsMenu(int deviceId);
39
40 /**
Winson Chungac52f282017-03-30 14:44:52 -070041 * Show picture-in-picture menu.
Adrian Roosf2efdd82016-04-15 17:43:18 -070042 */
Winson Chungac52f282017-03-30 14:44:52 -070043 void showPictureInPictureMenu();
Adrian Roosf2efdd82016-04-15 17:43:18 -070044
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 */
51 void appTransitionPending();
52
53 /**
54 * Notifies the status bar that a pending app transition has been cancelled.
55 */
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 */
66 void appTransitionStarting(long statusBarAnimationsStartTime, long statusBarAnimationsDuration);
67
Jorim Jaggi165ce062015-07-06 16:18:11 -070068 void startAssist(Bundle args);
Jorim Jaggi40aa8812015-09-23 12:59:22 -070069 void onCameraLaunchGestureDetected(int source);
Jorim Jaggi86905582016-02-09 21:36:09 -080070 void topAppWindowChanged(boolean menuVisible);
71 void setSystemUiVisibility(int vis, int fullscreenStackVis, int dockedStackVis, int mask,
72 Rect fullscreenBounds, Rect dockedBounds, String cause);
Phil Weaver315c34e2016-02-19 15:12:29 -080073 void toggleSplitScreen();
Jorim Jaggi2adba072016-03-03 13:43:39 +010074 void appTransitionFinished();
Adrian Roosf2efdd82016-04-15 17:43:18 -070075
76 void toggleRecentApps();
77
78 void setCurrentUser(int newUserId);
Jason Monk361915c2017-03-21 20:33:59 -040079
Charles He9851a8d2017-10-10 17:31:30 +010080 boolean isGlobalActionsDisabled();
Jason Monk361915c2017-03-21 20:33:59 -040081 void setGlobalActionsListener(GlobalActionsListener listener);
82 void showGlobalActions();
83
Selim Cinek3a49ba22017-08-10 11:17:39 -070084 /**
85 * Set whether the top app currently hides the statusbar.
86 *
87 * @param hidesStatusBar whether it is being hidden
88 */
89 void setTopAppHidesStatusBar(boolean hidesStatusBar);
90
Jason Monkb4302182017-08-04 13:39:17 -040091 boolean showShutdownUi(boolean isReboot, String requestString);
92
Mike Digman93f08342017-11-24 21:46:53 -080093 /**
94 * Show a rotation suggestion that a user may approve to rotate the screen.
95 *
96 * @param rotation rotation suggestion
97 */
Mike Digmane0777312018-01-19 12:41:51 -080098 void onProposedRotationChanged(int rotation, boolean isValid);
Mike Digman93f08342017-11-24 21:46:53 -080099
Jason Monk361915c2017-03-21 20:33:59 -0400100 public interface GlobalActionsListener {
101 /**
102 * Called when sysui starts and connects its status bar, or when the status bar binder
103 * dies indicating sysui is no longer alive.
104 */
105 void onStatusBarConnectedChanged(boolean connected);
106
107 /**
108 * Callback from sysui to notify system that global actions has been successfully shown.
109 */
110 void onGlobalActionsShown();
111
112 /**
113 * Callback from sysui to notify system that the user has dismissed global actions and
114 * it no longer needs to be displayed (even if sysui dies).
115 */
116 void onGlobalActionsDismissed();
117 }
Adam Lesinski182f73f2013-12-05 16:48:06 -0800118}