1 /*
2  * Copyright (C) 2018 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.system;
18 
19 import android.view.IDockedStackListener;
20 
21 /**
22  * An interface to track docked stack changes.
23  */
24 public class DockedStackListenerCompat {
25 
26     IDockedStackListener.Stub mListener = new IDockedStackListener.Stub() {
27         @Override
28         public void onDividerVisibilityChanged(boolean visible) {}
29 
30         @Override
31         public void onDockedStackExistsChanged(boolean exists) {
32             DockedStackListenerCompat.this.onDockedStackExistsChanged(exists);
33         }
34 
35         @Override
36         public void onDockedStackMinimizedChanged(boolean minimized, long animDuration,
37                 boolean isHomeStackResizable) {
38             DockedStackListenerCompat.this.onDockedStackMinimizedChanged(minimized, animDuration,
39                     isHomeStackResizable);
40         }
41 
42         @Override
43         public void onAdjustedForImeChanged(boolean adjustedForIme, long animDuration) {}
44 
45         @Override
46         public void onDockSideChanged(final int newDockSide) {
47             DockedStackListenerCompat.this.onDockSideChanged(newDockSide);
48         }
49     };
50 
onDockedStackExistsChanged(boolean exists)51     public void onDockedStackExistsChanged(boolean exists) {
52         // To be overridden
53     }
54 
onDockedStackMinimizedChanged(boolean minimized, long animDuration, boolean isHomeStackResizable)55     public void onDockedStackMinimizedChanged(boolean minimized, long animDuration,
56             boolean isHomeStackResizable) {
57         // To be overridden
58     }
59 
onDockSideChanged(final int newDockSide)60     public void onDockSideChanged(final int newDockSide) {
61         // To be overridden
62     }
63 }
64