1 /*
2  * Copyright (C) 2020 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
18 
19 import android.view.View
20 import android.view.ViewGroup
21 import com.android.systemui.statusbar.notification.stack.NotificationListItem
22 
23 /**
24  * Minimal interface of what [NotifViewManager] needs from [NotificationListContainer]
25  */
26 interface SimpleNotificationListContainer {
27     /** Called to signify that a top-level element is becoming a child in the shade */
setChildTransferInProgressnull28     fun setChildTransferInProgress(b: Boolean)
29     /** Used to generate a list of [NotificationListItem] */
30     fun getContainerChildAt(i: Int): View
31     /** Similar to above */
32     fun getContainerChildCount(): Int
33     /** Remove a [NotificationListItem] from the container */
34     fun removeListItem(li: NotificationListItem)
35     /** Add a [NotificationListItem] to the container */
36     fun addListItem(li: NotificationListItem)
37     /** Allows [NotifViewManager] to notify the container about a group child removal */
38     fun notifyGroupChildRemoved(row: View, parent: ViewGroup)
39     /** Allows [NotifViewManager] to notify the container about a group child addition */
40     fun notifyGroupChildAdded(row: View)
41     /** [NotifViewManager] calls this when the order of the children changes */
42     fun generateChildOrderChangedEvent()
43 }
44