blob: 159d49bc0009d9da3d93678ccbe9de73fb93cf4f [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001/**
2 * Copyright (c) 2007, The Android Open Source Project
3 *
Jorim Jaggi24bec7c2015-02-04 12:40:14 +01004 * 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
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08007 *
Jorim Jaggi24bec7c2015-02-04 12:40:14 +01008 * http://www.apache.org/licenses/LICENSE-2.0
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08009 *
Jorim Jaggi24bec7c2015-02-04 12:40:14 +010010 * 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
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080014 * limitations under the License.
15 */
Dianne Hackborn7d049322011-06-14 15:00:32 -070016
Joe Onorato0cbda992010-05-02 16:28:15 -070017package com.android.internal.statusbar;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080018
Jason Monk7e53f202016-01-28 10:40:20 -050019import android.content.ComponentName;
Jorim Jaggi86905582016-02-09 21:36:09 -080020import android.graphics.Rect;
Jorim Jaggi165ce062015-07-06 16:18:11 -070021import android.os.Bundle;
22import android.service.notification.StatusBarNotification;
Vishwath Mohanecf00ce2018-04-05 10:28:24 -070023import android.hardware.biometrics.IBiometricPromptReceiver;
Jorim Jaggi165ce062015-07-06 16:18:11 -070024
Joe Onorato0cbda992010-05-02 16:28:15 -070025import com.android.internal.statusbar.IStatusBar;
26import com.android.internal.statusbar.StatusBarIcon;
27import com.android.internal.statusbar.StatusBarIconList;
Chris Wrend1dbc922015-06-19 17:51:16 -040028import com.android.internal.statusbar.NotificationVisibility;
Joe Onorato2314aab2010-04-08 16:41:23 -050029
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080030/** @hide */
Joe Onorato25f95f92010-04-08 18:37:10 -050031interface IStatusBarService
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080032{
Daniel Sandler11cf1782012-09-27 14:03:08 -040033 void expandNotificationsPanel();
34 void collapsePanels();
Anthony Chen9ad00e02017-05-12 15:53:36 -070035 void togglePanel();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080036 void disable(int what, IBinder token, String pkg);
Benjamin Franzea2ec972015-03-16 17:18:09 +000037 void disableForUser(int what, IBinder token, String pkg, int userId);
Benjamin Franzcde0a2a2015-04-23 17:19:48 +010038 void disable2(int what, IBinder token, String pkg);
39 void disable2ForUser(int what, IBinder token, String pkg, int userId);
Svetoslav Ganov6179ea32011-06-28 01:12:41 -070040 void setIcon(String slot, String iconPackage, int iconId, int iconLevel, String contentDescription);
Joe Onorato0cbda992010-05-02 16:28:15 -070041 void setIconVisibility(String slot, boolean visible);
42 void removeIcon(String slot);
Jason Monkb605fec2014-05-02 17:04:10 -040043 void setImeWindowStatus(in IBinder token, int vis, int backDisposition,
44 boolean showImeSwitcher);
Jason Monka9927322015-12-13 16:22:37 -050045 void expandSettingsPanel(String subPanel);
Joe Onorato2314aab2010-04-08 16:41:23 -050046
47 // ---- Methods below are for use by the status bar policy services ----
Joe Onorato8bc6c512010-06-04 16:21:12 -040048 // You need the STATUS_BAR_SERVICE permission
Jason Monk07473ce2016-01-05 14:59:19 -050049 void registerStatusBar(IStatusBar callbacks, out List<String> iconSlots,
50 out List<StatusBarIcon> iconList,
Jorim Jaggi86905582016-02-09 21:36:09 -080051 out int[] switches, out List<IBinder> binders, out Rect fullscreenStackBounds,
52 out Rect dockedStackBounds);
Chris Wrenb659c4f2015-06-25 17:12:27 -040053 void onPanelRevealed(boolean clearNotificationEffects, int numItems);
Christoph Studer760ea552014-03-21 13:10:21 +010054 void onPanelHidden();
Christoph Studer1f32c652014-11-26 15:32:20 +010055 // Mark current notifications as "seen" and stop ringing, vibrating, blinking.
56 void clearNotificationEffects();
Dieter Hsud39f0d52018-04-14 02:08:30 +080057 void onNotificationClick(String key, in NotificationVisibility nv);
58 void onNotificationActionClick(String key, int actionIndex, in NotificationVisibility nv);
Dianne Hackborn9d39d0c2010-06-24 15:57:42 -070059 void onNotificationError(String pkg, String tag, int id,
Kenny Guy3a7c4a52014-03-03 18:24:03 +000060 int uid, int initialPid, String message, int userId);
61 void onClearAllNotifications(int userId);
Dieter Hsud39f0d52018-04-14 02:08:30 +080062 void onNotificationClear(String pkg, String tag, int id, int userId, String key,
63 int dismissalSurface, in NotificationVisibility nv);
Chris Wrend1dbc922015-06-19 17:51:16 -040064 void onNotificationVisibilityChanged( in NotificationVisibility[] newlyVisibleKeys,
65 in NotificationVisibility[] noLongerVisibleKeys);
Chris Wren78403d72014-07-28 10:23:24 +010066 void onNotificationExpansionChanged(in String key, in boolean userAction, in boolean expanded);
Julia Reynolds503ed942017-10-04 16:04:56 -040067 void onNotificationDirectReplied(String key);
Kenny Guy23991102018-04-05 21:18:38 +010068 void onNotificationSmartRepliesAdded(in String key, in int replyCount);
69 void onNotificationSmartReplySent(in String key, in int replyIndex);
Julia Reynolds503ed942017-10-04 16:04:56 -040070 void onNotificationSettingsViewed(String key);
Adrian Roos53f28ec2014-10-29 17:26:12 +010071 void setSystemUiVisibility(int vis, int mask, String cause);
Jason Monk7e53f202016-01-28 10:40:20 -050072
Jason Monk361915c2017-03-21 20:33:59 -040073 void onGlobalActionsShown();
74 void onGlobalActionsHidden();
75
76 /**
77 * These methods are needed for global actions control which the UI is shown in sysui.
78 */
79 void shutdown();
80 void reboot(boolean safeMode);
81
Jason Monk7e53f202016-01-28 10:40:20 -050082 void addTile(in ComponentName tile);
83 void remTile(in ComponentName tile);
84 void clickTile(in ComponentName tile);
Philip Quinnc3a503d2017-07-18 23:23:41 -070085 void handleSystemKey(in int key);
Kevin Chynaae4a152018-01-18 11:48:09 -080086
Matthew Ng9c3bce52018-02-01 22:00:31 +000087 /**
88 * Methods to show toast messages for screen pinning
89 */
90 void showPinningEnterExitToast(boolean entering);
91 void showPinningEscapeToast();
92
Kevin Chynaae4a152018-01-18 11:48:09 -080093 // Used to show the dialog when FingerprintService starts authentication
Vishwath Mohanecf00ce2018-04-05 10:28:24 -070094 void showFingerprintDialog(in Bundle bundle, IBiometricPromptReceiver receiver);
Kevin Chynaae4a152018-01-18 11:48:09 -080095 // Used to hide the dialog when a finger is authenticated
96 void onFingerprintAuthenticated();
97 // Used to set a temporary message, e.g. fingerprint not recognized, finger moved too fast, etc
98 void onFingerprintHelp(String message);
99 // Used to set a message - the dialog will dismiss after a certain amount of time
100 void onFingerprintError(String error);
101 // Used to hide the fingerprint dialog when the authenticationclient is stopped
102 void hideFingerprintDialog();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800103}