• 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.annotation.Nullable;
20 import android.app.ITransientNotificationCallback;
21 import android.hardware.fingerprint.IUdfpsHbmListener;
22 import android.os.Bundle;
23 import android.os.IBinder;
24 import android.view.InsetsState.InternalInsetsType;
25 import android.view.InsetsVisibilities;
26 import android.view.WindowInsetsController.Appearance;
27 import android.view.WindowInsetsController.Behavior;
28 
29 import com.android.internal.statusbar.LetterboxDetails;
30 import com.android.internal.view.AppearanceRegion;
31 import com.android.server.notification.NotificationDelegate;
32 
33 public interface StatusBarManagerInternal {
setNotificationDelegate(NotificationDelegate delegate)34     void setNotificationDelegate(NotificationDelegate delegate);
showScreenPinningRequest(int taskId)35     void showScreenPinningRequest(int taskId);
showAssistDisclosure()36     void showAssistDisclosure();
37 
preloadRecentApps()38     void preloadRecentApps();
39 
cancelPreloadRecentApps()40     void cancelPreloadRecentApps();
41 
showRecentApps(boolean triggeredFromAltTab)42     void showRecentApps(boolean triggeredFromAltTab);
43 
hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey)44     void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey);
45 
46     /** Collapses the notification shade. */
collapsePanels()47     void collapsePanels();
48 
dismissKeyboardShortcutsMenu()49     void dismissKeyboardShortcutsMenu();
toggleKeyboardShortcutsMenu(int deviceId)50     void toggleKeyboardShortcutsMenu(int deviceId);
51 
showChargingAnimation(int batteryLevel)52     void showChargingAnimation(int batteryLevel);
53 
54     /**
55      * Show picture-in-picture menu.
56      */
showPictureInPictureMenu()57     void showPictureInPictureMenu();
58 
setWindowState(int displayId, int window, int state)59     void setWindowState(int displayId, int window, int state);
60 
61     /**
62      * Notifies the status bar that an app transition is pending to delay applying some flags with
63      * visual impact until {@link #appTransitionReady} is called.
64      *
65      * @param displayId the ID of the display which has this event.
66      */
appTransitionPending(int displayId)67     void appTransitionPending(int displayId);
68 
69     /**
70      * Notifies the status bar that a pending app transition has been cancelled.
71      *
72      * @param displayId the ID of the display which has this event.
73      */
appTransitionCancelled(int displayId)74     void appTransitionCancelled(int displayId);
75 
76     /**
77      * Notifies the status bar that an app transition is now being executed.
78      *
79      * @param displayId the ID of the display which has this event.
80      * @param statusBarAnimationsStartTime the desired start time for all visual animations in the
81      *        status bar caused by this app transition in uptime millis
82      * @param statusBarAnimationsDuration the duration for all visual animations in the status
83      *        bar caused by this app transition in millis
84      */
appTransitionStarting(int displayId, long statusBarAnimationsStartTime, long statusBarAnimationsDuration)85     void appTransitionStarting(int displayId, long statusBarAnimationsStartTime,
86             long statusBarAnimationsDuration);
87 
startAssist(Bundle args)88     void startAssist(Bundle args);
onCameraLaunchGestureDetected(int source)89     void onCameraLaunchGestureDetected(int source);
setDisableFlags(int displayId, int flags, String cause)90     void setDisableFlags(int displayId, int flags, String cause);
toggleSplitScreen()91     void toggleSplitScreen();
appTransitionFinished(int displayId)92     void appTransitionFinished(int displayId);
93 
94     /**
95      * Notifies the status bar that a Emergency Action launch gesture has been detected.
96      *
97      * TODO (b/169175022) Update method name and docs when feature name is locked.
98      */
onEmergencyActionLaunchGestureDetected()99     void onEmergencyActionLaunchGestureDetected();
100 
toggleRecentApps()101     void toggleRecentApps();
102 
setCurrentUser(int newUserId)103     void setCurrentUser(int newUserId);
104 
105     /**
106      * Set whether the top app currently hides the statusbar.
107      *
108      * @param hidesStatusBar whether it is being hidden
109      */
setTopAppHidesStatusBar(boolean hidesStatusBar)110     void setTopAppHidesStatusBar(boolean hidesStatusBar);
111 
showShutdownUi(boolean isReboot, String requestString)112     boolean showShutdownUi(boolean isReboot, String requestString);
113 
114     /**
115      * Show a rotation suggestion that a user may approve to rotate the screen.
116      *
117      * @param rotation rotation suggestion
118      */
onProposedRotationChanged(int rotation, boolean isValid)119     void onProposedRotationChanged(int rotation, boolean isValid);
120 
121     /**
122      * Notifies System UI that the display is ready to show system decorations.
123      *
124      * @param displayId display ID
125      */
onDisplayReady(int displayId)126     void onDisplayReady(int displayId);
127 
128     /**
129      * Notifies System UI whether the recents animation is running.
130      */
onRecentsAnimationStateChanged(boolean running)131     void onRecentsAnimationStateChanged(boolean running);
132 
133     /** @see com.android.internal.statusbar.IStatusBar#onSystemBarAttributesChanged */
onSystemBarAttributesChanged(int displayId, @Appearance int appearance, AppearanceRegion[] appearanceRegions, boolean navbarColorManagedByIme, @Behavior int behavior, InsetsVisibilities requestedVisibilities, String packageName, LetterboxDetails[] letterboxDetails)134     void onSystemBarAttributesChanged(int displayId, @Appearance int appearance,
135             AppearanceRegion[] appearanceRegions, boolean navbarColorManagedByIme,
136             @Behavior int behavior, InsetsVisibilities requestedVisibilities, String packageName,
137             LetterboxDetails[] letterboxDetails);
138 
139     /** @see com.android.internal.statusbar.IStatusBar#showTransient */
showTransient(int displayId, @InternalInsetsType int[] types, boolean isGestureOnSystemBar)140     void showTransient(int displayId, @InternalInsetsType int[] types,
141             boolean isGestureOnSystemBar);
142 
143     /** @see com.android.internal.statusbar.IStatusBar#abortTransient */
abortTransient(int displayId, @InternalInsetsType int[] types)144     void abortTransient(int displayId, @InternalInsetsType int[] types);
145 
146     /**
147      * @see com.android.internal.statusbar.IStatusBar#showToast(String, IBinder, CharSequence,
148      * IBinder, int, ITransientNotificationCallback, int)
149      */
showToast(int uid, String packageName, IBinder token, CharSequence text, IBinder windowToken, int duration, @Nullable ITransientNotificationCallback textCallback, int displayId)150     void showToast(int uid, String packageName, IBinder token, CharSequence text,
151             IBinder windowToken, int duration,
152             @Nullable ITransientNotificationCallback textCallback, int displayId);
153 
154     /** @see com.android.internal.statusbar.IStatusBar#hideToast(String, IBinder)  */
hideToast(String packageName, IBinder token)155     void hideToast(String packageName, IBinder token);
156 
157     /**
158      * @see com.android.internal.statusbar.IStatusBar#requestWindowMagnificationConnection(boolean
159      * request)
160      */
requestWindowMagnificationConnection(boolean request)161     boolean requestWindowMagnificationConnection(boolean request);
162 
163     /**
164      * @see com.android.internal.statusbar.IStatusBar#setNavigationBarLumaSamplingEnabled(int,
165      * boolean)
166      */
setNavigationBarLumaSamplingEnabled(int displayId, boolean enable)167     void setNavigationBarLumaSamplingEnabled(int displayId, boolean enable);
168 
169     /**
170      * Sets the system-wide listener for UDFPS HBM status changes.
171      *
172      * @see com.android.internal.statusbar.IStatusBar#setUdfpsHbmListener(IUdfpsHbmListener)
173      */
setUdfpsHbmListener(IUdfpsHbmListener listener)174     void setUdfpsHbmListener(IUdfpsHbmListener listener);
175 
176     /**
177      * Shows the rear display educational dialog
178      *
179      * @see com.android.internal.statusbar.IStatusBar#showRearDisplayDialog
180      */
showRearDisplayDialog(int currentBaseState)181     void showRearDisplayDialog(int currentBaseState);
182 
183     /**
184      * Called when requested to go to fullscreen from the active split app.
185      */
goToFullscreenFromSplit()186     void goToFullscreenFromSplit();
187 
188     /**
189      * Enters stage split from a current running app.
190      *
191      * @see com.android.internal.statusbar.IStatusBar#enterStageSplitFromRunningApp
192      */
enterStageSplitFromRunningApp(boolean leftOrTop)193     void enterStageSplitFromRunningApp(boolean leftOrTop);
194 
195     /**
196      * Shows the media output switcher dialog.
197      *
198      * @param packageName of the session for which the output switcher is shown.
199      * @see com.android.internal.statusbar.IStatusBar#showMediaOutputSwitcher
200      */
showMediaOutputSwitcher(String packageName)201     void showMediaOutputSwitcher(String packageName);
202 }
203