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.Region; 20 import android.os.Bundle; 21 import android.view.MotionEvent; 22 import com.android.systemui.shared.recents.ISystemUiProxy; 23 24 oneway interface IOverviewProxy { 25 26 void onActiveNavBarRegionChanges(in Region activeRegion) = 11; 27 28 void onInitialize(in Bundle params) = 12; 29 30 31 /** 32 * @deprecated 33 */ 34 void onBind(in ISystemUiProxy sysUiProxy) = 0; 35 36 /** 37 * Called once immediately prior to the first onMotionEvent() call, providing a hint to the 38 * target the initial source of the subsequent motion events. 39 * 40 * @param downHitTarget is one of the {@link NavigationBarCompat.HitTarget}s 41 * 42 * @deprecated 43 */ onPreMotionEvent(int downHitTarget)44 void onPreMotionEvent(int downHitTarget) = 1; 45 46 /** 47 * Proxies motion events from the nav bar in SystemUI to the OverviewProxyService. The sender 48 * guarantees the following order of events: 49 * 50 * Normal gesture: DOWN, (MOVE/POINTER_DOWN/POINTER_UP)*, UP 51 * Quick scrub: DOWN, (MOVE/POINTER_DOWN/POINTER_UP)*, SCRUB_START, SCRUB_PROGRESS*, SCRUB_END 52 * 53 * Once quick scrub is sent, then no further motion events will be provided. 54 * 55 * @deprecated 56 */ 57 void onMotionEvent(in MotionEvent event) = 2; 58 59 /** 60 * Sent when the user starts to actively scrub the nav bar to switch tasks. Once this event is 61 * sent the caller will stop sending any motion events and will no longer preemptively cancel 62 * any recents animations started as a part of the motion event handling. 63 * 64 * @deprecated 65 */ onQuickScrubStart()66 void onQuickScrubStart() = 3; 67 68 /** 69 * Sent when the user stops actively scrubbing the nav bar to switch tasks. 70 * 71 * @deprecated 72 */ onQuickScrubEnd()73 void onQuickScrubEnd() = 4; 74 75 /** 76 * Sent for each movement over the nav bar while the user is scrubbing it to switch tasks. 77 * 78 * @deprecated 79 */ onQuickScrubProgress(float progress)80 void onQuickScrubProgress(float progress) = 5; 81 82 /** 83 * Sent when overview button is pressed to toggle show/hide of overview. 84 */ onOverviewToggle()85 void onOverviewToggle() = 6; 86 87 /** 88 * Sent when overview is to be shown. 89 */ onOverviewShown(boolean triggeredFromAltTab)90 void onOverviewShown(boolean triggeredFromAltTab) = 7; 91 92 /** 93 * Sent when overview is to be hidden. 94 */ onOverviewHidden(boolean triggeredFromAltTab, boolean triggeredFromHomeKey)95 void onOverviewHidden(boolean triggeredFromAltTab, boolean triggeredFromHomeKey) = 8; 96 97 /** 98 * Sent when a user swipes up over the navigation bar to launch overview. Swipe up is determined 99 * by passing the touch slop in the direction towards launcher from navigation bar. During and 100 * after this event is sent the caller will continue to send motion events. The motion 101 * {@param event} passed after the touch slop was exceeded will also be passed after by 102 * {@link onMotionEvent}. Since motion events will be sent, motion up or cancel can still be 103 * sent to cancel overview regardless the current state of launcher (eg. if overview is already 104 * visible, this event will still be sent if user swipes up). When this signal is sent, 105 * navigation bar will not handle any gestures such as quick scrub and the home button will 106 * cancel (long) press. 107 * 108 * @deprecated 109 */ 110 void onQuickStep(in MotionEvent event) = 9; 111 112 /** 113 * Sent when there was an action on one of the onboarding tips view. 114 */ onTip(int actionType, int viewType)115 void onTip(int actionType, int viewType) = 10; 116 117 /** 118 * Sent when device assistant changes its default assistant whether it is available or not. 119 */ onAssistantAvailable(boolean available)120 void onAssistantAvailable(boolean available) = 13; 121 122 /** 123 * Sent when the assistant changes how visible it is to the user. 124 */ onAssistantVisibilityChanged(float visibility)125 void onAssistantVisibilityChanged(float visibility) = 14; 126 127 /** 128 * Sent when back is triggered. 129 */ onBackAction(boolean completed, int downX, int downY, boolean isButton, boolean gestureSwipeLeft)130 void onBackAction(boolean completed, int downX, int downY, boolean isButton, 131 boolean gestureSwipeLeft) = 15; 132 133 /** 134 * Sent when some system ui state changes. 135 */ onSystemUiStateChanged(int stateFlags)136 void onSystemUiStateChanged(int stateFlags) = 16; 137 } 138