• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 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 distshellributed 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.wm.shell.recents;
18 
19 import android.app.ActivityManager.RunningTaskInfo;
20 
21 import com.android.wm.shell.shared.GroupedTaskInfo;
22 
23 /**
24  * Listener interface that Launcher attaches to SystemUI to get split-screen callbacks.
25  */
26 oneway interface IRecentTasksListener {
27 
28     /**
29      * Called when the set of recent tasks change.
30      */
onRecentTasksChanged()31     void onRecentTasksChanged();
32 
33     /**
34      * Called when a running task appears.
35      */
onRunningTaskAppeared(in RunningTaskInfo taskInfo)36     void onRunningTaskAppeared(in RunningTaskInfo taskInfo);
37 
38     /**
39      * Called when a running task vanishes.
40      */
onRunningTaskVanished(in RunningTaskInfo taskInfo)41     void onRunningTaskVanished(in RunningTaskInfo taskInfo);
42 
43     /**
44      * Called when a running task changes.
45      */
onRunningTaskChanged(in RunningTaskInfo taskInfo)46     void onRunningTaskChanged(in RunningTaskInfo taskInfo);
47 
48     /** A task has moved to front. Only used if enableShellTopTaskTracking() is disabled. */
onTaskMovedToFront(in GroupedTaskInfo taskToFront)49     void onTaskMovedToFront(in GroupedTaskInfo taskToFront);
50 
51     /** A task info has changed. Only used if enableShellTopTaskTracking() is disabled. */
onTaskInfoChanged(in RunningTaskInfo taskInfo)52     void onTaskInfoChanged(in RunningTaskInfo taskInfo);
53 
54     /**
55      * If enableShellTopTaskTracking() is enabled, this reports the set of all visible tasks.
56      * Otherwise, this reports only the new top most visible task.
57      */
onVisibleTasksChanged(in GroupedTaskInfo[] visibleTasks)58     void onVisibleTasksChanged(in GroupedTaskInfo[] visibleTasks);
59 }