1 package com.android.systemui.qs
2 
3 import android.content.Context
4 import com.android.internal.policy.SystemBarUtils
5 import com.android.systemui.util.LargeScreenUtils.shouldUseLargeScreenShadeHeader
6 
7 object QSUtils {
8 
9     /**
10      * Gets the [R.dimen.qs_header_system_icons_area_height] unless we use large screen header.
11      *
12      * It's the same as [com.android.internal.R.dimen.quick_qs_offset_height] except for
13      * sw600dp-land.
14      */
15     @JvmStatic
16     fun getQsHeaderSystemIconsAreaHeight(context: Context): Int {
17         return if (shouldUseLargeScreenShadeHeader(context.resources)) {
18             // value should be 0 when using large screen shade header because it's not expandable
19             0
20         } else {
21             SystemBarUtils.getQuickQsOffsetHeight(context)
22         }
23     }
24 }