• 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.KeyEvent;
25 import android.view.MotionEvent;
26 import com.android.internal.util.ScreenshotRequest;
27 
28 import com.android.systemui.shared.recents.model.Task;
29 
30 /**
31  * Temporary callbacks into SystemUI.
32  */
33 interface ISystemUiProxy {
34 
35     /**
36      * Begins screen pinning on the provided {@param taskId}.
37      */
startScreenPinning(int taskId)38     oneway void startScreenPinning(int taskId) = 1;
39 
40     /**
41      * Notifies SystemUI that Overview is shown.
42      */
onOverviewShown(boolean fromHome)43     oneway void onOverviewShown(boolean fromHome) = 6;
44 
45     /**
46      * Proxies motion events from the homescreen UI to the status bar. Only called when
47      * swipe down is detected on WORKSPACE. The sender guarantees the following order of events on
48      * the tracking pointer.
49      *
50      * Normal gesture: DOWN, MOVE/POINTER_DOWN/POINTER_UP)*, UP or CANCLE
51      */
52     oneway void onStatusBarTouchEvent(in MotionEvent event) = 9;
53 
54     /**
55      * Proxies the assistant gesture's progress started from navigation bar.
56      */
onAssistantProgress(float progress)57     oneway void onAssistantProgress(float progress) = 12;
58 
59     /**
60     * Proxies the assistant gesture fling velocity (in pixels per millisecond) upon completion.
61     * Velocity is 0 for drag gestures.
62     */
onAssistantGestureCompletion(float velocity)63     oneway void onAssistantGestureCompletion(float velocity) = 18;
64 
65     /**
66      * Start the assistant.
67      */
68     oneway void startAssistant(in Bundle bundle) = 13;
69 
70     /**
71      * Indicates that the given Assist invocation types should be handled by Launcher via
72      * LauncherProxy#onAssistantOverrideInvoked and should not be invoked by SystemUI.
73      *
74      * @param invocationTypes The invocation types that will henceforth be handled via
75      *         LauncherProxy (Launcher); other invocation types should be handled by SysUI.
76      */
setAssistantOverridesRequested(in int[] invocationTypes)77     oneway void setAssistantOverridesRequested(in int[] invocationTypes) = 53;
78 
79     /**
80      * Notifies that the accessibility button in the system's navigation area has been clicked
81      */
notifyAccessibilityButtonClicked(int displayId)82     oneway void notifyAccessibilityButtonClicked(int displayId) = 15;
83 
84     /**
85      * Notifies that the accessibility button in the system's navigation area has been long clicked
86      */
notifyAccessibilityButtonLongClicked()87     oneway void notifyAccessibilityButtonLongClicked() = 16;
88 
89     /**
90      * Ends the system screen pinning.
91      */
stopScreenPinning()92     oneway void stopScreenPinning() = 17;
93 
94     /**
95      * Notifies that quickstep will switch to a new task
96      * @param rotation indicates which Surface.Rotation the gesture was started in
97      */
notifyPrioritizedRotation(int rotation)98     oneway void notifyPrioritizedRotation(int rotation) = 25;
99 
100     /**
101      * Notifies to expand notification panel.
102      */
expandNotificationPanel()103     oneway void expandNotificationPanel() = 29;
104 
105     /**
106      * Notifies SystemUI of a back KeyEvent.
107      */
108     oneway void onBackEvent(in KeyEvent keyEvent) = 44;
109 
110     /** Sets home rotation enabled. */
setHomeRotationEnabled(boolean enabled)111     oneway void setHomeRotationEnabled(boolean enabled) = 45;
112 
113     /** Notifies when taskbar status updated */
notifyTaskbarStatus(boolean visible, boolean stashed)114     oneway void notifyTaskbarStatus(boolean visible, boolean stashed) = 47;
115 
116     /**
117      * Notifies sysui when taskbar requests autoHide to stop auto-hiding
118      * If called to suspend, caller is also responsible for calling this method to un-suspend
119      * @param suspend should be true to stop auto-hide, false to resume normal behavior
120      */
notifyTaskbarAutohideSuspend(boolean suspend)121     oneway void notifyTaskbarAutohideSuspend(boolean suspend) = 48;
122 
123     /**
124      * Notifies that the IME switcher button has been pressed.
125      */
onImeSwitcherPressed()126     oneway void onImeSwitcherPressed() = 49;
127 
128     /**
129      * Notifies to toggle notification panel.
130      */
toggleNotificationPanel()131     oneway void toggleNotificationPanel() = 50;
132 
133     /**
134      * Handle the screenshot request.
135      */
136     oneway void takeScreenshot(in ScreenshotRequest request) = 51;
137 
138     /**
139      * Dispatches trackpad status bar motion event to the notification shade. Currently these events
140      * are from the input monitor in {@link TouchInteractionService}. This is different from
141      * {@link #onStatusBarTouchEvent} above in that, this directly dispatches motion events to the
142      * notification shade, while {@link #onStatusBarTouchEvent} relies on setting the launcher
143      * window slippery to allow the frameworks to route those events after passing the initial
144      * threshold.
145      */
146     oneway void onStatusBarTrackpadEvent(in MotionEvent event) = 52;
147 
148     /**
149      * Animate the nav bar being long-pressed.
150      *
151      * @param isTouchDown {@code true} if the button is starting to be pressed ({@code false} if
152      *                                released or canceled)
153      * @param shrink {@code true} if the handle should shrink, {@code false} if it should grow
154      * @param durationMs how long the animation should take (for the {@code isTouchDown} case, this
155      *                   should be the same as the amount of time to trigger a long-press)
156      */
animateNavBarLongPress(boolean isTouchDown, boolean shrink, long durationMs)157     oneway void animateNavBarLongPress(boolean isTouchDown, boolean shrink, long durationMs) = 54;
158 
159     /**
160      * Set the override value for home button long press duration in ms and slop multiplier and
161      * haptic.
162      */
setOverrideHomeButtonLongPress(long duration, float slopMultiplier, boolean haptic)163     oneway void setOverrideHomeButtonLongPress(long duration, float slopMultiplier, boolean haptic)
164             = 55;
165 
166     /**
167      * Notifies to toggle quick settings panel.
168      */
toggleQuickSettingsPanel()169     oneway void toggleQuickSettingsPanel() = 56;
170 
171     /**
172      * Notifies that the IME Switcher button has been long pressed.
173      */
onImeSwitcherLongPress()174     oneway void onImeSwitcherLongPress() = 57;
175 
176     /**
177      * Updates contextual education stats when target gesture type is triggered.
178      */
updateContextualEduStats(boolean isTrackpadGesture, String gestureType)179     oneway void updateContextualEduStats(boolean isTrackpadGesture, String gestureType) = 58;
180 
181     // Next id = 59
182 }
183