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 17 package com.android.systemui.statusbar.pipeline.wifi.ui.viewmodel 18 19 import com.android.systemui.statusbar.pipeline.wifi.ui.model.WifiIcon 20 import kotlinx.coroutines.flow.Flow 21 import kotlinx.coroutines.flow.StateFlow 22 23 /** 24 * A common view model interface that can be used for delegation between [WifiViewModel] and 25 * [LocationBasedWifiViewModel]. 26 */ 27 interface WifiViewModelCommon { 28 /** The wifi icon that should be displayed. */ 29 val wifiIcon: StateFlow<WifiIcon> 30 31 /** True if the activity in view should be visible. */ 32 val isActivityInViewVisible: Flow<Boolean> 33 34 /** True if the activity out view should be visible. */ 35 val isActivityOutViewVisible: Flow<Boolean> 36 37 /** True if the activity container view should be visible. */ 38 val isActivityContainerVisible: Flow<Boolean> 39 40 /** True if the airplane spacer view should be visible. */ 41 val isAirplaneSpacerVisible: Flow<Boolean> 42 43 /** True if the spacer between the wifi icon and the RAT icon should be visible. */ 44 val isSignalSpacerVisible: Flow<Boolean> 45 } 46