• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.freeform;
18 
19 import android.os.IBinder;
20 import android.window.WindowContainerTransaction;
21 
22 /**
23  * The interface around {@link FreeformTaskTransitionHandler} for task listeners to start freeform
24  * task transitions.
25  */
26 public interface FreeformTaskTransitionStarter {
27 
28     /**
29      * Starts a windowing mode transition.
30      *
31      * @param targetWindowingMode the target windowing mode
32      * @param wct the {@link WindowContainerTransaction} that changes the windowing mode
33      *
34      */
startWindowingModeTransition(int targetWindowingMode, WindowContainerTransaction wct)35     void startWindowingModeTransition(int targetWindowingMode, WindowContainerTransaction wct);
36 
37     /**
38      * Starts window minimization transition
39      *
40      * @param wct the {@link WindowContainerTransaction} that changes the windowing mode
41      * @param taskId the task id of the task being minimized
42      * @param isLastTask true if the task being minimized is the last visible task
43      *
44      * @return the started transition
45      */
startMinimizedModeTransition( WindowContainerTransaction wct, int taskId, boolean isLastTask)46     IBinder startMinimizedModeTransition(
47             WindowContainerTransaction wct, int taskId, boolean isLastTask);
48 
49     /**
50      * Starts close window transition
51      *
52      * @param wct the {@link WindowContainerTransaction} that closes the task
53      *
54      * @return the started transition
55      */
startRemoveTransition(WindowContainerTransaction wct)56     IBinder startRemoveTransition(WindowContainerTransaction wct);
57 
58     /**
59      * Starts PiP transition
60      *
61      * @param wct the {@link WindowContainerTransaction} that launches the PiP
62      *
63      * @return the started transition
64      */
startPipTransition(WindowContainerTransaction wct)65     IBinder startPipTransition(WindowContainerTransaction wct);
66 }
67