• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 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.shared.system;
18 
19 import android.graphics.Rect;
20 import android.os.Bundle;
21 import android.view.RemoteAnimationTarget;
22 
23 import com.android.systemui.shared.recents.model.ThumbnailData;
24 
25 import java.util.HashMap;
26 
27 public interface RecentsAnimationListener {
28     /**
29      * Called when the animation into Recents can start. This call is made on the binder thread.
30      */
onAnimationStart(RecentsAnimationControllerCompat controller, RemoteAnimationTarget[] apps, RemoteAnimationTarget[] wallpapers, Rect homeContentInsets, Rect minimizedHomeBounds, Bundle extras)31     void onAnimationStart(RecentsAnimationControllerCompat controller,
32             RemoteAnimationTarget[] apps, RemoteAnimationTarget[] wallpapers,
33             Rect homeContentInsets, Rect minimizedHomeBounds, Bundle extras);
34 
35     /**
36      * Called when the animation into Recents was canceled. This call is made on the binder thread.
37      */
onAnimationCanceled(HashMap<Integer, ThumbnailData> thumbnailDatas)38     void onAnimationCanceled(HashMap<Integer, ThumbnailData> thumbnailDatas);
39 
40     /**
41      * Called when the task of an activity that has been started while the recents animation
42      * was running becomes ready for control.
43      */
onTasksAppeared(RemoteAnimationTarget[] app)44     void onTasksAppeared(RemoteAnimationTarget[] app);
45 
46     /**
47      * Called to request that the current task tile be switched out for a screenshot (if not
48      * already). Once complete, onFinished should be called.
49      * @return true if this impl will call onFinished. No other onSwitchToScreenshot impls will
50      *         be called afterwards (to avoid multiple calls to onFinished).
51      */
onSwitchToScreenshot(Runnable onFinished)52     default boolean onSwitchToScreenshot(Runnable onFinished) {
53         return false;
54     }
55 }
56