Adam Lesinski | 182f73f | 2013-12-05 16:48:06 -0800 | [diff] [blame] | 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 | |
Jorim Jaggi | 8690558 | 2016-02-09 21:36:09 -0800 | [diff] [blame] | 19 | import android.graphics.Rect; |
Jorim Jaggi | 165ce06 | 2015-07-06 16:18:11 -0700 | [diff] [blame] | 20 | import android.os.Bundle; |
| 21 | |
Adam Lesinski | 182f73f | 2013-12-05 16:48:06 -0800 | [diff] [blame] | 22 | import com.android.server.notification.NotificationDelegate; |
| 23 | |
Adam Lesinski | 182f73f | 2013-12-05 16:48:06 -0800 | [diff] [blame] | 24 | public interface StatusBarManagerInternal { |
| 25 | void setNotificationDelegate(NotificationDelegate delegate); |
Andrii Kulian | 0f051f5 | 2016-04-14 00:41:51 -0700 | [diff] [blame] | 26 | void showScreenPinningRequest(int taskId); |
Adrian Roos | 4f43dc0 | 2015-06-17 16:43:38 -0700 | [diff] [blame] | 27 | void showAssistDisclosure(); |
Adrian Roos | f2efdd8 | 2016-04-15 17:43:18 -0700 | [diff] [blame] | 28 | |
| 29 | void preloadRecentApps(); |
| 30 | |
| 31 | void cancelPreloadRecentApps(); |
| 32 | |
Winson Chung | dff7a73 | 2017-12-11 12:17:06 -0800 | [diff] [blame] | 33 | void showRecentApps(boolean triggeredFromAltTab); |
Adrian Roos | f2efdd8 | 2016-04-15 17:43:18 -0700 | [diff] [blame] | 34 | |
| 35 | void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey); |
| 36 | |
Andrei Stingaceanu | 0bf096f | 2016-04-14 18:11:57 +0100 | [diff] [blame] | 37 | void dismissKeyboardShortcutsMenu(); |
Adrian Roos | f2efdd8 | 2016-04-15 17:43:18 -0700 | [diff] [blame] | 38 | void toggleKeyboardShortcutsMenu(int deviceId); |
| 39 | |
Beverly | ae79ab9 | 2017-12-11 09:20:02 -0500 | [diff] [blame] | 40 | void showChargingAnimation(int batteryLevel); |
| 41 | |
Adrian Roos | f2efdd8 | 2016-04-15 17:43:18 -0700 | [diff] [blame] | 42 | /** |
Winson Chung | ac52f28 | 2017-03-30 14:44:52 -0700 | [diff] [blame] | 43 | * Show picture-in-picture menu. |
Adrian Roos | f2efdd8 | 2016-04-15 17:43:18 -0700 | [diff] [blame] | 44 | */ |
Winson Chung | ac52f28 | 2017-03-30 14:44:52 -0700 | [diff] [blame] | 45 | void showPictureInPictureMenu(); |
Adrian Roos | f2efdd8 | 2016-04-15 17:43:18 -0700 | [diff] [blame] | 46 | |
Tiger Huang | 7c610aa | 2018-10-27 00:01:01 +0800 | [diff] [blame] | 47 | void setWindowState(int displayId, int window, int state); |
Adrian Roos | f2efdd8 | 2016-04-15 17:43:18 -0700 | [diff] [blame] | 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. |
Tiger Huang | 7c610aa | 2018-10-27 00:01:01 +0800 | [diff] [blame] | 52 | * |
| 53 | * @param displayId the ID of the display which has this event. |
Adrian Roos | f2efdd8 | 2016-04-15 17:43:18 -0700 | [diff] [blame] | 54 | */ |
Tiger Huang | 7c610aa | 2018-10-27 00:01:01 +0800 | [diff] [blame] | 55 | void appTransitionPending(int displayId); |
Adrian Roos | f2efdd8 | 2016-04-15 17:43:18 -0700 | [diff] [blame] | 56 | |
| 57 | /** |
| 58 | * Notifies the status bar that a pending app transition has been cancelled. |
Tiger Huang | 7c610aa | 2018-10-27 00:01:01 +0800 | [diff] [blame] | 59 | * |
| 60 | * @param displayId the ID of the display which has this event. |
Adrian Roos | f2efdd8 | 2016-04-15 17:43:18 -0700 | [diff] [blame] | 61 | */ |
Tiger Huang | 7c610aa | 2018-10-27 00:01:01 +0800 | [diff] [blame] | 62 | void appTransitionCancelled(int displayId); |
Adrian Roos | f2efdd8 | 2016-04-15 17:43:18 -0700 | [diff] [blame] | 63 | |
| 64 | /** |
| 65 | * Notifies the status bar that an app transition is now being executed. |
| 66 | * |
Tiger Huang | 7c610aa | 2018-10-27 00:01:01 +0800 | [diff] [blame] | 67 | * @param displayId the ID of the display which has this event. |
Adrian Roos | f2efdd8 | 2016-04-15 17:43:18 -0700 | [diff] [blame] | 68 | * @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 Huang | 7c610aa | 2018-10-27 00:01:01 +0800 | [diff] [blame] | 73 | void appTransitionStarting(int displayId, long statusBarAnimationsStartTime, |
| 74 | long statusBarAnimationsDuration); |
Adrian Roos | f2efdd8 | 2016-04-15 17:43:18 -0700 | [diff] [blame] | 75 | |
Jorim Jaggi | 165ce06 | 2015-07-06 16:18:11 -0700 | [diff] [blame] | 76 | void startAssist(Bundle args); |
Jorim Jaggi | 40aa881 | 2015-09-23 12:59:22 -0700 | [diff] [blame] | 77 | void onCameraLaunchGestureDetected(int source); |
Tiger Huang | 7c610aa | 2018-10-27 00:01:01 +0800 | [diff] [blame] | 78 | void topAppWindowChanged(int displayId, boolean menuVisible); |
| 79 | void setSystemUiVisibility(int displayId, int vis, int fullscreenStackVis, int dockedStackVis, |
Tarandeep Singh | e439dec | 2019-04-22 12:28:43 -0700 | [diff] [blame^] | 80 | int mask, Rect fullscreenBounds, Rect dockedBounds, boolean isNavbarColorManagedByIme, |
| 81 | String cause); |
Phil Weaver | 315c34e | 2016-02-19 15:12:29 -0800 | [diff] [blame] | 82 | void toggleSplitScreen(); |
Tiger Huang | 7c610aa | 2018-10-27 00:01:01 +0800 | [diff] [blame] | 83 | void appTransitionFinished(int displayId); |
Adrian Roos | f2efdd8 | 2016-04-15 17:43:18 -0700 | [diff] [blame] | 84 | |
| 85 | void toggleRecentApps(); |
| 86 | |
| 87 | void setCurrentUser(int newUserId); |
Jason Monk | 361915c | 2017-03-21 20:33:59 -0400 | [diff] [blame] | 88 | |
Selim Cinek | 3a49ba2 | 2017-08-10 11:17:39 -0700 | [diff] [blame] | 89 | /** |
| 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 Monk | b430218 | 2017-08-04 13:39:17 -0400 | [diff] [blame] | 96 | boolean showShutdownUi(boolean isReboot, String requestString); |
| 97 | |
Mike Digman | 93f0834 | 2017-11-24 21:46:53 -0800 | [diff] [blame] | 98 | /** |
| 99 | * Show a rotation suggestion that a user may approve to rotate the screen. |
| 100 | * |
| 101 | * @param rotation rotation suggestion |
| 102 | */ |
Mike Digman | e077731 | 2018-01-19 12:41:51 -0800 | [diff] [blame] | 103 | void onProposedRotationChanged(int rotation, boolean isValid); |
Charles Chen | 3dedec3 | 2019-01-24 22:19:37 +0800 | [diff] [blame] | 104 | |
| 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); |
Adam Lesinski | 182f73f | 2013-12-05 16:48:06 -0800 | [diff] [blame] | 111 | } |