• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
5  * except in compliance with the License. You may obtain a copy of the License at
6  *
7  *      http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software distributed under the
10  * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
11  * KIND, either express or implied. See the License for the specific language governing
12  * permissions and limitations under the License.
13  */
14 
15 package com.android.systemui;
16 
17 import android.service.notification.StatusBarNotification;
18 
19 public interface ForegroundServiceController {
20     /**
21      * @param sbn notification that was just posted
22      * @param importance
23      */
addNotification(StatusBarNotification sbn, int importance)24     void addNotification(StatusBarNotification sbn, int importance);
25 
26     /**
27      * @param sbn notification that was just changed in some way
28      * @param newImportance
29      */
updateNotification(StatusBarNotification sbn, int newImportance)30     void updateNotification(StatusBarNotification sbn, int newImportance);
31 
32     /**
33      * @param sbn notification that was just canceled
34      */
removeNotification(StatusBarNotification sbn)35     boolean removeNotification(StatusBarNotification sbn);
36 
37     /**
38      * @param userId
39      * @return true if this user has services missing notifications and therefore needs a
40      * disclosure notification.
41      */
isDungeonNeededForUser(int userId)42     boolean isDungeonNeededForUser(int userId);
43 
44     /**
45      * @param sbn
46      * @return true if sbn is the system-provided "dungeon" (list of running foreground services).
47      */
isDungeonNotification(StatusBarNotification sbn)48     boolean isDungeonNotification(StatusBarNotification sbn);
49 }
50