Jason Monk | 3d5f551 | 2014-07-25 11:17:28 -0400 | [diff] [blame] | 1 | /* |
Anthony Chen | 54daefe | 2017-04-07 17:19:54 -0700 | [diff] [blame] | 2 | * Copyright (C) 2017 The Android Open Source Project |
Jason Monk | 3d5f551 | 2014-07-25 11:17:28 -0400 | [diff] [blame] | 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 |
Jason Monk | e5b770e | 2017-03-03 21:49:29 -0500 | [diff] [blame] | 14 | * limitations under the License |
Jason Monk | 3d5f551 | 2014-07-25 11:17:28 -0400 | [diff] [blame] | 15 | */ |
| 16 | package com.android.systemui.qs; |
| 17 | |
Jason Monk | 3d5f551 | 2014-07-25 11:17:28 -0400 | [diff] [blame] | 18 | import android.view.View; |
Jason Monk | 3d5f551 | 2014-07-25 11:17:28 -0400 | [diff] [blame] | 19 | |
Gus Prevas | ab33679 | 2018-11-14 13:52:20 -0500 | [diff] [blame] | 20 | import androidx.annotation.Nullable; |
| 21 | |
Anthony Chen | 54daefe | 2017-04-07 17:19:54 -0700 | [diff] [blame] | 22 | /** |
| 23 | * The bottom footer of the quick settings panel. |
| 24 | */ |
| 25 | public interface QSFooter { |
| 26 | /** |
| 27 | * Sets the given {@link QSPanel} to be the one that will display the quick settings. |
| 28 | */ |
| 29 | void setQSPanel(@Nullable QSPanel panel); |
Jason Monk | 3d5f551 | 2014-07-25 11:17:28 -0400 | [diff] [blame] | 30 | |
Anthony Chen | 54daefe | 2017-04-07 17:19:54 -0700 | [diff] [blame] | 31 | /** |
Fabian Kozynski | c8d8f05 | 2019-09-09 09:15:04 -0400 | [diff] [blame] | 32 | * Sets the given {@link QuickQSPanel} to be the one associated with quick settings. |
| 33 | */ |
| 34 | default void setQQSPanel(@Nullable QuickQSPanel panel) {}; |
| 35 | |
| 36 | /** |
Anthony Chen | 54daefe | 2017-04-07 17:19:54 -0700 | [diff] [blame] | 37 | * Sets whether or not the footer should be visible. |
| 38 | * |
| 39 | * @param visibility One of {@link View#VISIBLE}, {@link View#INVISIBLE} or {@link View#GONE}. |
| 40 | * @see View#setVisibility(int) |
| 41 | */ |
| 42 | void setVisibility(int visibility); |
Robin Lee | a249aee | 2016-02-03 13:42:56 +0000 | [diff] [blame] | 43 | |
Anthony Chen | 54daefe | 2017-04-07 17:19:54 -0700 | [diff] [blame] | 44 | /** |
| 45 | * Sets whether the footer is in an expanded state. |
| 46 | */ |
| 47 | void setExpanded(boolean expanded); |
Jason Monk | 3d5f551 | 2014-07-25 11:17:28 -0400 | [diff] [blame] | 48 | |
Anthony Chen | 54daefe | 2017-04-07 17:19:54 -0700 | [diff] [blame] | 49 | /** |
| 50 | * Returns the full height of the footer. |
| 51 | */ |
| 52 | int getHeight(); |
Jason Monk | 3d5f551 | 2014-07-25 11:17:28 -0400 | [diff] [blame] | 53 | |
Anthony Chen | 54daefe | 2017-04-07 17:19:54 -0700 | [diff] [blame] | 54 | /** |
| 55 | * Sets the percentage amount that the quick settings has been expanded. |
| 56 | * |
| 57 | * @param expansion A value from 1 to 0 that indicates how much the quick settings have been |
| 58 | * expanded. 1 is fully expanded. |
| 59 | */ |
| 60 | void setExpansion(float expansion); |
Jason Monk | 3d5f551 | 2014-07-25 11:17:28 -0400 | [diff] [blame] | 61 | |
Anthony Chen | 54daefe | 2017-04-07 17:19:54 -0700 | [diff] [blame] | 62 | /** |
| 63 | * Sets whether or not this footer should set itself to listen for changes in any callbacks |
| 64 | * that it has implemented. |
| 65 | */ |
| 66 | void setListening(boolean listening); |
Jason Monk | b1c2f3b | 2014-08-20 10:17:00 -0400 | [diff] [blame] | 67 | |
Anthony Chen | 54daefe | 2017-04-07 17:19:54 -0700 | [diff] [blame] | 68 | /** |
| 69 | * Sets whether or not the keyguard is currently being shown. |
| 70 | */ |
| 71 | void setKeyguardShowing(boolean keyguardShowing); |
Jason Monk | e5b770e | 2017-03-03 21:49:29 -0500 | [diff] [blame] | 72 | |
Anthony Chen | 54daefe | 2017-04-07 17:19:54 -0700 | [diff] [blame] | 73 | /** |
Amin Shaikh | 8a3e23c | 2018-04-17 11:14:32 -0400 | [diff] [blame] | 74 | * Sets the {@link android.view.View.OnClickListener to be used on elements that expend QS. |
Anthony Chen | 54daefe | 2017-04-07 17:19:54 -0700 | [diff] [blame] | 75 | */ |
Amin Shaikh | 8a3e23c | 2018-04-17 11:14:32 -0400 | [diff] [blame] | 76 | void setExpandClickListener(View.OnClickListener onClickListener); |
Amin Shaikh | f09450b | 2018-04-06 17:32:45 -0400 | [diff] [blame] | 77 | |
| 78 | default void disable(int state1, int state2, boolean animate) {} |
Jason Monk | 3d5f551 | 2014-07-25 11:17:28 -0400 | [diff] [blame] | 79 | } |