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