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.policy 17 18 import android.content.res.Resources 19 import com.android.systemui.res.R 20 import javax.inject.Inject 21 22 /** 23 * Fake SplitShadeStateController 24 * 25 * Identical behaviour to legacy implementation (that used LargeScreenUtils.kt) I.E., behaviour 26 * based solely on resources, no extra flag logic. 27 */ 28 class ResourcesSplitShadeStateController @Inject constructor() : SplitShadeStateController { 29 30 @Deprecated( 31 message = "This is deprecated, please use ShadeInteractor#isSplitShade instead", 32 replaceWith = 33 ReplaceWith( 34 "shadeInteractor.isSplitShade", 35 "com.android.systemui.shade.domain.interactor.ShadeInteractor", 36 ), 37 ) shouldUseSplitNotificationShadenull38 override fun shouldUseSplitNotificationShade(resources: Resources): Boolean { 39 return resources.getBoolean(R.bool.config_use_split_notification_shade) 40 } 41 } 42