blob: b1b0bf26d9ee881694eb90c0301a0fd7d414e4ec [file] [log] [blame]
Chris Wren54bbef42014-07-09 18:37:56 -04001/**
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
Julia Reynoldsb5e44b72016-08-16 15:00:25 -040018import android.app.NotificationChannel;
Julia Reynolds59e152e2017-01-25 17:42:53 -050019import android.app.NotificationChannelGroup;
Julia Reynoldsb5e44b72016-08-16 15:00:25 -040020import android.content.pm.ParceledListSlice;
Chris Wren89aa2262017-05-05 18:05:56 -040021import android.os.UserHandle;
Julia Reynoldsb5e44b72016-08-16 15:00:25 -040022
Julia Reynoldsf02562a2017-01-26 13:33:56 -050023import java.util.Collection;
24
Chris Wren54bbef42014-07-09 18:37:56 -040025public interface RankingConfig {
Chris Wren54bbef42014-07-09 18:37:56 -040026
Julia Reynoldsef37f282016-02-12 09:11:27 -050027 void setImportance(String packageName, int uid, int importance);
Julia Reynoldsef37f282016-02-12 09:11:27 -050028 int getImportance(String packageName, int uid);
Julia Reynolds924eed12017-01-19 09:52:07 -050029 void setShowBadge(String packageName, int uid, boolean showBadge);
30 boolean canShowBadge(String packageName, int uid);
Chris Wren89aa2262017-05-05 18:05:56 -040031 boolean badgingEnabled(UserHandle userHandle);
Julia Reynolds005c8b92017-08-24 10:35:53 -040032 boolean isGroupBlocked(String packageName, int uid, String groupId);
Julia Reynoldsb5e44b72016-08-16 15:00:25 -040033
Julia Reynoldsf02562a2017-01-26 13:33:56 -050034 Collection<NotificationChannelGroup> getNotificationChannelGroups(String pkg,
35 int uid);
Julia Reynolds59e152e2017-01-25 17:42:53 -050036 void createNotificationChannelGroup(String pkg, int uid, NotificationChannelGroup group,
37 boolean fromTargetApp);
38 ParceledListSlice<NotificationChannelGroup> getNotificationChannelGroups(String pkg,
Julia Reynolds3eb3ffd2017-11-16 10:11:32 -050039 int uid, boolean includeDeleted, boolean includeNonGrouped);
Julia Reynoldsbaff4002016-12-15 11:34:26 -050040 void createNotificationChannel(String pkg, int uid, NotificationChannel channel,
41 boolean fromTargetApp);
Julia Reynolds8617e4e2017-09-18 16:52:37 -040042 void updateNotificationChannel(String pkg, int uid, NotificationChannel channel, boolean fromUser);
Julia Reynolds4036e8d2017-01-13 09:50:05 -050043 NotificationChannel getNotificationChannel(String pkg, int uid, String channelId, boolean includeDeleted);
Julia Reynoldsb5e44b72016-08-16 15:00:25 -040044 void deleteNotificationChannel(String pkg, int uid, String channelId);
Julia Reynolds4036e8d2017-01-13 09:50:05 -050045 void permanentlyDeleteNotificationChannel(String pkg, int uid, String channelId);
46 void permanentlyDeleteNotificationChannels(String pkg, int uid);
47 ParceledListSlice<NotificationChannel> getNotificationChannels(String pkg, int uid, boolean includeDeleted);
Chris Wren54bbef42014-07-09 18:37:56 -040048}