blob: a93d2b8b6fb9beb19cb87f12874b4432e63b51a0 [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
Winson Chungdff7a732017-12-11 12:17:06 -080033 void showRecentApps(boolean triggeredFromAltTab);
Adrian Roosf2efdd82016-04-15 17:43:18 -070034
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
Beverlyae79ab92017-12-11 09:20:02 -050040 void showChargingAnimation(int batteryLevel);
41
Adrian Roosf2efdd82016-04-15 17:43:18 -070042 /**
Winson Chungac52f282017-03-30 14:44:52 -070043 * Show picture-in-picture menu.
Adrian Roosf2efdd82016-04-15 17:43:18 -070044 */
Winson Chungac52f282017-03-30 14:44:52 -070045 void showPictureInPictureMenu();
Adrian Roosf2efdd82016-04-15 17:43:18 -070046
Tiger Huang7c610aa2018-10-27 00:01:01 +080047 void setWindowState(int displayId, int window, int state);
Adrian Roosf2efdd82016-04-15 17:43:18 -070048
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.
Tiger Huang7c610aa2018-10-27 00:01:01 +080052 *
53 * @param displayId the ID of the display which has this event.
Adrian Roosf2efdd82016-04-15 17:43:18 -070054 */
Tiger Huang7c610aa2018-10-27 00:01:01 +080055 void appTransitionPending(int displayId);
Adrian Roosf2efdd82016-04-15 17:43:18 -070056
57 /**
58 * Notifies the status bar that a pending app transition has been cancelled.
Tiger Huang7c610aa2018-10-27 00:01:01 +080059 *
60 * @param displayId the ID of the display which has this event.
Adrian Roosf2efdd82016-04-15 17:43:18 -070061 */
Tiger Huang7c610aa2018-10-27 00:01:01 +080062 void appTransitionCancelled(int displayId);
Adrian Roosf2efdd82016-04-15 17:43:18 -070063
64 /**
65 * Notifies the status bar that an app transition is now being executed.
66 *
Tiger Huang7c610aa2018-10-27 00:01:01 +080067 * @param displayId the ID of the display which has this event.
Adrian Roosf2efdd82016-04-15 17:43:18 -070068 * @param statusBarAnimationsStartTime the desired start time for all visual animations in the
69 * status bar caused by this app transition in uptime millis
70 * @param statusBarAnimationsDuration the duration for all visual animations in the status
71 * bar caused by this app transition in millis
72 */
Tiger Huang7c610aa2018-10-27 00:01:01 +080073 void appTransitionStarting(int displayId, long statusBarAnimationsStartTime,
74 long statusBarAnimationsDuration);
Adrian Roosf2efdd82016-04-15 17:43:18 -070075
Jorim Jaggi165ce062015-07-06 16:18:11 -070076 void startAssist(Bundle args);
Jorim Jaggi40aa8812015-09-23 12:59:22 -070077 void onCameraLaunchGestureDetected(int source);
Tiger Huang7c610aa2018-10-27 00:01:01 +080078 void topAppWindowChanged(int displayId, boolean menuVisible);
79 void setSystemUiVisibility(int displayId, int vis, int fullscreenStackVis, int dockedStackVis,
Tarandeep Singhe439dec2019-04-22 12:28:43 -070080 int mask, Rect fullscreenBounds, Rect dockedBounds, boolean isNavbarColorManagedByIme,
81 String cause);
Phil Weaver315c34e2016-02-19 15:12:29 -080082 void toggleSplitScreen();
Tiger Huang7c610aa2018-10-27 00:01:01 +080083 void appTransitionFinished(int displayId);
Adrian Roosf2efdd82016-04-15 17:43:18 -070084
85 void toggleRecentApps();
86
87 void setCurrentUser(int newUserId);
Jason Monk361915c2017-03-21 20:33:59 -040088
Selim Cinek3a49ba22017-08-10 11:17:39 -070089 /**
90 * Set whether the top app currently hides the statusbar.
91 *
92 * @param hidesStatusBar whether it is being hidden
93 */
94 void setTopAppHidesStatusBar(boolean hidesStatusBar);
95
Jason Monkb4302182017-08-04 13:39:17 -040096 boolean showShutdownUi(boolean isReboot, String requestString);
97
Mike Digman93f08342017-11-24 21:46:53 -080098 /**
99 * Show a rotation suggestion that a user may approve to rotate the screen.
100 *
101 * @param rotation rotation suggestion
102 */
Mike Digmane0777312018-01-19 12:41:51 -0800103 void onProposedRotationChanged(int rotation, boolean isValid);
Charles Chen3dedec32019-01-24 22:19:37 +0800104
105 /**
106 * Notifies System UI that the display is ready to show system decorations.
107 *
108 * @param displayId display ID
109 */
110 void onDisplayReady(int displayId);
Winson Chung67e49362019-05-17 16:40:38 -0700111
112 /**
113 * Notifies System UI whether the recents animation is running.
114 */
115 void onRecentsAnimationStateChanged(boolean running);
Adam Lesinski182f73f2013-12-05 16:48:06 -0800116}