blob: 040f707e12f109b6a35b964d5eae46778f500358 [file] [log] [blame]
Robert Snoebergerb6464ea2020-03-20 11:56:22 -04001/*
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
17package com.android.systemui.statusbar.notification.stack;
18
Selim Cinek4b9710e2020-05-26 15:54:24 -070019import android.animation.AnimatorListenerAdapter;
Robert Snoebergerb6464ea2020-03-20 11:56:22 -040020import android.content.Context;
21import android.util.AttributeSet;
Selim Cinek5dbef2d2020-05-07 17:44:38 -070022import android.view.ViewGroup;
Robert Snoebergerb6464ea2020-03-20 11:56:22 -040023
Selim Cinek4b9710e2020-05-26 15:54:24 -070024import com.android.systemui.statusbar.notification.row.ExpandableView;
Robert Snoebergerb6464ea2020-03-20 11:56:22 -040025
26/**
27 * Root view to insert Lock screen media controls into the notification stack.
28 */
Selim Cinek4b9710e2020-05-26 15:54:24 -070029public class MediaHeaderView extends ExpandableView {
Robert Snoebergerb6464ea2020-03-20 11:56:22 -040030
31 public MediaHeaderView(Context context, AttributeSet attrs) {
32 super(context, attrs);
33 }
34
35 @Override
Selim Cinek4b9710e2020-05-26 15:54:24 -070036 public long performRemoveAnimation(long duration, long delay, float translationDirection,
37 boolean isHeadsUpAnimation, float endLocation, Runnable onFinishedRunnable,
38 AnimatorListenerAdapter animationListener) {
39 return 0;
Robert Snoebergerb6464ea2020-03-20 11:56:22 -040040 }
41
42 @Override
Selim Cinek4b9710e2020-05-26 15:54:24 -070043 public void performAddAnimation(long delay, long duration, boolean isHeadsUpAppear) {
44 // No animation, it doesn't need it, this would be local
Robert Snoebergerb6464ea2020-03-20 11:56:22 -040045 }
Selim Cinek5dbef2d2020-05-07 17:44:38 -070046
Selim Cinek2d7be5f2020-05-01 13:16:01 -070047 public void setContentView(ViewGroup contentView) {
Selim Cinek2d7be5f2020-05-01 13:16:01 -070048 addView(contentView);
49 ViewGroup.LayoutParams layoutParams = contentView.getLayoutParams();
Selim Cinek5dbef2d2020-05-07 17:44:38 -070050 layoutParams.height = ViewGroup.LayoutParams.WRAP_CONTENT;
51 layoutParams.width = ViewGroup.LayoutParams.MATCH_PARENT;
52 }
Robert Snoebergerb6464ea2020-03-20 11:56:22 -040053}