1 /* 2 * Copyright (C) 2024 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.phone 18 19 import android.content.Context 20 import android.view.WindowInsetsController 21 import com.android.internal.colorextraction.ColorExtractor 22 import com.android.internal.view.AppearanceRegion 23 import com.android.systemui.CoreStartable 24 25 /** Controls how light status bar flag applies to the icons. */ 26 interface LightBarController : CoreStartable { 27 stopnull28 fun stop() 29 30 fun setNavigationBar(navigationBar: LightBarTransitionsController) 31 32 fun onNavigationBarAppearanceChanged( 33 @WindowInsetsController.Appearance appearance: Int, 34 nbModeChanged: Boolean, 35 navigationBarMode: Int, 36 navbarColorManagedByIme: Boolean, 37 ) 38 39 fun onNavigationBarModeChanged(newBarMode: Int) 40 41 fun setQsCustomizing(customizing: Boolean) 42 43 /** Set if Quick Settings is fully expanded, which affects notification scrim visibility. */ 44 fun setQsExpanded(expanded: Boolean) 45 46 /** Set if Global Actions dialog is visible, which requires dark mode (light buttons). */ 47 fun setGlobalActionsVisible(visible: Boolean) 48 49 /** 50 * Controls the light status bar temporarily for back navigation. 51 * 52 * @param appearance the customized appearance. 53 */ 54 fun customizeStatusBarAppearance(appearance: AppearanceRegion) 55 56 /** 57 * Sets whether the direct-reply is in use or not. 58 * 59 * @param directReplying `true` when the direct-reply is in-use. 60 */ 61 fun setDirectReplying(directReplying: Boolean) 62 63 fun setScrimState( 64 scrimState: ScrimState, 65 scrimBehindAlpha: Float, 66 scrimInFrontColor: ColorExtractor.GradientColors, 67 ) 68 69 fun interface Factory { 70 fun create(context: Context): LightBarController 71 } 72 } 73