1 /* 2 * Copyright (C) 2022 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.wm.shell.back; 18 19 import android.window.IOnBackInvokedCallback; 20 21 /** 22 * Interface for Launcher process to register back invocation callbacks. 23 */ 24 interface IBackAnimation { 25 26 /** 27 * Sets a {@link IOnBackInvokedCallback} to be invoked when 28 * back navigation has type {@link BackNavigationInfo#TYPE_RETURN_TO_HOME}. 29 */ setBackToLauncherCallback(in IOnBackInvokedCallback callback)30 void setBackToLauncherCallback(in IOnBackInvokedCallback callback); 31 32 /** 33 * Clears the previously registered {@link IOnBackInvokedCallback}. 34 */ clearBackToLauncherCallback()35 void clearBackToLauncherCallback(); 36 37 /** 38 * Notifies Shell that the back to launcher animation has fully finished 39 * (including the transition animation that runs after the finger is lifted). 40 * 41 * At this point the top window leash (if one was created) should be ready to be released. 42 * //TODO: Remove once we play the transition animation through shell transitions. 43 */ onBackToLauncherAnimationFinished()44 void onBackToLauncherAnimationFinished(); 45 } 46