blob: 97b9176d4a86c6d9ddad185e71d5674350330289 [file] [log] [blame]
Yorke Leebd54c2a2016-10-25 13:49:23 -07001/*
2 * Copyright (C) 2016 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
17package android.app;
18
Mathew Inwood61e8ae62018-08-14 14:17:44 +010019import android.annotation.UnsupportedAppUsage;
Jorim Jaggifb9d78a2017-01-05 18:57:12 +010020import android.app.ActivityManager.TaskSnapshot;
Yorke Leebd54c2a2016-10-25 13:49:23 -070021import android.content.ComponentName;
Riddle Hsu7b766fd2019-01-28 21:14:59 +080022import android.os.IBinder;
Yorke Leebd54c2a2016-10-25 13:49:23 -070023import android.os.RemoteException;
24
25/**
26 * Classes interested in observing only a subset of changes using ITaskStackListener can extend
27 * this class to avoid having to implement all the methods.
28 * @hide
29 */
30public abstract class TaskStackListener extends ITaskStackListener.Stub {
31 @Override
Mathew Inwood61e8ae62018-08-14 14:17:44 +010032 @UnsupportedAppUsage
Yorke Leebd54c2a2016-10-25 13:49:23 -070033 public void onTaskStackChanged() throws RemoteException {
34 }
35
36 @Override
Mathew Inwood61e8ae62018-08-14 14:17:44 +010037 @UnsupportedAppUsage
Wale Ogunwale89be5762017-10-04 13:27:49 -070038 public void onActivityPinned(String packageName, int userId, int taskId, int stackId)
Winson Chung85d3c8a2017-09-15 15:41:00 -070039 throws RemoteException {
Winson Chungc81c0ce2017-03-17 12:27:30 -070040 }
41
42 @Override
Mathew Inwood61e8ae62018-08-14 14:17:44 +010043 @UnsupportedAppUsage
Winson Chungc81c0ce2017-03-17 12:27:30 -070044 public void onActivityUnpinned() throws RemoteException {
Yorke Leebd54c2a2016-10-25 13:49:23 -070045 }
46
47 @Override
Mathew Inwood61e8ae62018-08-14 14:17:44 +010048 @UnsupportedAppUsage
Winson Chunge6385a22017-05-02 18:15:16 -070049 public void onPinnedActivityRestartAttempt(boolean clearedTask) throws RemoteException {
Yorke Leebd54c2a2016-10-25 13:49:23 -070050 }
51
52 @Override
Mathew Inwood61e8ae62018-08-14 14:17:44 +010053 @UnsupportedAppUsage
Winson Chung85d39982017-02-24 15:21:25 -080054 public void onPinnedStackAnimationStarted() throws RemoteException {
55 }
56
57 @Override
Mathew Inwood61e8ae62018-08-14 14:17:44 +010058 @UnsupportedAppUsage
Yorke Leebd54c2a2016-10-25 13:49:23 -070059 public void onPinnedStackAnimationEnded() throws RemoteException {
60 }
61
62 @Override
Mathew Inwood61e8ae62018-08-14 14:17:44 +010063 @UnsupportedAppUsage
Andrii Kulian036e3ad2017-04-19 10:55:10 -070064 public void onActivityForcedResizable(String packageName, int taskId, int reason)
65 throws RemoteException {
Yorke Leebd54c2a2016-10-25 13:49:23 -070066 }
67
68 @Override
Mathew Inwood61e8ae62018-08-14 14:17:44 +010069 @UnsupportedAppUsage
Yorke Leebd54c2a2016-10-25 13:49:23 -070070 public void onActivityDismissingDockedStack() throws RemoteException {
71 }
72
73 @Override
Mark Renoufc808f062019-02-07 15:20:37 -050074 public void onActivityLaunchOnSecondaryDisplayFailed(ActivityManager.RunningTaskInfo taskInfo,
75 int requestedDisplayId) throws RemoteException {
76 onActivityLaunchOnSecondaryDisplayFailed();
77 }
78
79 /**
80 * @deprecated see {@link
81 * #onActivityLaunchOnSecondaryDisplayFailed(ActivityManager.RunningTaskInfo, int)}
82 */
83 @Deprecated
Mathew Inwood61e8ae62018-08-14 14:17:44 +010084 @UnsupportedAppUsage
Andrii Kulian036e3ad2017-04-19 10:55:10 -070085 public void onActivityLaunchOnSecondaryDisplayFailed() throws RemoteException {
86 }
87
88 @Override
Jeff Changbf299862019-02-26 20:07:22 +080089 @UnsupportedAppUsage
90 public void onActivityLaunchOnSecondaryDisplayRerouted(ActivityManager.RunningTaskInfo taskInfo,
91 int requestedDisplayId) throws RemoteException {
92 }
93
94 @Override
Yorke Leebd54c2a2016-10-25 13:49:23 -070095 public void onTaskCreated(int taskId, ComponentName componentName) throws RemoteException {
96 }
97
98 @Override
Mathew Inwood61e8ae62018-08-14 14:17:44 +010099 @UnsupportedAppUsage
Yorke Leebd54c2a2016-10-25 13:49:23 -0700100 public void onTaskRemoved(int taskId) throws RemoteException {
101 }
102
103 @Override
Mark Renoufc808f062019-02-07 15:20:37 -0500104 public void onTaskMovedToFront(ActivityManager.RunningTaskInfo taskInfo)
105 throws RemoteException {
106 onTaskMovedToFront(taskInfo.taskId);
107 }
108
109 /**
110 * @deprecated see {@link #onTaskMovedToFront(ActivityManager.RunningTaskInfo)}
111 */
112 @Deprecated
Mathew Inwood61e8ae62018-08-14 14:17:44 +0100113 @UnsupportedAppUsage
Yorke Leebd54c2a2016-10-25 13:49:23 -0700114 public void onTaskMovedToFront(int taskId) throws RemoteException {
115 }
116
117 @Override
Mark Renoufc808f062019-02-07 15:20:37 -0500118 public void onTaskRemovalStarted(ActivityManager.RunningTaskInfo taskInfo)
119 throws RemoteException {
120 onTaskRemovalStarted(taskInfo.taskId);
121 }
122
123 /**
124 * @deprecated see {@link #onTaskRemovalStarted(ActivityManager.RunningTaskInfo)}
125 */
126 @Deprecated
Winson Chung2db35572017-10-09 15:08:30 -0700127 public void onTaskRemovalStarted(int taskId) throws RemoteException {
Yorke Leebd54c2a2016-10-25 13:49:23 -0700128 }
129
130 @Override
Mark Renoufc808f062019-02-07 15:20:37 -0500131 public void onTaskDescriptionChanged(ActivityManager.RunningTaskInfo taskInfo)
132 throws RemoteException {
133 onTaskDescriptionChanged(taskInfo.taskId, taskInfo.taskDescription);
134 }
135
136 /**
137 * @deprecated see {@link #onTaskDescriptionChanged(ActivityManager.RunningTaskInfo)}
138 */
139 @Deprecated
Yorke Leebd54c2a2016-10-25 13:49:23 -0700140 public void onTaskDescriptionChanged(int taskId, ActivityManager.TaskDescription td)
141 throws RemoteException {
142 }
143
144 @Override
Mathew Inwood61e8ae62018-08-14 14:17:44 +0100145 @UnsupportedAppUsage
Yorke Leebd54c2a2016-10-25 13:49:23 -0700146 public void onActivityRequestedOrientationChanged(int taskId, int requestedOrientation)
147 throws RemoteException {
148 }
Robin Leec41f6ec2017-01-10 17:02:34 +0000149
150 @Override
Mathew Inwood61e8ae62018-08-14 14:17:44 +0100151 @UnsupportedAppUsage
Winson Chung2db35572017-10-09 15:08:30 -0700152 public void onTaskProfileLocked(int taskId, int userId) throws RemoteException {
Robin Leec41f6ec2017-01-10 17:02:34 +0000153 }
Jorim Jaggifb9d78a2017-01-05 18:57:12 +0100154
155 @Override
Mathew Inwood61e8ae62018-08-14 14:17:44 +0100156 @UnsupportedAppUsage
Winson Chung2db35572017-10-09 15:08:30 -0700157 public void onTaskSnapshotChanged(int taskId, TaskSnapshot snapshot) throws RemoteException {
Jorim Jaggifb9d78a2017-01-05 18:57:12 +0100158 }
Riddle Hsu7b766fd2019-01-28 21:14:59 +0800159
160 @Override
161 @UnsupportedAppUsage
162 public void onSizeCompatModeActivityChanged(int displayId, IBinder activityToken)
163 throws RemoteException {
164 }
Yorke Leebd54c2a2016-10-25 13:49:23 -0700165}