Chris Wren | 54bbef4 | 2014-07-09 18:37:56 -0400 | [diff] [blame] | 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 | |
Julia Reynolds | b5e44b7 | 2016-08-16 15:00:25 -0400 | [diff] [blame] | 18 | import android.app.NotificationChannel; |
Julia Reynolds | 59e152e | 2017-01-25 17:42:53 -0500 | [diff] [blame] | 19 | import android.app.NotificationChannelGroup; |
Julia Reynolds | b5e44b7 | 2016-08-16 15:00:25 -0400 | [diff] [blame] | 20 | import android.content.pm.ParceledListSlice; |
Chris Wren | 89aa226 | 2017-05-05 18:05:56 -0400 | [diff] [blame] | 21 | import android.os.UserHandle; |
Julia Reynolds | b5e44b7 | 2016-08-16 15:00:25 -0400 | [diff] [blame] | 22 | |
Julia Reynolds | f02562a | 2017-01-26 13:33:56 -0500 | [diff] [blame] | 23 | import java.util.Collection; |
| 24 | |
Chris Wren | 54bbef4 | 2014-07-09 18:37:56 -0400 | [diff] [blame] | 25 | public interface RankingConfig { |
Chris Wren | 54bbef4 | 2014-07-09 18:37:56 -0400 | [diff] [blame] | 26 | |
Julia Reynolds | ef37f28 | 2016-02-12 09:11:27 -0500 | [diff] [blame] | 27 | void setImportance(String packageName, int uid, int importance); |
Julia Reynolds | ef37f28 | 2016-02-12 09:11:27 -0500 | [diff] [blame] | 28 | int getImportance(String packageName, int uid); |
Julia Reynolds | 924eed1 | 2017-01-19 09:52:07 -0500 | [diff] [blame] | 29 | void setShowBadge(String packageName, int uid, boolean showBadge); |
| 30 | boolean canShowBadge(String packageName, int uid); |
Chris Wren | 89aa226 | 2017-05-05 18:05:56 -0400 | [diff] [blame] | 31 | boolean badgingEnabled(UserHandle userHandle); |
Julia Reynolds | 005c8b9 | 2017-08-24 10:35:53 -0400 | [diff] [blame] | 32 | boolean isGroupBlocked(String packageName, int uid, String groupId); |
Julia Reynolds | b5e44b7 | 2016-08-16 15:00:25 -0400 | [diff] [blame] | 33 | |
Julia Reynolds | f02562a | 2017-01-26 13:33:56 -0500 | [diff] [blame] | 34 | Collection<NotificationChannelGroup> getNotificationChannelGroups(String pkg, |
| 35 | int uid); |
Julia Reynolds | 59e152e | 2017-01-25 17:42:53 -0500 | [diff] [blame] | 36 | void createNotificationChannelGroup(String pkg, int uid, NotificationChannelGroup group, |
| 37 | boolean fromTargetApp); |
| 38 | ParceledListSlice<NotificationChannelGroup> getNotificationChannelGroups(String pkg, |
Julia Reynolds | 13ed28b | 2018-09-21 15:20:13 -0400 | [diff] [blame] | 39 | int uid, boolean includeDeleted, boolean includeNonGrouped, boolean includeEmpty); |
Julia Reynolds | baff400 | 2016-12-15 11:34:26 -0500 | [diff] [blame] | 40 | void createNotificationChannel(String pkg, int uid, NotificationChannel channel, |
Julia Reynolds | 1fe1094 | 2018-03-28 12:46:51 -0400 | [diff] [blame] | 41 | boolean fromTargetApp, boolean hasDndAccess); |
Julia Reynolds | 8617e4e | 2017-09-18 16:52:37 -0400 | [diff] [blame] | 42 | void updateNotificationChannel(String pkg, int uid, NotificationChannel channel, boolean fromUser); |
Julia Reynolds | 4036e8d | 2017-01-13 09:50:05 -0500 | [diff] [blame] | 43 | NotificationChannel getNotificationChannel(String pkg, int uid, String channelId, boolean includeDeleted); |
Julia Reynolds | b5e44b7 | 2016-08-16 15:00:25 -0400 | [diff] [blame] | 44 | void deleteNotificationChannel(String pkg, int uid, String channelId); |
Julia Reynolds | 4036e8d | 2017-01-13 09:50:05 -0500 | [diff] [blame] | 45 | 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 Wren | 54bbef4 | 2014-07-09 18:37:56 -0400 | [diff] [blame] | 48 | } |