summaryrefslogtreecommitdiffstats
path: root/go/quickstep/src/com/android/quickstep/GoActivityControlHelper.java
blob: 274a347cbbd7f37c8a2339ae5dc441fa5c54d716 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package com.android.quickstep;

import android.content.Context;
import android.graphics.Rect;

import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.DeviceProfile;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;

/**
 * Base activity control helper for Go that stubs out most of the functionality that is not needed
 * for Go.
 *
 * @param <T> activity that contains the overview
 */
public abstract class GoActivityControlHelper<T extends BaseDraggingActivity> implements
        ActivityControlHelper<T> {

    @Override
    public void onTransitionCancelled(T activity, boolean activityVisible) {
        // Go transitions to overview are all atomic.
    }

    @Override
    public int getSwipeUpDestinationAndLength(DeviceProfile dp, Context context, Rect outRect) {
        // TODO Implement outRect depending on where the task should animate to.
        // Go does not support swipe up gesture.
        return 0;
    }

    @Override
    public void onSwipeUpToRecentsComplete(T activity) {
        // Go does not support swipe up gesture.
    }

    @Override
    public void onAssistantVisibilityChanged(float visibility) {
        // Go does not support assistant visibility transitions.
    }

    @Override
    public HomeAnimationFactory prepareHomeUI(T activity) {
        // Go does not support gestures from app to home.
        return null;
    }

    @Override
    public Rect getOverviewWindowBounds(Rect homeBounds, RemoteAnimationTargetCompat target) {
        // Go does not support gestures to overview.
        return null;
    }

    @Override
    public boolean shouldMinimizeSplitScreen() {
        // Go does not support split screen.
        return true;
    }

    @Override
    public boolean isInLiveTileMode() {
        // Go does not support live tiles.
        return false;
    }

    @Override
    public void onLaunchTaskFailed(T activity) {
        // Go does not support gestures from one task to another.
    }
}