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