1 /* 2 * Copyright (C) 2022 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 18 package com.android.customization.picker.quickaffordance.shared.model 19 20 import android.content.Intent 21 import androidx.annotation.DrawableRes 22 23 /** Models a quick affordance. */ 24 data class KeyguardQuickAffordancePickerAffordanceModel( 25 val id: String, 26 val name: String, 27 /** 28 * The resource ID for a drawable of the icon. This is in the namespace of system UI so it 29 * should be queries from that package. 30 */ 31 @DrawableRes val iconResourceId: Int, 32 /** Whether this quick affordance is enabled. */ 33 val isEnabled: Boolean, 34 /** If not enabled, the user-visible message explaining why. */ 35 val enablementExplanation: String, 36 /** 37 * If not enabled, an optional label for a button that takes the user to a destination where 38 * they can re-enable it. 39 */ 40 val enablementActionText: String?, 41 /** 42 * If not enabled, an optional [Intent] for a button that takes the user to a destination where 43 * they can re-enable it. 44 */ 45 val enablementActionIntent: Intent?, 46 /** Optional [Intent] to use to start an activity to configure this affordance. */ 47 val configureIntent: Intent?, 48 ) 49