blob: 5de00e43a05d50e6bf23867bc1443e02b4559cbc [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 Reynolds4509ce72019-01-31 13:12:43 -050032 boolean areBubblesAllowed(String packageName, int uid);
33 boolean bubblesEnabled(UserHandle userHandle);
Julia Reynolds005c8b92017-08-24 10:35:53 -040034 boolean isGroupBlocked(String packageName, int uid, String groupId);
Julia Reynoldsb5e44b72016-08-16 15:00:25 -040035
Julia Reynoldsf02562a2017-01-26 13:33:56 -050036 Collection<NotificationChannelGroup> getNotificationChannelGroups(String pkg,
37 int uid);
Julia Reynolds59e152e2017-01-25 17:42:53 -050038 void createNotificationChannelGroup(String pkg, int uid, NotificationChannelGroup group,
39 boolean fromTargetApp);
40 ParceledListSlice<NotificationChannelGroup> getNotificationChannelGroups(String pkg,
Julia Reynolds13ed28b2018-09-21 15:20:13 -040041 int uid, boolean includeDeleted, boolean includeNonGrouped, boolean includeEmpty);
Julia Reynoldsdafd3a42019-05-24 13:33:28 -040042 boolean createNotificationChannel(String pkg, int uid, NotificationChannel channel,
Julia Reynolds1fe10942018-03-28 12:46:51 -040043 boolean fromTargetApp, boolean hasDndAccess);
Julia Reynolds8617e4e2017-09-18 16:52:37 -040044 void updateNotificationChannel(String pkg, int uid, NotificationChannel channel, boolean fromUser);
Julia Reynolds4036e8d2017-01-13 09:50:05 -050045 NotificationChannel getNotificationChannel(String pkg, int uid, String channelId, boolean includeDeleted);
Julia Reynoldsb5e44b72016-08-16 15:00:25 -040046 void deleteNotificationChannel(String pkg, int uid, String channelId);
Julia Reynolds4036e8d2017-01-13 09:50:05 -050047 void permanentlyDeleteNotificationChannel(String pkg, int uid, String channelId);
48 void permanentlyDeleteNotificationChannels(String pkg, int uid);
49 ParceledListSlice<NotificationChannel> getNotificationChannels(String pkg, int uid, boolean includeDeleted);
Chris Wren54bbef42014-07-09 18:37:56 -040050}