1 /* 2 * Copyright (C) 2025 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.communal.data.model 18 19 import android.annotation.IntDef 20 21 @Retention(AnnotationRetention.SOURCE) 22 @IntDef( 23 flag = true, 24 prefix = ["FEATURE_"], 25 value = [FEATURE_AUTO_OPEN, FEATURE_MANUAL_OPEN, FEATURE_ENABLED, FEATURE_ALL], 26 ) 27 annotation class CommunalFeature 28 29 /** If we should automatically open the hub */ 30 const val FEATURE_AUTO_OPEN: Int = 1 31 32 /** If the user is allowed to manually open the hub */ 33 const val FEATURE_MANUAL_OPEN: Int = 1 shl 1 34 35 /** 36 * If the hub should be considered enabled. If not, it may be cleaned up entirely to reduce memory 37 * footprint. 38 */ 39 const val FEATURE_ENABLED: Int = 1 shl 2 40 41 const val FEATURE_ALL: Int = FEATURE_ENABLED or FEATURE_MANUAL_OPEN or FEATURE_AUTO_OPEN 42