QS.java revision e5b770e47d44a40d412c7d42010b2cf67920d9e3
1/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
5 * except in compliance with the License. You may obtain a copy of the License at
6 *
7 *      http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software distributed under the
10 * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
11 * KIND, either express or implied. See the License for the specific language governing
12 * permissions and limitations under the License.
13 */
14
15package com.android.systemui.plugins.qs;
16
17import android.view.View;
18import android.view.View.OnClickListener;
19import android.view.ViewGroup;
20
21import com.android.systemui.plugins.FragmentBase;
22import com.android.systemui.plugins.annotations.DependsOn;
23import com.android.systemui.plugins.annotations.ProvidesInterface;
24import com.android.systemui.plugins.qs.QS.HeightListener;
25
26/**
27 * Fragment that contains QS in the notification shade.  Most of the interface is for
28 * handling the expand/collapsing of the view interaction.
29 */
30@ProvidesInterface(action = QS.ACTION, version = QS.VERSION)
31@DependsOn(target = HeightListener.class)
32public interface QS extends FragmentBase {
33
34    public static final String ACTION = "com.android.systemui.action.PLUGIN_QS";
35
36    public static final int VERSION = 6;
37
38    String TAG = "QS";
39
40    void setPanelView(HeightListener notificationPanelView);
41
42    void hideImmediately();
43    int getQsMinExpansionHeight();
44    int getDesiredHeight();
45    void setHeightOverride(int desiredHeight);
46    void setHeaderClickable(boolean qsExpansionEnabled);
47    boolean isCustomizing();
48    void setOverscrolling(boolean overscrolling);
49    void setExpanded(boolean qsExpanded);
50    void setListening(boolean listening);
51    boolean isShowingDetail();
52    void closeDetail();
53    void setKeyguardShowing(boolean keyguardShowing);
54    void animateHeaderSlidingIn(long delay);
55    void animateHeaderSlidingOut();
56    void setQsExpansion(float qsExpansionFraction, float headerTranslation);
57    void setHeaderListening(boolean listening);
58    void notifyCustomizeChanged();
59
60    void setContainer(ViewGroup container);
61    void setExpandClickListener(OnClickListener onClickListener);
62
63    View getHeader();
64
65    @ProvidesInterface(version = HeightListener.VERSION)
66    public interface HeightListener {
67        public static final int VERSION = 1;
68        void onQsHeightChanged();
69    }
70
71}
72