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 15 package com.android.systemui.plugins.qs; 16 17 import android.view.View; 18 import android.view.View.OnClickListener; 19 import android.view.ViewGroup; 20 21 import com.android.systemui.plugins.FragmentBase; 22 import com.android.systemui.plugins.annotations.DependsOn; 23 import com.android.systemui.plugins.annotations.ProvidesInterface; 24 import 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) 32 public 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 setPanelView(HeightListener notificationPanelView)40 void setPanelView(HeightListener notificationPanelView); 41 hideImmediately()42 void hideImmediately(); getQsMinExpansionHeight()43 int getQsMinExpansionHeight(); getDesiredHeight()44 int getDesiredHeight(); setHeightOverride(int desiredHeight)45 void setHeightOverride(int desiredHeight); setHeaderClickable(boolean qsExpansionEnabled)46 void setHeaderClickable(boolean qsExpansionEnabled); isCustomizing()47 boolean isCustomizing(); setOverscrolling(boolean overscrolling)48 void setOverscrolling(boolean overscrolling); setExpanded(boolean qsExpanded)49 void setExpanded(boolean qsExpanded); setListening(boolean listening)50 void setListening(boolean listening); isShowingDetail()51 boolean isShowingDetail(); closeDetail()52 void closeDetail(); setKeyguardShowing(boolean keyguardShowing)53 void setKeyguardShowing(boolean keyguardShowing); animateHeaderSlidingIn(long delay)54 void animateHeaderSlidingIn(long delay); animateHeaderSlidingOut()55 void animateHeaderSlidingOut(); setQsExpansion(float qsExpansionFraction, float headerTranslation)56 void setQsExpansion(float qsExpansionFraction, float headerTranslation); setHeaderListening(boolean listening)57 void setHeaderListening(boolean listening); notifyCustomizeChanged()58 void notifyCustomizeChanged(); 59 setContainer(ViewGroup container)60 void setContainer(ViewGroup container); setExpandClickListener(OnClickListener onClickListener)61 void setExpandClickListener(OnClickListener onClickListener); 62 getHeader()63 View getHeader(); 64 setHasNotifications(boolean hasNotifications)65 default void setHasNotifications(boolean hasNotifications) { 66 } 67 68 @ProvidesInterface(version = HeightListener.VERSION) 69 public interface HeightListener { 70 public static final int VERSION = 1; onQsHeightChanged()71 void onQsHeightChanged(); 72 } 73 74 } 75