1 /*
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 
17 package android.app;
18 
19 import android.app.ActivityManager.TaskSnapshot;
20 import android.content.ComponentName;
21 import android.os.RemoteException;
22 
23 /**
24  * Classes interested in observing only a subset of changes using ITaskStackListener can extend
25  * this class to avoid having to implement all the methods.
26  * @hide
27  */
28 public abstract class TaskStackListener extends ITaskStackListener.Stub {
29     @Override
onTaskStackChanged()30     public void onTaskStackChanged() throws RemoteException {
31     }
32 
33     @Override
onActivityPinned(String packageName, int taskId)34     public void onActivityPinned(String packageName, int taskId) throws RemoteException {
35     }
36 
37     @Override
onActivityUnpinned()38     public void onActivityUnpinned() throws RemoteException {
39     }
40 
41     @Override
onPinnedActivityRestartAttempt(boolean clearedTask)42     public void onPinnedActivityRestartAttempt(boolean clearedTask) throws RemoteException {
43     }
44 
45     @Override
onPinnedStackAnimationStarted()46     public void onPinnedStackAnimationStarted() throws RemoteException {
47     }
48 
49     @Override
onPinnedStackAnimationEnded()50     public void onPinnedStackAnimationEnded() throws RemoteException {
51     }
52 
53     @Override
onActivityForcedResizable(String packageName, int taskId, int reason)54     public void onActivityForcedResizable(String packageName, int taskId, int reason)
55             throws RemoteException {
56     }
57 
58     @Override
onActivityDismissingDockedStack()59     public void onActivityDismissingDockedStack() throws RemoteException {
60     }
61 
62     @Override
onActivityLaunchOnSecondaryDisplayFailed()63     public void onActivityLaunchOnSecondaryDisplayFailed() throws RemoteException {
64     }
65 
66     @Override
onTaskCreated(int taskId, ComponentName componentName)67     public void onTaskCreated(int taskId, ComponentName componentName) throws RemoteException {
68     }
69 
70     @Override
onTaskRemoved(int taskId)71     public void onTaskRemoved(int taskId) throws RemoteException {
72     }
73 
74     @Override
onTaskMovedToFront(int taskId)75     public void onTaskMovedToFront(int taskId) throws RemoteException {
76     }
77 
78     @Override
onTaskRemovalStarted(int taskId)79     public void onTaskRemovalStarted(int taskId) {
80     }
81 
82     @Override
onTaskDescriptionChanged(int taskId, ActivityManager.TaskDescription td)83     public void onTaskDescriptionChanged(int taskId, ActivityManager.TaskDescription td)
84             throws RemoteException {
85     }
86 
87     @Override
onActivityRequestedOrientationChanged(int taskId, int requestedOrientation)88     public void onActivityRequestedOrientationChanged(int taskId, int requestedOrientation)
89             throws RemoteException {
90     }
91 
92     @Override
onTaskProfileLocked(int taskId, int userId)93     public void onTaskProfileLocked(int taskId, int userId) {
94     }
95 
96     @Override
onTaskSnapshotChanged(int taskId, TaskSnapshot snapshot)97     public void onTaskSnapshotChanged(int taskId, TaskSnapshot snapshot)
98             throws RemoteException {
99     }
100 }
101