Robert Snoeberger | b6464ea | 2020-03-20 11:56:22 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2020 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.statusbar.notification.stack; |
| 18 | |
Selim Cinek | 4b9710e | 2020-05-26 15:54:24 -0700 | [diff] [blame] | 19 | import android.animation.AnimatorListenerAdapter; |
Robert Snoeberger | b6464ea | 2020-03-20 11:56:22 -0400 | [diff] [blame] | 20 | import android.content.Context; |
| 21 | import android.util.AttributeSet; |
Selim Cinek | 5dbef2d | 2020-05-07 17:44:38 -0700 | [diff] [blame] | 22 | import android.view.ViewGroup; |
Robert Snoeberger | b6464ea | 2020-03-20 11:56:22 -0400 | [diff] [blame] | 23 | |
Selim Cinek | 4b9710e | 2020-05-26 15:54:24 -0700 | [diff] [blame] | 24 | import com.android.systemui.statusbar.notification.row.ExpandableView; |
Robert Snoeberger | b6464ea | 2020-03-20 11:56:22 -0400 | [diff] [blame] | 25 | |
| 26 | /** |
| 27 | * Root view to insert Lock screen media controls into the notification stack. |
| 28 | */ |
Selim Cinek | 4b9710e | 2020-05-26 15:54:24 -0700 | [diff] [blame] | 29 | public class MediaHeaderView extends ExpandableView { |
Robert Snoeberger | b6464ea | 2020-03-20 11:56:22 -0400 | [diff] [blame] | 30 | |
| 31 | public MediaHeaderView(Context context, AttributeSet attrs) { |
| 32 | super(context, attrs); |
| 33 | } |
| 34 | |
| 35 | @Override |
Selim Cinek | 4b9710e | 2020-05-26 15:54:24 -0700 | [diff] [blame] | 36 | public long performRemoveAnimation(long duration, long delay, float translationDirection, |
| 37 | boolean isHeadsUpAnimation, float endLocation, Runnable onFinishedRunnable, |
| 38 | AnimatorListenerAdapter animationListener) { |
| 39 | return 0; |
Robert Snoeberger | b6464ea | 2020-03-20 11:56:22 -0400 | [diff] [blame] | 40 | } |
| 41 | |
| 42 | @Override |
Selim Cinek | 4b9710e | 2020-05-26 15:54:24 -0700 | [diff] [blame] | 43 | public void performAddAnimation(long delay, long duration, boolean isHeadsUpAppear) { |
| 44 | // No animation, it doesn't need it, this would be local |
Robert Snoeberger | b6464ea | 2020-03-20 11:56:22 -0400 | [diff] [blame] | 45 | } |
Selim Cinek | 5dbef2d | 2020-05-07 17:44:38 -0700 | [diff] [blame] | 46 | |
Selim Cinek | 2d7be5f | 2020-05-01 13:16:01 -0700 | [diff] [blame] | 47 | public void setContentView(ViewGroup contentView) { |
Selim Cinek | 2d7be5f | 2020-05-01 13:16:01 -0700 | [diff] [blame] | 48 | addView(contentView); |
| 49 | ViewGroup.LayoutParams layoutParams = contentView.getLayoutParams(); |
Selim Cinek | 5dbef2d | 2020-05-07 17:44:38 -0700 | [diff] [blame] | 50 | layoutParams.height = ViewGroup.LayoutParams.WRAP_CONTENT; |
| 51 | layoutParams.width = ViewGroup.LayoutParams.MATCH_PARENT; |
| 52 | } |
Robert Snoeberger | b6464ea | 2020-03-20 11:56:22 -0400 | [diff] [blame] | 53 | } |