blob: d88dccb9afeb2e66f48a17bdcb95c8afd77cf129 [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
Bernardo Rufinoab338ac2019-12-20 18:35:30 +000019import android.annotation.Nullable;
20import android.app.ITransientNotificationCallback;
Jorim Jaggi165ce062015-07-06 16:18:11 -070021import android.os.Bundle;
Bernardo Rufinoab338ac2019-12-20 18:35:30 +000022import android.os.IBinder;
Tiger Huang332793b2019-10-29 23:21:27 +080023import android.view.InsetsState.InternalInsetsType;
Jorim Jaggi956ca412019-01-07 14:49:14 +010024import android.view.WindowInsetsController.Appearance;
Jorim Jaggi165ce062015-07-06 16:18:11 -070025
Jorim Jaggi956ca412019-01-07 14:49:14 +010026import com.android.internal.view.AppearanceRegion;
Adam Lesinski182f73f2013-12-05 16:48:06 -080027import com.android.server.notification.NotificationDelegate;
28
Adam Lesinski182f73f2013-12-05 16:48:06 -080029public interface StatusBarManagerInternal {
30 void setNotificationDelegate(NotificationDelegate delegate);
Andrii Kulian0f051f52016-04-14 00:41:51 -070031 void showScreenPinningRequest(int taskId);
Adrian Roos4f43dc02015-06-17 16:43:38 -070032 void showAssistDisclosure();
Adrian Roosf2efdd82016-04-15 17:43:18 -070033
34 void preloadRecentApps();
35
36 void cancelPreloadRecentApps();
37
Winson Chungdff7a732017-12-11 12:17:06 -080038 void showRecentApps(boolean triggeredFromAltTab);
Adrian Roosf2efdd82016-04-15 17:43:18 -070039
40 void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey);
41
Andrei Stingaceanu0bf096f2016-04-14 18:11:57 +010042 void dismissKeyboardShortcutsMenu();
Adrian Roosf2efdd82016-04-15 17:43:18 -070043 void toggleKeyboardShortcutsMenu(int deviceId);
44
Beverlyae79ab92017-12-11 09:20:02 -050045 void showChargingAnimation(int batteryLevel);
46
Adrian Roosf2efdd82016-04-15 17:43:18 -070047 /**
Winson Chungac52f282017-03-30 14:44:52 -070048 * Show picture-in-picture menu.
Adrian Roosf2efdd82016-04-15 17:43:18 -070049 */
Winson Chungac52f282017-03-30 14:44:52 -070050 void showPictureInPictureMenu();
Adrian Roosf2efdd82016-04-15 17:43:18 -070051
Tiger Huang7c610aa2018-10-27 00:01:01 +080052 void setWindowState(int displayId, int window, int state);
Adrian Roosf2efdd82016-04-15 17:43:18 -070053
54 /**
55 * Notifies the status bar that an app transition is pending to delay applying some flags with
56 * visual impact until {@link #appTransitionReady} is called.
Tiger Huang7c610aa2018-10-27 00:01:01 +080057 *
58 * @param displayId the ID of the display which has this event.
Adrian Roosf2efdd82016-04-15 17:43:18 -070059 */
Tiger Huang7c610aa2018-10-27 00:01:01 +080060 void appTransitionPending(int displayId);
Adrian Roosf2efdd82016-04-15 17:43:18 -070061
62 /**
63 * Notifies the status bar that a pending app transition has been cancelled.
Tiger Huang7c610aa2018-10-27 00:01:01 +080064 *
65 * @param displayId the ID of the display which has this event.
Adrian Roosf2efdd82016-04-15 17:43:18 -070066 */
Tiger Huang7c610aa2018-10-27 00:01:01 +080067 void appTransitionCancelled(int displayId);
Adrian Roosf2efdd82016-04-15 17:43:18 -070068
69 /**
70 * Notifies the status bar that an app transition is now being executed.
71 *
Tiger Huang7c610aa2018-10-27 00:01:01 +080072 * @param displayId the ID of the display which has this event.
Adrian Roosf2efdd82016-04-15 17:43:18 -070073 * @param statusBarAnimationsStartTime the desired start time for all visual animations in the
74 * status bar caused by this app transition in uptime millis
75 * @param statusBarAnimationsDuration the duration for all visual animations in the status
76 * bar caused by this app transition in millis
77 */
Tiger Huang7c610aa2018-10-27 00:01:01 +080078 void appTransitionStarting(int displayId, long statusBarAnimationsStartTime,
79 long statusBarAnimationsDuration);
Adrian Roosf2efdd82016-04-15 17:43:18 -070080
Jorim Jaggi165ce062015-07-06 16:18:11 -070081 void startAssist(Bundle args);
Jorim Jaggi40aa8812015-09-23 12:59:22 -070082 void onCameraLaunchGestureDetected(int source);
Jorim Jaggi956ca412019-01-07 14:49:14 +010083 void topAppWindowChanged(int displayId, boolean isFullscreen, boolean isImmersive);
Tiger Huang0dbd5372019-10-26 00:24:22 +080084 void setDisableFlags(int displayId, int flags, String cause);
Phil Weaver315c34e2016-02-19 15:12:29 -080085 void toggleSplitScreen();
Tiger Huang7c610aa2018-10-27 00:01:01 +080086 void appTransitionFinished(int displayId);
Adrian Roosf2efdd82016-04-15 17:43:18 -070087
88 void toggleRecentApps();
89
90 void setCurrentUser(int newUserId);
Jason Monk361915c2017-03-21 20:33:59 -040091
Selim Cinek3a49ba22017-08-10 11:17:39 -070092 /**
93 * Set whether the top app currently hides the statusbar.
94 *
95 * @param hidesStatusBar whether it is being hidden
96 */
97 void setTopAppHidesStatusBar(boolean hidesStatusBar);
98
Jason Monkb4302182017-08-04 13:39:17 -040099 boolean showShutdownUi(boolean isReboot, String requestString);
100
Mike Digman93f08342017-11-24 21:46:53 -0800101 /**
102 * Show a rotation suggestion that a user may approve to rotate the screen.
103 *
104 * @param rotation rotation suggestion
105 */
Mike Digmane0777312018-01-19 12:41:51 -0800106 void onProposedRotationChanged(int rotation, boolean isValid);
Charles Chen3dedec32019-01-24 22:19:37 +0800107
108 /**
109 * Notifies System UI that the display is ready to show system decorations.
110 *
111 * @param displayId display ID
112 */
113 void onDisplayReady(int displayId);
Winson Chung67e49362019-05-17 16:40:38 -0700114
115 /**
116 * Notifies System UI whether the recents animation is running.
117 */
118 void onRecentsAnimationStateChanged(boolean running);
Jorim Jaggi956ca412019-01-07 14:49:14 +0100119
120 /** @see com.android.internal.statusbar.IStatusBar#onSystemBarAppearanceChanged */
121 void onSystemBarAppearanceChanged(int displayId, @Appearance int appearance,
122 AppearanceRegion[] appearanceRegions, boolean navbarColorManagedByIme);
123
124 /** @see com.android.internal.statusbar.IStatusBar#showTransient */
Tiger Huang332793b2019-10-29 23:21:27 +0800125 void showTransient(int displayId, @InternalInsetsType int[] types);
Jorim Jaggi956ca412019-01-07 14:49:14 +0100126
127 /** @see com.android.internal.statusbar.IStatusBar#abortTransient */
Tiger Huang332793b2019-10-29 23:21:27 +0800128 void abortTransient(int displayId, @InternalInsetsType int[] types);
Bernardo Rufinoab338ac2019-12-20 18:35:30 +0000129
130 /**
131 * @see com.android.internal.statusbar.IStatusBar#showToast(String, IBinder, CharSequence,
132 * IBinder, int, ITransientNotificationCallback)
133 */
134 void showToast(String packageName, IBinder token, CharSequence text,
135 IBinder windowToken, int duration,
136 @Nullable ITransientNotificationCallback textCallback);
137
138 /** @see com.android.internal.statusbar.IStatusBar#hideToast(String, IBinder) */
139 void hideToast(String packageName, IBinder token);
Adam Lesinski182f73f2013-12-05 16:48:06 -0800140}