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.notification; |
| 18 | |
Tony Mak | 7d4b3a5 | 2018-11-27 17:29:36 +0000 | [diff] [blame] | 19 | import android.app.Notification; |
Julia Reynolds | 503ed94 | 2017-10-04 16:04:56 -0400 | [diff] [blame] | 20 | import android.service.notification.NotificationStats; |
| 21 | |
Chris Wren | d1dbc92 | 2015-06-19 17:51:16 -0400 | [diff] [blame] | 22 | import com.android.internal.statusbar.NotificationVisibility; |
| 23 | |
Adam Lesinski | 182f73f | 2013-12-05 16:48:06 -0800 | [diff] [blame] | 24 | public interface NotificationDelegate { |
| 25 | void onSetDisabled(int status); |
John Spurlock | e6a7d93 | 2014-03-13 12:29:00 -0400 | [diff] [blame] | 26 | void onClearAll(int callingUid, int callingPid, int userId); |
Dieter Hsu | d39f0d5 | 2018-04-14 02:08:30 +0800 | [diff] [blame] | 27 | void onNotificationClick(int callingUid, int callingPid, String key, |
| 28 | NotificationVisibility nv); |
| 29 | void onNotificationActionClick(int callingUid, int callingPid, String key, int actionIndex, |
Tony Mak | 7d4b3a5 | 2018-11-27 17:29:36 +0000 | [diff] [blame] | 30 | Notification.Action action, NotificationVisibility nv, boolean generatedByAssistant); |
John Spurlock | e6a7d93 | 2014-03-13 12:29:00 -0400 | [diff] [blame] | 31 | void onNotificationClear(int callingUid, int callingPid, |
Julia Reynolds | 503ed94 | 2017-10-04 16:04:56 -0400 | [diff] [blame] | 32 | String pkg, String tag, int id, int userId, String key, |
Dieter Hsu | d39f0d5 | 2018-04-14 02:08:30 +0800 | [diff] [blame] | 33 | @NotificationStats.DismissalSurface int dismissalSurface, |
Julia Reynolds | fd4099d | 2018-08-21 11:06:06 -0400 | [diff] [blame] | 34 | @NotificationStats.DismissalSentiment int dismissalSentiment, |
Dieter Hsu | d39f0d5 | 2018-04-14 02:08:30 +0800 | [diff] [blame] | 35 | NotificationVisibility nv); |
John Spurlock | e6a7d93 | 2014-03-13 12:29:00 -0400 | [diff] [blame] | 36 | void onNotificationError(int callingUid, int callingPid, |
| 37 | String pkg, String tag, int id, |
Kenny Guy | 3a7c4a5 | 2014-03-03 18:24:03 +0000 | [diff] [blame] | 38 | int uid, int initialPid, String message, int userId); |
Chris Wren | b659c4f | 2015-06-25 17:12:27 -0400 | [diff] [blame] | 39 | void onPanelRevealed(boolean clearEffects, int numItems); |
Christoph Studer | 760ea55 | 2014-03-21 13:10:21 +0100 | [diff] [blame] | 40 | void onPanelHidden(); |
Christoph Studer | 1f32c65 | 2014-11-26 15:32:20 +0100 | [diff] [blame] | 41 | void clearEffects(); |
Christoph Studer | 92b389d | 2014-04-01 18:44:40 +0200 | [diff] [blame] | 42 | void onNotificationVisibilityChanged( |
Chris Wren | d1dbc92 | 2015-06-19 17:51:16 -0400 | [diff] [blame] | 43 | NotificationVisibility[] newlyVisibleKeys, |
| 44 | NotificationVisibility[] noLongerVisibleKeys); |
Chris Wren | 78403d7 | 2014-07-28 10:23:24 +0100 | [diff] [blame] | 45 | void onNotificationExpansionChanged(String key, boolean userAction, boolean expanded); |
Julia Reynolds | 503ed94 | 2017-10-04 16:04:56 -0400 | [diff] [blame] | 46 | void onNotificationDirectReplied(String key); |
| 47 | void onNotificationSettingsViewed(String key); |
Kenny Guy | 2399110 | 2018-04-05 21:18:38 +0100 | [diff] [blame] | 48 | void onNotificationSmartRepliesAdded(String key, int replyCount); |
Tony Mak | 2999670 | 2018-11-26 16:23:34 +0000 | [diff] [blame] | 49 | |
| 50 | /** |
| 51 | * Notifies a smart reply is sent. |
| 52 | * |
| 53 | * @param key the notification key |
| 54 | * @param clickedIndex the index of clicked reply |
| 55 | * @param reply the reply that is sent |
| 56 | * @param generatedByAssistant specifies is the reply generated by NAS |
| 57 | */ |
| 58 | void onNotificationSmartReplySent(String key, int clickedIndex, CharSequence reply, |
| 59 | boolean generatedByAssistant); |
Adam Lesinski | 182f73f | 2013-12-05 16:48:06 -0800 | [diff] [blame] | 60 | } |