1 /* 2 * Copyright (C) 2020 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.media 18 19 import android.app.smartspace.SmartspaceAction 20 21 /** State of a Smartspace media recommendations view. */ 22 data class SmartspaceMediaData( 23 /** 24 * Unique id of a Smartspace media target. 25 */ 26 val targetId: String, 27 /** 28 * Indicates if the status is active. 29 */ 30 val isActive: Boolean, 31 /** 32 * Indicates if all the required data field is valid. 33 */ 34 val isValid: Boolean, 35 /** 36 * Package name of the media recommendations' provider-app. 37 */ 38 val packageName: String, 39 /** 40 * Action to perform when the card is tapped. Also contains the target's extra info. 41 */ 42 val cardAction: SmartspaceAction?, 43 /** 44 * List of media recommendations. 45 */ 46 val recommendations: List<SmartspaceAction>, 47 /** 48 * View's background color. 49 */ 50 val backgroundColor: Int 51 ) 52