• Home
  • 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.recents;
18 
19 import android.graphics.Bitmap;
20 import android.graphics.Insets;
21 import android.graphics.Rect;
22 import android.os.Bundle;
23 import android.os.UserHandle;
24 import android.view.MotionEvent;
25 
26 import com.android.systemui.shared.recents.model.Task;
27 import com.android.systemui.shared.system.RemoteTransitionCompat;
28 
29 /**
30  * Temporary callbacks into SystemUI.
31  */
32 interface ISystemUiProxy {
33 
34     /**
35      * Begins screen pinning on the provided {@param taskId}.
36      */
startScreenPinning(int taskId)37     void startScreenPinning(int taskId) = 1;
38 
39     /**
40      * Notifies SystemUI that Overview is shown.
41      */
onOverviewShown(boolean fromHome)42     void onOverviewShown(boolean fromHome) = 6;
43 
44     /**
45      * Get the secondary split screen app's rectangle when not minimized.
46      */
getNonMinimizedSplitScreenSecondaryBounds()47     Rect getNonMinimizedSplitScreenSecondaryBounds() = 7;
48 
49     /**
50      * Control the {@param alpha} of the option nav bar button (back-button in 2 button mode
51      * and home handle & background in gestural mode).  The {@param animate} is currently only
52      * supported for 2 button mode.
53      */
setNavBarButtonAlpha(float alpha, boolean animate)54     void setNavBarButtonAlpha(float alpha, boolean animate) = 19;
55 
56     /**
57      * Proxies motion events from the homescreen UI to the status bar. Only called when
58      * swipe down is detected on WORKSPACE. The sender guarantees the following order of events on
59      * the tracking pointer.
60      *
61      * Normal gesture: DOWN, MOVE/POINTER_DOWN/POINTER_UP)*, UP or CANCLE
62      */
63     void onStatusBarMotionEvent(in MotionEvent event) = 9;
64 
65     /**
66      * Proxies the assistant gesture's progress started from navigation bar.
67      */
onAssistantProgress(float progress)68     void onAssistantProgress(float progress) = 12;
69 
70     /**
71     * Proxies the assistant gesture fling velocity (in pixels per millisecond) upon completion.
72     * Velocity is 0 for drag gestures.
73     */
onAssistantGestureCompletion(float velocity)74     void onAssistantGestureCompletion(float velocity) = 18;
75 
76     /**
77      * Start the assistant.
78      */
79     void startAssistant(in Bundle bundle) = 13;
80 
81     /**
82      * Notifies that the accessibility button in the system's navigation area has been clicked
83      */
notifyAccessibilityButtonClicked(int displayId)84     void notifyAccessibilityButtonClicked(int displayId) = 15;
85 
86     /**
87      * Notifies that the accessibility button in the system's navigation area has been long clicked
88      */
notifyAccessibilityButtonLongClicked()89     void notifyAccessibilityButtonLongClicked() = 16;
90 
91     /**
92      * Ends the system screen pinning.
93      */
stopScreenPinning()94     void stopScreenPinning() = 17;
95 
96     /**
97      * Handle the provided image as if it was a screenshot.
98      *
99      * Deprecated, use handleImageBundleAsScreenshot with image bundle and UserTask
100      * @deprecated
101      */
handleImageAsScreenshot(in Bitmap screenImage, in Rect locationInScreen, in Insets visibleInsets, int taskId)102     void handleImageAsScreenshot(in Bitmap screenImage, in Rect locationInScreen,
103               in Insets visibleInsets, int taskId) = 21;
104 
105     /**
106      * Sets the split-screen divider minimized state
107      */
setSplitScreenMinimized(boolean minimized)108     void setSplitScreenMinimized(boolean minimized) = 22;
109 
110     /*
111      * Notifies that the swipe-to-home (recents animation) is finished.
112      */
notifySwipeToHomeFinished()113     void notifySwipeToHomeFinished() = 23;
114 
115     /**
116      * Notifies that quickstep will switch to a new task
117      * @param rotation indicates which Surface.Rotation the gesture was started in
118      */
notifyPrioritizedRotation(int rotation)119     void notifyPrioritizedRotation(int rotation) = 25;
120 
121     /**
122      * Handle the provided image as if it was a screenshot.
123      */
handleImageBundleAsScreenshot(in Bundle screenImageBundle, in Rect locationInScreen, in Insets visibleInsets, in Task.TaskKey task)124     void handleImageBundleAsScreenshot(in Bundle screenImageBundle, in Rect locationInScreen,
125               in Insets visibleInsets, in Task.TaskKey task) = 28;
126 
127     /**
128      * Notifies to expand notification panel.
129      */
expandNotificationPanel()130     void expandNotificationPanel() = 29;
131 
132     /**
133      * Notifies SystemUI to invoke Back.
134      */
onBackPressed()135     void onBackPressed() = 44;
136 
137     /** Sets home rotation enabled. */
setHomeRotationEnabled(boolean enabled)138     void setHomeRotationEnabled(boolean enabled) = 45;
139 
140     /** Notifies that a swipe-up gesture has started */
notifySwipeUpGestureStarted()141     oneway void notifySwipeUpGestureStarted() = 46;
142 
143     // Next id = 47
144 }
145