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.statusbar.chips.screenrecord.domain.model 18 19 import android.app.ActivityManager 20 21 /** Represents the status of screen record needed to show a chip in the status bar. */ 22 sealed interface ScreenRecordChipModel { 23 /** There's nothing related to screen recording happening. */ 24 data object DoingNothing : ScreenRecordChipModel 25 26 /** A screen recording will begin in [millisUntilStarted] ms. */ 27 data class Starting(val millisUntilStarted: Long) : ScreenRecordChipModel 28 29 /** 30 * There's an active screen recording happening. 31 * 32 * @property recordedTask the task being recorded if the user is recording only a single app. 33 * Null if the user is recording the entire screen or we don't have the task info yet. 34 */ 35 data class Recording( 36 val recordedTask: ActivityManager.RunningTaskInfo?, 37 ) : ScreenRecordChipModel 38 } 39