The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /** |
| 2 | * Copyright (c) 2007, The Android Open Source Project |
| 3 | * |
Jorim Jaggi | 24bec7c | 2015-02-04 12:40:14 +0100 | [diff] [blame] | 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 |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 7 | * |
Jorim Jaggi | 24bec7c | 2015-02-04 12:40:14 +0100 | [diff] [blame] | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 9 | * |
Jorim Jaggi | 24bec7c | 2015-02-04 12:40:14 +0100 | [diff] [blame] | 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 |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 14 | * limitations under the License. |
| 15 | */ |
Dianne Hackborn | 7d04932 | 2011-06-14 15:00:32 -0700 | [diff] [blame] | 16 | |
Joe Onorato | 0cbda99 | 2010-05-02 16:28:15 -0700 | [diff] [blame] | 17 | package com.android.internal.statusbar; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 18 | |
Jason Monk | 7e53f20 | 2016-01-28 10:40:20 -0500 | [diff] [blame] | 19 | import android.content.ComponentName; |
Jorim Jaggi | 8690558 | 2016-02-09 21:36:09 -0800 | [diff] [blame] | 20 | import android.graphics.Rect; |
Jorim Jaggi | 165ce06 | 2015-07-06 16:18:11 -0700 | [diff] [blame] | 21 | import android.os.Bundle; |
| 22 | import android.service.notification.StatusBarNotification; |
Vishwath Mohan | ecf00ce | 2018-04-05 10:28:24 -0700 | [diff] [blame] | 23 | import android.hardware.biometrics.IBiometricPromptReceiver; |
Jorim Jaggi | 165ce06 | 2015-07-06 16:18:11 -0700 | [diff] [blame] | 24 | |
Joe Onorato | 0cbda99 | 2010-05-02 16:28:15 -0700 | [diff] [blame] | 25 | import com.android.internal.statusbar.IStatusBar; |
| 26 | import com.android.internal.statusbar.StatusBarIcon; |
| 27 | import com.android.internal.statusbar.StatusBarIconList; |
Chris Wren | d1dbc92 | 2015-06-19 17:51:16 -0400 | [diff] [blame] | 28 | import com.android.internal.statusbar.NotificationVisibility; |
Joe Onorato | 2314aab | 2010-04-08 16:41:23 -0500 | [diff] [blame] | 29 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 30 | /** @hide */ |
Joe Onorato | 25f95f9 | 2010-04-08 18:37:10 -0500 | [diff] [blame] | 31 | interface IStatusBarService |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 32 | { |
Daniel Sandler | 11cf178 | 2012-09-27 14:03:08 -0400 | [diff] [blame] | 33 | void expandNotificationsPanel(); |
| 34 | void collapsePanels(); |
Anthony Chen | 9ad00e0 | 2017-05-12 15:53:36 -0700 | [diff] [blame] | 35 | void togglePanel(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 36 | void disable(int what, IBinder token, String pkg); |
Benjamin Franz | ea2ec97 | 2015-03-16 17:18:09 +0000 | [diff] [blame] | 37 | void disableForUser(int what, IBinder token, String pkg, int userId); |
Benjamin Franz | cde0a2a | 2015-04-23 17:19:48 +0100 | [diff] [blame] | 38 | void disable2(int what, IBinder token, String pkg); |
| 39 | void disable2ForUser(int what, IBinder token, String pkg, int userId); |
Svetoslav Ganov | 6179ea3 | 2011-06-28 01:12:41 -0700 | [diff] [blame] | 40 | void setIcon(String slot, String iconPackage, int iconId, int iconLevel, String contentDescription); |
Joe Onorato | 0cbda99 | 2010-05-02 16:28:15 -0700 | [diff] [blame] | 41 | void setIconVisibility(String slot, boolean visible); |
| 42 | void removeIcon(String slot); |
Jason Monk | b605fec | 2014-05-02 17:04:10 -0400 | [diff] [blame] | 43 | void setImeWindowStatus(in IBinder token, int vis, int backDisposition, |
| 44 | boolean showImeSwitcher); |
Jason Monk | a992732 | 2015-12-13 16:22:37 -0500 | [diff] [blame] | 45 | void expandSettingsPanel(String subPanel); |
Joe Onorato | 2314aab | 2010-04-08 16:41:23 -0500 | [diff] [blame] | 46 | |
| 47 | // ---- Methods below are for use by the status bar policy services ---- |
Joe Onorato | 8bc6c51 | 2010-06-04 16:21:12 -0400 | [diff] [blame] | 48 | // You need the STATUS_BAR_SERVICE permission |
Jason Monk | 07473ce | 2016-01-05 14:59:19 -0500 | [diff] [blame] | 49 | void registerStatusBar(IStatusBar callbacks, out List<String> iconSlots, |
| 50 | out List<StatusBarIcon> iconList, |
Jorim Jaggi | 8690558 | 2016-02-09 21:36:09 -0800 | [diff] [blame] | 51 | out int[] switches, out List<IBinder> binders, out Rect fullscreenStackBounds, |
| 52 | out Rect dockedStackBounds); |
Chris Wren | b659c4f | 2015-06-25 17:12:27 -0400 | [diff] [blame] | 53 | void onPanelRevealed(boolean clearNotificationEffects, int numItems); |
Christoph Studer | 760ea55 | 2014-03-21 13:10:21 +0100 | [diff] [blame] | 54 | void onPanelHidden(); |
Christoph Studer | 1f32c65 | 2014-11-26 15:32:20 +0100 | [diff] [blame] | 55 | // Mark current notifications as "seen" and stop ringing, vibrating, blinking. |
| 56 | void clearNotificationEffects(); |
Dieter Hsu | d39f0d5 | 2018-04-14 02:08:30 +0800 | [diff] [blame] | 57 | void onNotificationClick(String key, in NotificationVisibility nv); |
| 58 | void onNotificationActionClick(String key, int actionIndex, in NotificationVisibility nv); |
Dianne Hackborn | 9d39d0c | 2010-06-24 15:57:42 -0700 | [diff] [blame] | 59 | void onNotificationError(String pkg, String tag, int id, |
Kenny Guy | 3a7c4a5 | 2014-03-03 18:24:03 +0000 | [diff] [blame] | 60 | int uid, int initialPid, String message, int userId); |
| 61 | void onClearAllNotifications(int userId); |
Dieter Hsu | d39f0d5 | 2018-04-14 02:08:30 +0800 | [diff] [blame] | 62 | void onNotificationClear(String pkg, String tag, int id, int userId, String key, |
| 63 | int dismissalSurface, in NotificationVisibility nv); |
Chris Wren | d1dbc92 | 2015-06-19 17:51:16 -0400 | [diff] [blame] | 64 | void onNotificationVisibilityChanged( in NotificationVisibility[] newlyVisibleKeys, |
| 65 | in NotificationVisibility[] noLongerVisibleKeys); |
Chris Wren | 78403d7 | 2014-07-28 10:23:24 +0100 | [diff] [blame] | 66 | void onNotificationExpansionChanged(in String key, in boolean userAction, in boolean expanded); |
Julia Reynolds | 503ed94 | 2017-10-04 16:04:56 -0400 | [diff] [blame] | 67 | void onNotificationDirectReplied(String key); |
Kenny Guy | 2399110 | 2018-04-05 21:18:38 +0100 | [diff] [blame] | 68 | void onNotificationSmartRepliesAdded(in String key, in int replyCount); |
| 69 | void onNotificationSmartReplySent(in String key, in int replyIndex); |
Julia Reynolds | 503ed94 | 2017-10-04 16:04:56 -0400 | [diff] [blame] | 70 | void onNotificationSettingsViewed(String key); |
Adrian Roos | 53f28ec | 2014-10-29 17:26:12 +0100 | [diff] [blame] | 71 | void setSystemUiVisibility(int vis, int mask, String cause); |
Jason Monk | 7e53f20 | 2016-01-28 10:40:20 -0500 | [diff] [blame] | 72 | |
Jason Monk | 361915c | 2017-03-21 20:33:59 -0400 | [diff] [blame] | 73 | 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 Monk | 7e53f20 | 2016-01-28 10:40:20 -0500 | [diff] [blame] | 82 | void addTile(in ComponentName tile); |
| 83 | void remTile(in ComponentName tile); |
| 84 | void clickTile(in ComponentName tile); |
Philip Quinn | c3a503d | 2017-07-18 23:23:41 -0700 | [diff] [blame] | 85 | void handleSystemKey(in int key); |
Kevin Chyn | aae4a15 | 2018-01-18 11:48:09 -0800 | [diff] [blame] | 86 | |
Matthew Ng | 9c3bce5 | 2018-02-01 22:00:31 +0000 | [diff] [blame] | 87 | /** |
| 88 | * Methods to show toast messages for screen pinning |
| 89 | */ |
| 90 | void showPinningEnterExitToast(boolean entering); |
| 91 | void showPinningEscapeToast(); |
| 92 | |
Kevin Chyn | aae4a15 | 2018-01-18 11:48:09 -0800 | [diff] [blame] | 93 | // Used to show the dialog when FingerprintService starts authentication |
Vishwath Mohan | ecf00ce | 2018-04-05 10:28:24 -0700 | [diff] [blame] | 94 | void showFingerprintDialog(in Bundle bundle, IBiometricPromptReceiver receiver); |
Kevin Chyn | aae4a15 | 2018-01-18 11:48:09 -0800 | [diff] [blame] | 95 | // 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 Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 103 | } |