1 /**
2  * Copyright (c) 2015, 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 android.view;
18 
19 /**
20   * Listener for showing/hiding of the dock divider. Will fire when an app is shown in side by side
21   * mode and a divider should be shown.
22   *
23   * @hide
24   */
25 oneway interface IDockedStackListener {
26 
27     /**
28      * Will fire when an app is shown in side by side mode and a divider should be shown.
29      */
onDividerVisibilityChanged(boolean visible)30     void onDividerVisibilityChanged(boolean visible);
31 
32     /**
33      * Called when the docked stack gets created or removed.
34      */
onDockedStackExistsChanged(boolean exists)35     void onDockedStackExistsChanged(boolean exists);
36 
37     /**
38      * Called when window manager decides to minimize the docked stack. The divider should make
39      * itself not interactable and shrink a bit in this state.
40      *
41      * @param minimized Whether the docked stack is currently minimized.
42      * @param animDuration The duration of the animation for changing the minimized state.
43      * @param isHomeStackResizable If the home stack is resizable, a portion of the docked stack
44      *        will be shown with the divider
45      */
onDockedStackMinimizedChanged(boolean minimized, long animDuration, boolean isHomeStackResizable)46     void onDockedStackMinimizedChanged(boolean minimized, long animDuration,
47             boolean isHomeStackResizable);
48 
49     /**
50      * Called when window manager decides to adjust the divider for IME. Like the minimized state,
51      * the divider should make itself not interactable and shrink a bit, but in a different way.s
52      *
53      * @param minimized Whether the stacks are currently adjusted for the IME
54      * @param animDuration The duration of the animation for changing the adjusted state.
55      */
onAdjustedForImeChanged(boolean adjustedForIme, long animDuration)56     void onAdjustedForImeChanged(boolean adjustedForIme, long animDuration);
57 
58     /**
59      * Called when window manager repositioned the docked stack after a screen rotation change.
60      */
onDockSideChanged(int newDockSide)61     void onDockSideChanged(int newDockSide);
62 }
63