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 import com.android.internal.util.ScreenshotRequest; 26 27 import com.android.systemui.shared.recents.model.Task; 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 * Proxies motion events from the homescreen UI to the status bar. Only called when 46 * swipe down is detected on WORKSPACE. The sender guarantees the following order of events on 47 * the tracking pointer. 48 * 49 * Normal gesture: DOWN, MOVE/POINTER_DOWN/POINTER_UP)*, UP or CANCLE 50 */ 51 void onStatusBarMotionEvent(in MotionEvent event) = 9; 52 53 /** 54 * Proxies the assistant gesture's progress started from navigation bar. 55 */ onAssistantProgress(float progress)56 void onAssistantProgress(float progress) = 12; 57 58 /** 59 * Proxies the assistant gesture fling velocity (in pixels per millisecond) upon completion. 60 * Velocity is 0 for drag gestures. 61 */ onAssistantGestureCompletion(float velocity)62 void onAssistantGestureCompletion(float velocity) = 18; 63 64 /** 65 * Start the assistant. 66 */ 67 void startAssistant(in Bundle bundle) = 13; 68 69 /** 70 * Notifies that the accessibility button in the system's navigation area has been clicked 71 */ notifyAccessibilityButtonClicked(int displayId)72 void notifyAccessibilityButtonClicked(int displayId) = 15; 73 74 /** 75 * Notifies that the accessibility button in the system's navigation area has been long clicked 76 */ notifyAccessibilityButtonLongClicked()77 void notifyAccessibilityButtonLongClicked() = 16; 78 79 /** 80 * Ends the system screen pinning. 81 */ stopScreenPinning()82 void stopScreenPinning() = 17; 83 84 /** 85 * Notifies that quickstep will switch to a new task 86 * @param rotation indicates which Surface.Rotation the gesture was started in 87 */ notifyPrioritizedRotation(int rotation)88 void notifyPrioritizedRotation(int rotation) = 25; 89 90 /** 91 * Notifies to expand notification panel. 92 */ expandNotificationPanel()93 void expandNotificationPanel() = 29; 94 95 /** 96 * Notifies SystemUI to invoke Back. 97 */ onBackPressed()98 void onBackPressed() = 44; 99 100 /** Sets home rotation enabled. */ setHomeRotationEnabled(boolean enabled)101 void setHomeRotationEnabled(boolean enabled) = 45; 102 103 /** Notifies when taskbar status updated */ notifyTaskbarStatus(boolean visible, boolean stashed)104 oneway void notifyTaskbarStatus(boolean visible, boolean stashed) = 47; 105 106 /** 107 * Notifies sysui when taskbar requests autoHide to stop auto-hiding 108 * If called to suspend, caller is also responsible for calling this method to un-suspend 109 * @param suspend should be true to stop auto-hide, false to resume normal behavior 110 */ notifyTaskbarAutohideSuspend(boolean suspend)111 oneway void notifyTaskbarAutohideSuspend(boolean suspend) = 48; 112 113 /** 114 * Notifies SystemUI to invoke IME Switcher. 115 */ onImeSwitcherPressed()116 void onImeSwitcherPressed() = 49; 117 118 /** 119 * Notifies to toggle notification panel. 120 */ toggleNotificationPanel()121 void toggleNotificationPanel() = 50; 122 123 /** 124 * Handle the screenshot request. 125 */ 126 void takeScreenshot(in ScreenshotRequest request) = 51; 127 128 // Next id = 52 129 } 130