1 /*
2  * Copyright (C) 2021 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 
17 package com.android.systemui.statusbar.notification.collection.notifcollection;
18 
19 import android.service.notification.StatusBarNotification;
20 
21 /**
22  * An object that allows Coordinators to update notifications internally to SystemUI.
23  * This is used when part of the UI involves updating the underlying appearance of a notification
24  * on behalf of an app, such as to add a spinner or remote input history.
25  */
26 public interface InternalNotifUpdater {
27     /**
28      * Called when an already-existing notification needs to be updated to a new temporary
29      * appearance.
30      * This update is local to the SystemUI process.
31      * This has no effect if no notification with the given key exists in the pipeline.
32      *
33      * @param sbn a notification to update
34      * @param reason a debug reason for the update
35      */
onInternalNotificationUpdate(StatusBarNotification sbn, String reason)36     void onInternalNotificationUpdate(StatusBarNotification sbn, String reason);
37 }
38