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
17package 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  */
25oneway interface IDockedStackListener {
26
27    /**
28     * Will fire when an app is shown in side by side mode and a divider should be shown.
29     */
30    void onDividerVisibilityChanged(boolean visible);
31
32    /**
33     * Called when the docked stack gets created or removed.
34     */
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     */
44    void onDockedStackMinimizedChanged(boolean minimized, long animDuration);
45
46    /**
47     * Called when window manager decides to adjust the divider for IME. Like the minimized state,
48     * the divider should make itself not interactable and shrink a bit, but in a different way.s
49     *
50     * @param minimized Whether the stacks are currently adjusted for the IME
51     * @param animDuration The duration of the animation for changing the adjusted state.
52     */
53    void onAdjustedForImeChanged(boolean adjustedForIme, long animDuration);
54
55    /**
56     * Called when window manager repositioned the docked stack after a screen rotation change.
57     */
58    void onDockSideChanged(int newDockSide);
59}
60