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.Rect; 20 import android.os.Bundle; 21 import android.view.MotionEvent; 22 23 /** 24 * Temporary callbacks into SystemUI. 25 */ 26 interface ISystemUiProxy { 27 28 /** 29 * Proxies SurfaceControl.screenshotToBuffer(). 30 * @Removed 31 * GraphicBufferCompat screenshot(in Rect sourceCrop, int width, int height, int minLayer, 32 * int maxLayer, boolean useIdentityTransform, int rotation) = 0; 33 */ 34 35 /** 36 * Begins screen pinning on the provided {@param taskId}. 37 */ startScreenPinning(int taskId)38 void startScreenPinning(int taskId) = 1; 39 40 /** 41 * Notifies SystemUI that split screen has been invoked. 42 */ onSplitScreenInvoked()43 void onSplitScreenInvoked() = 5; 44 45 /** 46 * Notifies SystemUI that Overview is shown. 47 */ onOverviewShown(boolean fromHome)48 void onOverviewShown(boolean fromHome) = 6; 49 50 /** 51 * Get the secondary split screen app's rectangle when not minimized. 52 */ getNonMinimizedSplitScreenSecondaryBounds()53 Rect getNonMinimizedSplitScreenSecondaryBounds() = 7; 54 55 /** 56 * Control the {@param alpha} of the back button in the navigation bar and {@param animate} if 57 * needed from current value 58 * @deprecated 59 */ setBackButtonAlpha(float alpha, boolean animate)60 void setBackButtonAlpha(float alpha, boolean animate) = 8; 61 62 /** 63 * Control the {@param alpha} of the option nav bar button (back-button in 2 button mode 64 * and home bar in no-button mode) and {@param animate} if needed from current value 65 */ setNavBarButtonAlpha(float alpha, boolean animate)66 void setNavBarButtonAlpha(float alpha, boolean animate) = 19; 67 68 /** 69 * Proxies motion events from the homescreen UI to the status bar. Only called when 70 * swipe down is detected on WORKSPACE. The sender guarantees the following order of events on 71 * the tracking pointer. 72 * 73 * Normal gesture: DOWN, MOVE/POINTER_DOWN/POINTER_UP)*, UP or CANCLE 74 */ 75 void onStatusBarMotionEvent(in MotionEvent event) = 9; 76 77 /** 78 * Proxies the assistant gesture's progress started from navigation bar. 79 */ onAssistantProgress(float progress)80 void onAssistantProgress(float progress) = 12; 81 82 /** 83 * Proxies the assistant gesture fling velocity (in pixels per millisecond) upon completion. 84 * Velocity is 0 for drag gestures. 85 */ onAssistantGestureCompletion(float velocity)86 void onAssistantGestureCompletion(float velocity) = 18; 87 88 /** 89 * Start the assistant. 90 */ 91 void startAssistant(in Bundle bundle) = 13; 92 93 /** 94 * Creates a new gesture monitor 95 */ monitorGestureInput(String name, int displayId)96 Bundle monitorGestureInput(String name, int displayId) = 14; 97 98 /** 99 * Notifies that the accessibility button in the system's navigation area has been clicked 100 */ notifyAccessibilityButtonClicked(int displayId)101 void notifyAccessibilityButtonClicked(int displayId) = 15; 102 103 /** 104 * Notifies that the accessibility button in the system's navigation area has been long clicked 105 */ notifyAccessibilityButtonLongClicked()106 void notifyAccessibilityButtonLongClicked() = 16; 107 108 /** 109 * Ends the system screen pinning. 110 */ stopScreenPinning()111 void stopScreenPinning() = 17; 112 } 113