blob: c2dc554321c219f172178065896350c9bbf14f15 [file] [log] [blame]
Adam Lesinski182f73f2013-12-05 16:48:06 -08001/**
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
17package com.android.server.notification;
18
Tony Mak7d4b3a52018-11-27 17:29:36 +000019import android.app.Notification;
Julia Reynolds503ed942017-10-04 16:04:56 -040020import android.service.notification.NotificationStats;
21
Chris Wrend1dbc922015-06-19 17:51:16 -040022import com.android.internal.statusbar.NotificationVisibility;
23
Adam Lesinski182f73f2013-12-05 16:48:06 -080024public interface NotificationDelegate {
25 void onSetDisabled(int status);
John Spurlocke6a7d932014-03-13 12:29:00 -040026 void onClearAll(int callingUid, int callingPid, int userId);
Dieter Hsud39f0d52018-04-14 02:08:30 +080027 void onNotificationClick(int callingUid, int callingPid, String key,
28 NotificationVisibility nv);
29 void onNotificationActionClick(int callingUid, int callingPid, String key, int actionIndex,
Tony Mak7d4b3a52018-11-27 17:29:36 +000030 Notification.Action action, NotificationVisibility nv, boolean generatedByAssistant);
John Spurlocke6a7d932014-03-13 12:29:00 -040031 void onNotificationClear(int callingUid, int callingPid,
Julia Reynolds503ed942017-10-04 16:04:56 -040032 String pkg, String tag, int id, int userId, String key,
Dieter Hsud39f0d52018-04-14 02:08:30 +080033 @NotificationStats.DismissalSurface int dismissalSurface,
Julia Reynoldsfd4099d2018-08-21 11:06:06 -040034 @NotificationStats.DismissalSentiment int dismissalSentiment,
Dieter Hsud39f0d52018-04-14 02:08:30 +080035 NotificationVisibility nv);
John Spurlocke6a7d932014-03-13 12:29:00 -040036 void onNotificationError(int callingUid, int callingPid,
37 String pkg, String tag, int id,
Kenny Guy3a7c4a52014-03-03 18:24:03 +000038 int uid, int initialPid, String message, int userId);
Chris Wrenb659c4f2015-06-25 17:12:27 -040039 void onPanelRevealed(boolean clearEffects, int numItems);
Christoph Studer760ea552014-03-21 13:10:21 +010040 void onPanelHidden();
Christoph Studer1f32c652014-11-26 15:32:20 +010041 void clearEffects();
Christoph Studer92b389d2014-04-01 18:44:40 +020042 void onNotificationVisibilityChanged(
Chris Wrend1dbc922015-06-19 17:51:16 -040043 NotificationVisibility[] newlyVisibleKeys,
44 NotificationVisibility[] noLongerVisibleKeys);
Gustav Senntona8e38aa2019-01-22 14:55:39 +000045 void onNotificationExpansionChanged(String key, boolean userAction, boolean expanded,
46 int notificationLocation);
Julia Reynolds503ed942017-10-04 16:04:56 -040047 void onNotificationDirectReplied(String key);
48 void onNotificationSettingsViewed(String key);
Gustav Senntond25a64d2018-12-07 10:58:39 +000049
50 /**
51 * Notifies that smart replies and actions have been added to the UI.
52 */
53 void onNotificationSmartSuggestionsAdded(String key, int smartReplyCount, int smartActionCount,
54 boolean generatedByAssistant);
Tony Mak29996702018-11-26 16:23:34 +000055
56 /**
57 * Notifies a smart reply is sent.
58 *
59 * @param key the notification key
60 * @param clickedIndex the index of clicked reply
61 * @param reply the reply that is sent
62 * @param generatedByAssistant specifies is the reply generated by NAS
63 */
64 void onNotificationSmartReplySent(String key, int clickedIndex, CharSequence reply,
65 boolean generatedByAssistant);
Adam Lesinski182f73f2013-12-05 16:48:06 -080066}