• 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 android.service.notification;
18 
19 import android.app.Notification;
20 import android.app.NotificationChannel;
21 import android.app.NotificationChannelGroup;
22 import android.content.pm.ParceledListSlice;
23 import android.os.Bundle;
24 import android.os.UserHandle;
25 import android.service.notification.NotificationStats;
26 import android.service.notification.IStatusBarNotificationHolder;
27 import android.service.notification.StatusBarNotification;
28 import android.service.notification.NotificationRankingUpdate;
29 
30 /** @hide */
31 oneway interface INotificationListener
32 {
33     // listeners and assistant
onListenerConnected(in NotificationRankingUpdate update)34     void onListenerConnected(in NotificationRankingUpdate update);
onNotificationPosted(in IStatusBarNotificationHolder notificationHolder, in NotificationRankingUpdate update)35     void onNotificationPosted(in IStatusBarNotificationHolder notificationHolder,
36             in NotificationRankingUpdate update);
onStatusBarIconsBehaviorChanged(boolean hideSilentStatusIcons)37     void onStatusBarIconsBehaviorChanged(boolean hideSilentStatusIcons);
38     // stats only for assistant
onNotificationRemoved(in IStatusBarNotificationHolder notificationHolder, in NotificationRankingUpdate update, in NotificationStats stats, int reason)39     void onNotificationRemoved(in IStatusBarNotificationHolder notificationHolder,
40             in NotificationRankingUpdate update, in NotificationStats stats, int reason);
onNotificationRankingUpdate(in NotificationRankingUpdate update)41     void onNotificationRankingUpdate(in NotificationRankingUpdate update);
onListenerHintsChanged(int hints)42     void onListenerHintsChanged(int hints);
onInterruptionFilterChanged(int interruptionFilter)43     void onInterruptionFilterChanged(int interruptionFilter);
44 
45     // companion device managers and assistants only
onNotificationChannelModification(String pkgName, in UserHandle user, in NotificationChannel channel, int modificationType)46     void onNotificationChannelModification(String pkgName, in UserHandle user, in NotificationChannel channel, int modificationType);
onNotificationChannelGroupModification(String pkgName, in UserHandle user, in NotificationChannelGroup group, int modificationType)47     void onNotificationChannelGroupModification(String pkgName, in UserHandle user, in NotificationChannelGroup group, int modificationType);
48 
49     // assistants only
onNotificationEnqueuedWithChannel(in IStatusBarNotificationHolder notificationHolder, in NotificationChannel channel, in NotificationRankingUpdate update)50     void onNotificationEnqueuedWithChannel(in IStatusBarNotificationHolder notificationHolder, in NotificationChannel channel, in NotificationRankingUpdate update);
onNotificationSnoozedUntilContext(in IStatusBarNotificationHolder notificationHolder, String snoozeCriterionId)51     void onNotificationSnoozedUntilContext(in IStatusBarNotificationHolder notificationHolder, String snoozeCriterionId);
onNotificationsSeen(in List<String> keys)52     void onNotificationsSeen(in List<String> keys);
onPanelRevealed(int items)53     void onPanelRevealed(int items);
onPanelHidden()54     void onPanelHidden();
onNotificationVisibilityChanged(String key, boolean isVisible)55     void onNotificationVisibilityChanged(String key, boolean isVisible);
onNotificationExpansionChanged(String key, boolean userAction, boolean expanded)56     void onNotificationExpansionChanged(String key, boolean userAction, boolean expanded);
onNotificationDirectReply(String key)57     void onNotificationDirectReply(String key);
onSuggestedReplySent(String key, in CharSequence reply, int source)58     void onSuggestedReplySent(String key, in CharSequence reply, int source);
onActionClicked(String key, in Notification.Action action, int source)59     void onActionClicked(String key, in Notification.Action action, int source);
onNotificationClicked(String key)60     void onNotificationClicked(String key);
61     // @deprecated changing allowed adjustments is no longer supported.
onAllowedAdjustmentsChanged()62     void onAllowedAdjustmentsChanged();
onNotificationFeedbackReceived(String key, in NotificationRankingUpdate update, in Bundle feedback)63     void onNotificationFeedbackReceived(String key, in NotificationRankingUpdate update, in Bundle feedback);
64 }
65