1 /*
2  * Copyright (C) 2024 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.controls.shared.model
18 
19 import android.app.Notification
20 import android.app.PendingIntent
21 import android.graphics.drawable.Icon
22 import android.media.session.MediaSession
23 import android.os.Process
24 import com.android.internal.logging.InstanceId
25 
26 data class MediaControlModel(
27     val uid: Int = Process.INVALID_UID,
28     val packageName: String,
29     val instanceId: InstanceId,
30     val token: MediaSession.Token?,
31     val appIcon: Icon?,
32     val clickIntent: PendingIntent?,
33     val appName: String?,
34     val songName: CharSequence?,
35     val artistName: CharSequence?,
36     val showExplicit: Boolean,
37     val artwork: Icon?,
38     val deviceData: MediaDeviceData?,
39     /** [MediaButton] contains [MediaAction] objects which represent specific buttons in the UI */
40     val semanticActionButtons: MediaButton?,
41     val notificationActionButtons: List<MediaAction>,
42     /**
43      * List of [notificationActionButtons] indices shown on smaller version of media player. Check
44      * [Notification.MediaStyle.setShowActionsInCompactView].
45      */
46     val actionsToShowInCollapsed: List<Int>,
47     val isDismissible: Boolean,
48     /** Whether player is in resumption state. */
49     val isResume: Boolean,
50     /** Track seek bar progress (0 - 1) when [isResume] is true. */
51     val resumeProgress: Double?,
52 )
53