RankingConfig.java revision 1f17e024a1152eda828a0e9924daa30cfac1193d
1/**
2 * Copyright (c) 2014, 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 */
16package com.android.server.notification;
17
18import android.app.NotificationChannel;
19import android.app.NotificationChannelGroup;
20import android.content.pm.ParceledListSlice;
21
22import java.util.Collection;
23
24public interface RankingConfig {
25
26    void setImportance(String packageName, int uid, int importance);
27    int getImportance(String packageName, int uid);
28    void setShowBadge(String packageName, int uid, boolean showBadge);
29    boolean canShowBadge(String packageName, int uid);
30
31    Collection<NotificationChannelGroup> getNotificationChannelGroups(String pkg,
32            int uid);
33    void createNotificationChannelGroup(String pkg, int uid, NotificationChannelGroup group,
34            boolean fromTargetApp);
35    ParceledListSlice<NotificationChannelGroup> getNotificationChannelGroups(String pkg,
36            int uid, boolean includeDeleted);
37    void createNotificationChannel(String pkg, int uid, NotificationChannel channel,
38            boolean fromTargetApp);
39    void updateNotificationChannel(String pkg, int uid, NotificationChannel channel);
40    void updateNotificationChannelFromAssistant(String pkg, int uid, NotificationChannel channel);
41    NotificationChannel getNotificationChannel(String pkg, int uid, String channelId, boolean includeDeleted);
42    void deleteNotificationChannel(String pkg, int uid, String channelId);
43    void permanentlyDeleteNotificationChannel(String pkg, int uid, String channelId);
44    void permanentlyDeleteNotificationChannels(String pkg, int uid);
45    ParceledListSlice<NotificationChannel> getNotificationChannels(String pkg, int uid, boolean includeDeleted);
46}
47