RankingConfig.java revision 89aa2261903fd09b08a2210a7a1b35d329f8330a
154bbef435ed857fc68941672799fc8001c101119Chris Wren/**
254bbef435ed857fc68941672799fc8001c101119Chris Wren * Copyright (c) 2014, The Android Open Source Project
354bbef435ed857fc68941672799fc8001c101119Chris Wren *
454bbef435ed857fc68941672799fc8001c101119Chris Wren * Licensed under the Apache License, Version 2.0 (the "License");
554bbef435ed857fc68941672799fc8001c101119Chris Wren * you may not use this file except in compliance with the License.
654bbef435ed857fc68941672799fc8001c101119Chris Wren * You may obtain a copy of the License at
754bbef435ed857fc68941672799fc8001c101119Chris Wren *
854bbef435ed857fc68941672799fc8001c101119Chris Wren *     http://www.apache.org/licenses/LICENSE-2.0
954bbef435ed857fc68941672799fc8001c101119Chris Wren *
1054bbef435ed857fc68941672799fc8001c101119Chris Wren * Unless required by applicable law or agreed to in writing, software
1154bbef435ed857fc68941672799fc8001c101119Chris Wren * distributed under the License is distributed on an "AS IS" BASIS,
1254bbef435ed857fc68941672799fc8001c101119Chris Wren * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1354bbef435ed857fc68941672799fc8001c101119Chris Wren * See the License for the specific language governing permissions and
1454bbef435ed857fc68941672799fc8001c101119Chris Wren * limitations under the License.
1554bbef435ed857fc68941672799fc8001c101119Chris Wren */
1654bbef435ed857fc68941672799fc8001c101119Chris Wrenpackage com.android.server.notification;
1754bbef435ed857fc68941672799fc8001c101119Chris Wren
18b5e44b796618c376cf535e43aaa86ea4522e7770Julia Reynoldsimport android.app.NotificationChannel;
1959e152e92e6ebb71bab974973ce29b4f8d11f7cfJulia Reynoldsimport android.app.NotificationChannelGroup;
20b5e44b796618c376cf535e43aaa86ea4522e7770Julia Reynoldsimport android.content.pm.ParceledListSlice;
2189aa2261903fd09b08a2210a7a1b35d329f8330aChris Wrenimport android.os.UserHandle;
22b5e44b796618c376cf535e43aaa86ea4522e7770Julia Reynolds
23f02562aeee90e2972849214b715dcfc86aa3084eJulia Reynoldsimport java.util.Collection;
24f02562aeee90e2972849214b715dcfc86aa3084eJulia Reynolds
2554bbef435ed857fc68941672799fc8001c101119Chris Wrenpublic interface RankingConfig {
2654bbef435ed857fc68941672799fc8001c101119Chris Wren
27ef37f284364cc45c2ed91bfe04c489d2cedd32d2Julia Reynolds    void setImportance(String packageName, int uid, int importance);
28ef37f284364cc45c2ed91bfe04c489d2cedd32d2Julia Reynolds    int getImportance(String packageName, int uid);
29924eed1ca6d3fec5dae7eb0f9c11b8f23f628697Julia Reynolds    void setShowBadge(String packageName, int uid, boolean showBadge);
30924eed1ca6d3fec5dae7eb0f9c11b8f23f628697Julia Reynolds    boolean canShowBadge(String packageName, int uid);
3189aa2261903fd09b08a2210a7a1b35d329f8330aChris Wren    boolean badgingEnabled(UserHandle userHandle);
32b5e44b796618c376cf535e43aaa86ea4522e7770Julia Reynolds
33f02562aeee90e2972849214b715dcfc86aa3084eJulia Reynolds    Collection<NotificationChannelGroup> getNotificationChannelGroups(String pkg,
34f02562aeee90e2972849214b715dcfc86aa3084eJulia Reynolds            int uid);
3559e152e92e6ebb71bab974973ce29b4f8d11f7cfJulia Reynolds    void createNotificationChannelGroup(String pkg, int uid, NotificationChannelGroup group,
3659e152e92e6ebb71bab974973ce29b4f8d11f7cfJulia Reynolds            boolean fromTargetApp);
3759e152e92e6ebb71bab974973ce29b4f8d11f7cfJulia Reynolds    ParceledListSlice<NotificationChannelGroup> getNotificationChannelGroups(String pkg,
3859e152e92e6ebb71bab974973ce29b4f8d11f7cfJulia Reynolds            int uid, boolean includeDeleted);
39baff400fa5a93d157934818982fcf534327f9830Julia Reynolds    void createNotificationChannel(String pkg, int uid, NotificationChannel channel,
40baff400fa5a93d157934818982fcf534327f9830Julia Reynolds            boolean fromTargetApp);
4185769915e7ef10bef2b5338ed8f04d9b787924fbJulia Reynolds    void updateNotificationChannel(String pkg, int uid, NotificationChannel channel);
424036e8d4c636ae36f28585d283b522a7a97eaf72Julia Reynolds    NotificationChannel getNotificationChannel(String pkg, int uid, String channelId, boolean includeDeleted);
43b5e44b796618c376cf535e43aaa86ea4522e7770Julia Reynolds    void deleteNotificationChannel(String pkg, int uid, String channelId);
444036e8d4c636ae36f28585d283b522a7a97eaf72Julia Reynolds    void permanentlyDeleteNotificationChannel(String pkg, int uid, String channelId);
454036e8d4c636ae36f28585d283b522a7a97eaf72Julia Reynolds    void permanentlyDeleteNotificationChannels(String pkg, int uid);
464036e8d4c636ae36f28585d283b522a7a97eaf72Julia Reynolds    ParceledListSlice<NotificationChannel> getNotificationChannels(String pkg, int uid, boolean includeDeleted);
4754bbef435ed857fc68941672799fc8001c101119Chris Wren}
48