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 import android.content.Intent 21 22 /** State of a Smartspace media recommendations view. */ 23 data class SmartspaceMediaData( 24 /** 25 * Unique id of a Smartspace media target. 26 */ 27 val targetId: String, 28 /** 29 * Indicates if the status is active. 30 */ 31 val isActive: Boolean, 32 /** 33 * Indicates if all the required data field is valid. 34 */ 35 val isValid: Boolean, 36 /** 37 * Package name of the media recommendations' provider-app. 38 */ 39 val packageName: String, 40 /** 41 * Action to perform when the card is tapped. Also contains the target's extra info. 42 */ 43 val cardAction: SmartspaceAction?, 44 /** 45 * List of media recommendations. 46 */ 47 val recommendations: List<SmartspaceAction>, 48 /** 49 * Intent for the user's initiated dismissal. 50 */ 51 val dismissIntent: Intent?, 52 /** 53 * View's background color. 54 */ 55 val backgroundColor: Int, 56 /** 57 * The timestamp in milliseconds that headphone is connected. 58 */ 59 val headphoneConnectionTimeMillis: Long 60 ) 61