1 /*
2  * Copyright (C) 2023 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.systemui.statusbar.phone
17 
18 import android.content.Context
19 import android.graphics.Rect
20 import android.view.View
21 import com.android.systemui.statusbar.NotificationShelfController
22 import com.android.systemui.statusbar.StatusBarIconView
23 import com.android.systemui.statusbar.notification.collection.ListEntry
24 
25 /**
26  * A controller for the space in the status bar to the left of the system icons. This area is
27  * normally reserved for notifications.
28  */
29 interface NotificationIconAreaController {
30     /** Called by the Keyguard*ViewController whose view contains the aod icons. */
31     fun setupAodIcons(aodIcons: NotificationIconContainer)
32     fun setupShelf(notificationShelfController: NotificationShelfController)
33     fun setShelfIcons(icons: NotificationIconContainer)
34     fun onDensityOrFontScaleChanged(context: Context)
35 
36     /** Returns the view that represents the notification area. */
37     fun getNotificationInnerAreaView(): View?
38 
39     /** Updates the notifications with the given list of notifications to display. */
40     fun updateNotificationIcons(entries: List<@JvmSuppressWildcards ListEntry>)
41     fun updateAodNotificationIcons()
42     fun showIconIsolated(icon: StatusBarIconView?, animated: Boolean)
43     fun setIsolatedIconLocation(iconDrawingRect: Rect, requireStateUpdate: Boolean)
44     fun setAnimationsEnabled(enabled: Boolean)
45     fun onThemeChanged()
46     fun getHeight(): Int
47 }
48