From 1e59f2412d716adece672e8fe6a4784a3b3f4814 Mon Sep 17 00:00:00 2001 From: Jaewan Kim Date: Thu, 7 Apr 2016 16:22:49 +0900 Subject: [PATCH] PIP: Implement focus change animation in PIP control buttons This includes following animation. - Fix focus change animation duration among the PIP control buttons - Apply ripple animation for PIP control buttons - PIP menu enter/exit animation. Bug: 27677096 Change-Id: I2f992416efc8a0994eeb56d5dec00201fd08a7aa --- ...ip_controls_text_focus_gain_animation.xml} | 2 +- ...ip_controls_text_focus_lose_animation.xml} | 2 +- .../anim/tv_pip_menu_fade_in_animation.xml | 21 +++ .../anim/tv_pip_menu_fade_out_animation.xml | 21 +++ .../res/drawable/tv_pip_button_focused.xml | 10 +- .../res/drawable/tv_pip_close_button.xml | 38 ----- .../res/drawable/tv_pip_full_button.xml | 38 ----- .../res/drawable/tv_pip_pause_button.xml | 38 ----- .../res/drawable/tv_pip_play_button.xml | 38 ----- .../res/layout/tv_pip_control_button.xml | 42 ++++++ .../SystemUI/res/layout/tv_pip_controls.xml | 75 ++------- packages/SystemUI/res/layout/tv_pip_menu.xml | 3 +- packages/SystemUI/res/values/dimens_tv.xml | 2 - .../systemui/tv/pip/PipControlButtonView.java | 142 ++++++++++++++++++ .../systemui/tv/pip/PipControlsView.java | 84 ++++------- .../systemui/tv/pip/PipMenuActivity.java | 23 ++- .../tv/pip/PipRecentsControlsView.java | 21 +-- .../tv/pip/PipRecentsOverlayManager.java | 2 - 18 files changed, 302 insertions(+), 300 deletions(-) rename packages/SystemUI/res/anim/{tv_pip_controls_text_in_recents_focus_gain_animation.xml => tv_pip_controls_text_focus_gain_animation.xml} (92%) rename packages/SystemUI/res/anim/{tv_pip_controls_text_in_recents_focus_lose_animation.xml => tv_pip_controls_text_focus_lose_animation.xml} (92%) create mode 100644 packages/SystemUI/res/anim/tv_pip_menu_fade_in_animation.xml create mode 100644 packages/SystemUI/res/anim/tv_pip_menu_fade_out_animation.xml delete mode 100644 packages/SystemUI/res/drawable/tv_pip_close_button.xml delete mode 100644 packages/SystemUI/res/drawable/tv_pip_full_button.xml delete mode 100644 packages/SystemUI/res/drawable/tv_pip_pause_button.xml delete mode 100644 packages/SystemUI/res/drawable/tv_pip_play_button.xml create mode 100644 packages/SystemUI/res/layout/tv_pip_control_button.xml create mode 100644 packages/SystemUI/src/com/android/systemui/tv/pip/PipControlButtonView.java diff --git a/packages/SystemUI/res/anim/tv_pip_controls_text_in_recents_focus_gain_animation.xml b/packages/SystemUI/res/anim/tv_pip_controls_text_focus_gain_animation.xml similarity index 92% rename from packages/SystemUI/res/anim/tv_pip_controls_text_in_recents_focus_gain_animation.xml rename to packages/SystemUI/res/anim/tv_pip_controls_text_focus_gain_animation.xml index 681ff917b6468..257bf35c8e766 100644 --- a/packages/SystemUI/res/anim/tv_pip_controls_text_in_recents_focus_gain_animation.xml +++ b/packages/SystemUI/res/anim/tv_pip_controls_text_focus_gain_animation.xml @@ -18,4 +18,4 @@ android:propertyName="alpha" android:valueTo="1" android:interpolator="@android:interpolator/fast_out_slow_in" - android:duration="@integer/recents_tv_pip_focus_anim_duration" /> + android:duration="100" /> diff --git a/packages/SystemUI/res/anim/tv_pip_controls_text_in_recents_focus_lose_animation.xml b/packages/SystemUI/res/anim/tv_pip_controls_text_focus_lose_animation.xml similarity index 92% rename from packages/SystemUI/res/anim/tv_pip_controls_text_in_recents_focus_lose_animation.xml rename to packages/SystemUI/res/anim/tv_pip_controls_text_focus_lose_animation.xml index e6deb0f0bfdc5..e032008b37508 100644 --- a/packages/SystemUI/res/anim/tv_pip_controls_text_in_recents_focus_lose_animation.xml +++ b/packages/SystemUI/res/anim/tv_pip_controls_text_focus_lose_animation.xml @@ -18,4 +18,4 @@ android:propertyName="alpha" android:valueTo="0" android:interpolator="@android:interpolator/fast_out_slow_in" - android:duration="@integer/recents_tv_pip_focus_anim_duration" /> + android:duration="100" /> diff --git a/packages/SystemUI/res/anim/tv_pip_menu_fade_in_animation.xml b/packages/SystemUI/res/anim/tv_pip_menu_fade_in_animation.xml new file mode 100644 index 0000000000000..257bf35c8e766 --- /dev/null +++ b/packages/SystemUI/res/anim/tv_pip_menu_fade_in_animation.xml @@ -0,0 +1,21 @@ + + + + diff --git a/packages/SystemUI/res/anim/tv_pip_menu_fade_out_animation.xml b/packages/SystemUI/res/anim/tv_pip_menu_fade_out_animation.xml new file mode 100644 index 0000000000000..e032008b37508 --- /dev/null +++ b/packages/SystemUI/res/anim/tv_pip_menu_fade_out_animation.xml @@ -0,0 +1,21 @@ + + + + diff --git a/packages/SystemUI/res/drawable/tv_pip_button_focused.xml b/packages/SystemUI/res/drawable/tv_pip_button_focused.xml index 405ea0cb9fbcd..0db1a57a0973c 100644 --- a/packages/SystemUI/res/drawable/tv_pip_button_focused.xml +++ b/packages/SystemUI/res/drawable/tv_pip_button_focused.xml @@ -14,11 +14,5 @@ limitations under the License. --> - - - - + diff --git a/packages/SystemUI/res/drawable/tv_pip_close_button.xml b/packages/SystemUI/res/drawable/tv_pip_close_button.xml deleted file mode 100644 index 186a4bae89427..0000000000000 --- a/packages/SystemUI/res/drawable/tv_pip_close_button.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/packages/SystemUI/res/drawable/tv_pip_full_button.xml b/packages/SystemUI/res/drawable/tv_pip_full_button.xml deleted file mode 100644 index c48dc8287546e..0000000000000 --- a/packages/SystemUI/res/drawable/tv_pip_full_button.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/packages/SystemUI/res/drawable/tv_pip_pause_button.xml b/packages/SystemUI/res/drawable/tv_pip_pause_button.xml deleted file mode 100644 index bcc89739474a0..0000000000000 --- a/packages/SystemUI/res/drawable/tv_pip_pause_button.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/packages/SystemUI/res/drawable/tv_pip_play_button.xml b/packages/SystemUI/res/drawable/tv_pip_play_button.xml deleted file mode 100644 index f77ea1df1c538..0000000000000 --- a/packages/SystemUI/res/drawable/tv_pip_play_button.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/packages/SystemUI/res/layout/tv_pip_control_button.xml b/packages/SystemUI/res/layout/tv_pip_control_button.xml new file mode 100644 index 0000000000000..0beeda1977633 --- /dev/null +++ b/packages/SystemUI/res/layout/tv_pip_control_button.xml @@ -0,0 +1,42 @@ + + + + + + + + + + diff --git a/packages/SystemUI/res/layout/tv_pip_controls.xml b/packages/SystemUI/res/layout/tv_pip_controls.xml index 563441ff3e35c..77450e60aeaa4 100644 --- a/packages/SystemUI/res/layout/tv_pip_controls.xml +++ b/packages/SystemUI/res/layout/tv_pip_controls.xml @@ -20,77 +20,26 @@ - + android:src="@drawable/ic_fullscreen_white_24dp" + android:text="@string/pip_fullscreen" /> - - - - - - + android:src="@drawable/ic_close_white" + android:text="@string/pip_close" /> - - - - - - - - - - - + android:src="@drawable/ic_pause_white_24dp" + android:text="@string/pip_pause" /> diff --git a/packages/SystemUI/res/layout/tv_pip_menu.xml b/packages/SystemUI/res/layout/tv_pip_menu.xml index 2647a99632c1e..72a4929c835bf 100644 --- a/packages/SystemUI/res/layout/tv_pip_menu.xml +++ b/packages/SystemUI/res/layout/tv_pip_menu.xml @@ -29,5 +29,6 @@ + android:layout_height="wrap_content" + android:alpha="0" /> diff --git a/packages/SystemUI/res/values/dimens_tv.xml b/packages/SystemUI/res/values/dimens_tv.xml index f536f86a40a07..e938d09161273 100644 --- a/packages/SystemUI/res/values/dimens_tv.xml +++ b/packages/SystemUI/res/values/dimens_tv.xml @@ -54,8 +54,6 @@ 3dp - - 5dp 125dip diff --git a/packages/SystemUI/src/com/android/systemui/tv/pip/PipControlButtonView.java b/packages/SystemUI/src/com/android/systemui/tv/pip/PipControlButtonView.java new file mode 100644 index 0000000000000..c65415ee5273c --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/tv/pip/PipControlButtonView.java @@ -0,0 +1,142 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.tv.pip; + +import android.animation.Animator; +import android.animation.AnimatorInflater; +import android.content.Context; +import android.content.res.TypedArray; +import android.util.AttributeSet; +import android.view.Gravity; +import android.view.LayoutInflater; +import android.view.View.OnFocusChangeListener; +import android.view.View; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.TextView; + +import com.android.systemui.R; + +/** + * A view containing PIP controls including fullscreen, close, and media controls. + */ +public class PipControlButtonView extends LinearLayout { + private OnFocusChangeListener mFocusChangeListener; + private ImageView mButtonImageView; + private TextView mDescriptionTextView; + private Animator mFocusGainAnimator; + private Animator mFocusLoseAnimator; + + private final OnFocusChangeListener mInternalFocusChangeListener = + new OnFocusChangeListener() { + @Override + public void onFocusChange(View v, boolean hasFocus) { + if (hasFocus) { + if (mFocusLoseAnimator.isStarted()) { + mFocusLoseAnimator.cancel(); + } + mFocusGainAnimator.start(); + } else { + if (mFocusGainAnimator.isStarted()) { + mFocusGainAnimator.cancel(); + } + mFocusLoseAnimator.start(); + } + + if (mFocusChangeListener != null) { + mFocusChangeListener.onFocusChange(v, hasFocus); + } + } + }; + + public PipControlButtonView(Context context) { + this(context, null, 0, 0); + } + + public PipControlButtonView(Context context, AttributeSet attrs) { + this(context, attrs, 0, 0); + } + + public PipControlButtonView(Context context, AttributeSet attrs, int defStyleAttr) { + this(context, attrs, defStyleAttr, 0); + } + + public PipControlButtonView( + Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { + super(context, attrs, defStyleAttr, defStyleRes); + LayoutInflater inflater = (LayoutInflater) getContext() + .getSystemService(Context.LAYOUT_INFLATER_SERVICE); + inflater.inflate(R.layout.tv_pip_control_button, this); + + setOrientation(LinearLayout.VERTICAL); + setGravity(Gravity.CENTER); + + mButtonImageView = (ImageView) findViewById(R.id.button); + mDescriptionTextView = (TextView) findViewById(R.id.desc); + + int[] values = new int[] {android.R.attr.src, android.R.attr.text}; + TypedArray typedArray = + context.obtainStyledAttributes(attrs, values, defStyleAttr, defStyleRes); + + mButtonImageView.setImageDrawable(typedArray.getDrawable(0)); + mDescriptionTextView.setText(typedArray.getText(1)); + + typedArray.recycle(); + } + + @Override + public void onFinishInflate() { + super.onFinishInflate(); + mButtonImageView.setOnFocusChangeListener(mInternalFocusChangeListener); + + mFocusGainAnimator = AnimatorInflater.loadAnimator(getContext(), + R.anim.tv_pip_controls_text_focus_gain_animation); + mFocusGainAnimator.setTarget(mDescriptionTextView); + mFocusLoseAnimator = AnimatorInflater.loadAnimator(getContext(), + R.anim.tv_pip_controls_text_focus_lose_animation); + mFocusLoseAnimator.setTarget(mDescriptionTextView); + } + + @Override + public void setOnClickListener(OnClickListener listener) { + mButtonImageView.setOnClickListener(listener); + } + + @Override + public void setOnFocusChangeListener(OnFocusChangeListener listener) { + mFocusChangeListener = listener; + } + + /** + * Sets the drawable for the button with the given resource id. + */ + public void setImageResource(int resId) { + mButtonImageView.setImageResource(resId); + } + + /** + * Sets the text for description the with the given resource id. + */ + public void setText(int resId) { + mDescriptionTextView.setText(resId); + } + + @Override + public boolean isFocused() { + return mButtonImageView.isFocused(); + } +} diff --git a/packages/SystemUI/src/com/android/systemui/tv/pip/PipControlsView.java b/packages/SystemUI/src/com/android/systemui/tv/pip/PipControlsView.java index 3f87611fe2d4e..d15799cbc8ac4 100644 --- a/packages/SystemUI/src/com/android/systemui/tv/pip/PipControlsView.java +++ b/packages/SystemUI/src/com/android/systemui/tv/pip/PipControlsView.java @@ -57,13 +57,9 @@ public class PipControlsView extends LinearLayout { final PipManager mPipManager = PipManager.getInstance(); Listener mListener; - View mFullButtonView; - View mFullDescriptionView; - View mPlayPauseView; - ImageView mPlayPauseButtonImageView; - TextView mPlayPauseDescriptionTextView; - View mCloseButtonView; - View mCloseDescriptionView; + PipControlButtonView mFullButtonView; + PipControlButtonView mCloseButtonView; + PipControlButtonView mPlayPauseButtonView; private boolean mHasFocus; private OnFocusChangeListener mOnChildFocusChangeListener; @@ -75,13 +71,20 @@ public class PipControlsView extends LinearLayout { } }; - private PipManager.MediaListener mPipMediaListener = new PipManager.MediaListener() { + private final PipManager.MediaListener mPipMediaListener = new PipManager.MediaListener() { @Override public void onMediaControllerChanged() { updateMediaController(); } }; + private final OnFocusChangeListener mFocusChangeListener = new OnFocusChangeListener() { + @Override + public void onFocusChange(View v, boolean hasFocus) { + onChildViewFocusChanged(); + } + }; + public PipControlsView(Context context) { this(context, null, 0, 0); } @@ -108,26 +111,30 @@ public class PipControlsView extends LinearLayout { public void onFinishInflate() { super.onFinishInflate(); - mFullButtonView = findViewById(R.id.full_button); - mFullDescriptionView = findViewById(R.id.full_desc); + mFullButtonView = (PipControlButtonView) findViewById(R.id.full_button); + mFullButtonView.setOnFocusChangeListener(mFocusChangeListener); mFullButtonView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mPipManager.movePipToFullscreen(); } }); - mFullButtonView.setOnFocusChangeListener(new View.OnFocusChangeListener() { + + mCloseButtonView = (PipControlButtonView) findViewById(R.id.close_button); + mCloseButtonView.setOnFocusChangeListener(mFocusChangeListener); + mCloseButtonView.setOnClickListener(new View.OnClickListener() { @Override - public void onFocusChange(View v, boolean hasFocus) { - mFullDescriptionView.setVisibility(hasFocus ? View.VISIBLE : View.INVISIBLE); - onChildViewFocusChanged(); + public void onClick(View v) { + mPipManager.closePip(); + if (mListener != null) { + mListener.onClosed(); + } } }); - mPlayPauseView = findViewById(R.id.play_pause); - mPlayPauseButtonImageView = (ImageView) findViewById(R.id.play_pause_button); - mPlayPauseDescriptionTextView = (TextView) findViewById(R.id.play_pause_desc); - mPlayPauseButtonImageView.setOnClickListener(new View.OnClickListener() { + mPlayPauseButtonView = (PipControlButtonView) findViewById(R.id.play_pause_button); + mPlayPauseButtonView.setOnFocusChangeListener(mFocusChangeListener); + mPlayPauseButtonView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (mMediaController == null || mMediaController.getPlaybackState() == null) { @@ -143,33 +150,6 @@ public class PipControlsView extends LinearLayout { // View will be updated later in {@link mMediaControllerCallback} } }); - mPlayPauseButtonImageView.setOnFocusChangeListener(new View.OnFocusChangeListener() { - @Override - public void onFocusChange(View v, boolean hasFocus) { - mPlayPauseDescriptionTextView.setVisibility( - hasFocus ? View.VISIBLE : View.INVISIBLE); - onChildViewFocusChanged(); - } - }); - - mCloseButtonView = findViewById(R.id.close_button); - mCloseDescriptionView = findViewById(R.id.close_desc); - mCloseButtonView.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - mPipManager.closePip(); - if (mListener != null) { - mListener.onClosed(); - } - } - }); - mCloseButtonView.setOnFocusChangeListener(new View.OnFocusChangeListener() { - @Override - public void onFocusChange(View v, boolean hasFocus) { - mCloseDescriptionView.setVisibility(hasFocus ? View.VISIBLE : View.INVISIBLE); - onChildViewFocusChanged(); - } - }); } @Override @@ -206,15 +186,15 @@ public class PipControlsView extends LinearLayout { private void updatePlayPauseView() { int state = mPipManager.getPlaybackState(); if (state == PLAYBACK_STATE_UNAVAILABLE) { - mPlayPauseView.setVisibility(View.GONE); + mPlayPauseButtonView.setVisibility(View.GONE); } else { - mPlayPauseView.setVisibility(View.VISIBLE); + mPlayPauseButtonView.setVisibility(View.VISIBLE); if (state == PLAYBACK_STATE_PLAYING) { - mPlayPauseButtonImageView.setImageResource(R.drawable.tv_pip_pause_button); - mPlayPauseDescriptionTextView.setText(R.string.pip_pause); + mPlayPauseButtonView.setImageResource(R.drawable.ic_pause_white_24dp); + mPlayPauseButtonView.setText(R.string.pip_pause); } else { - mPlayPauseButtonImageView.setImageResource(R.drawable.tv_pip_play_button); - mPlayPauseDescriptionTextView.setText(R.string.pip_play); + mPlayPauseButtonView.setImageResource(R.drawable.ic_play_arrow_white_24dp); + mPlayPauseButtonView.setText(R.string.pip_play); } } } @@ -229,7 +209,7 @@ public class PipControlsView extends LinearLayout { private void onChildViewFocusChanged() { // At this moment, hasFocus() returns true although there's no focused child. boolean hasFocus = (mFullButtonView != null && mFullButtonView.isFocused()) - || (mPlayPauseButtonImageView != null && mPlayPauseButtonImageView.isFocused()) + || (mPlayPauseButtonView != null && mPlayPauseButtonView.isFocused()) || (mCloseButtonView != null && mCloseButtonView.isFocused()); if (mHasFocus != hasFocus) { mHasFocus = hasFocus; diff --git a/packages/SystemUI/src/com/android/systemui/tv/pip/PipMenuActivity.java b/packages/SystemUI/src/com/android/systemui/tv/pip/PipMenuActivity.java index 854e09d9d1a6e..542a935b6e125 100644 --- a/packages/SystemUI/src/com/android/systemui/tv/pip/PipMenuActivity.java +++ b/packages/SystemUI/src/com/android/systemui/tv/pip/PipMenuActivity.java @@ -16,10 +16,14 @@ package com.android.systemui.tv.pip; +import android.animation.Animator; +import android.animation.AnimatorInflater; import android.app.Activity; import android.os.Bundle; +import android.view.View; import com.android.systemui.R; +import com.android.systemui.Interpolators; /** * Activity to show the PIP menu to control PIP. @@ -29,7 +33,9 @@ public class PipMenuActivity extends Activity implements PipManager.Listener { private final PipManager mPipManager = PipManager.getInstance(); - private PipControlsView mPipControlsView; + private Animator mFadeInAnimation; + private Animator mFadeOutAnimation; + private View mPipControlsView; private boolean mRestorePipSizeWhenClose; @Override @@ -38,8 +44,14 @@ public class PipMenuActivity extends Activity implements PipManager.Listener { setContentView(R.layout.tv_pip_menu); mPipManager.addListener(this); - mPipControlsView = (PipControlsView) findViewById(R.id.pip_controls); mRestorePipSizeWhenClose = true; + mPipControlsView = (PipControlsView) findViewById(R.id.pip_controls); + mFadeInAnimation = AnimatorInflater.loadAnimator( + this, R.anim.tv_pip_menu_fade_in_animation); + mFadeInAnimation.setTarget(mPipControlsView); + mFadeOutAnimation = AnimatorInflater.loadAnimator( + this, R.anim.tv_pip_menu_fade_out_animation); + mFadeOutAnimation.setTarget(mPipControlsView); } private void restorePipAndFinish() { @@ -50,9 +62,16 @@ public class PipMenuActivity extends Activity implements PipManager.Listener { finish(); } + @Override + public void onResume() { + super.onResume(); + mFadeInAnimation.start(); + } + @Override public void onPause() { super.onPause(); + mFadeOutAnimation.start(); restorePipAndFinish(); } diff --git a/packages/SystemUI/src/com/android/systemui/tv/pip/PipRecentsControlsView.java b/packages/SystemUI/src/com/android/systemui/tv/pip/PipRecentsControlsView.java index 8b8c1058bb991..9c806f7ce59e7 100644 --- a/packages/SystemUI/src/com/android/systemui/tv/pip/PipRecentsControlsView.java +++ b/packages/SystemUI/src/com/android/systemui/tv/pip/PipRecentsControlsView.java @@ -72,28 +72,20 @@ public class PipRecentsControlsView extends PipControlsView { super.onFinishInflate(); int buttonsFocusGainAnim = R.anim.tv_pip_controls_buttons_in_recents_focus_gain_animation; - int textFocusGainAnim = R.anim.tv_pip_controls_text_in_recents_focus_gain_animation; mFocusGainAnimatorSet = new AnimatorSet(); mFocusGainAnimatorSet.playTogether( loadAnimator(this, R.anim.tv_pip_controls_in_recents_focus_gain_animation), loadAnimator(mFullButtonView,buttonsFocusGainAnim), - loadAnimator(mPlayPauseButtonImageView, buttonsFocusGainAnim), - loadAnimator(mCloseButtonView, buttonsFocusGainAnim), - loadAnimator(mFullDescriptionView, textFocusGainAnim), - loadAnimator(mPlayPauseDescriptionTextView, textFocusGainAnim), - loadAnimator(mCloseDescriptionView, textFocusGainAnim)); + loadAnimator(mPlayPauseButtonView, buttonsFocusGainAnim), + loadAnimator(mCloseButtonView, buttonsFocusGainAnim)); int buttonsFocusLoseAnim = R.anim.tv_pip_controls_buttons_in_recents_focus_lose_animation; - int textFocusLoseAnim = R.anim.tv_pip_controls_text_in_recents_focus_lose_animation; mFocusLoseAnimatorSet = new AnimatorSet(); mFocusLoseAnimatorSet.playTogether( loadAnimator(this, R.anim.tv_pip_controls_in_recents_focus_lose_animation), loadAnimator(mFullButtonView, buttonsFocusLoseAnim), - loadAnimator(mPlayPauseButtonImageView, buttonsFocusLoseAnim), - loadAnimator(mCloseButtonView, buttonsFocusLoseAnim), - loadAnimator(mFullDescriptionView, textFocusLoseAnim), - loadAnimator(mPlayPauseDescriptionTextView, textFocusLoseAnim), - loadAnimator(mCloseDescriptionView, textFocusLoseAnim)); + loadAnimator(mPlayPauseButtonView, buttonsFocusLoseAnim), + loadAnimator(mCloseButtonView, buttonsFocusLoseAnim)); Rect pipBounds = mPipManager.getRecentsFocusedPipBounds(); int pipControlsMarginTop = getContext().getResources().getDimensionPixelSize( @@ -142,11 +134,8 @@ public class PipRecentsControlsView extends PipControlsView { requestFocus(); setTranslationY(0); setScaleXY(mFullButtonView, 1); - setScaleXY(mPlayPauseButtonImageView, 1); + setScaleXY(mPlayPauseButtonView, 1); setScaleXY(mCloseButtonView, 1); - mFullDescriptionView.setAlpha(1); - mPlayPauseDescriptionTextView.setAlpha(1); - mCloseDescriptionView.setAlpha(1); } private void setScaleXY(View view, float scale) { diff --git a/packages/SystemUI/src/com/android/systemui/tv/pip/PipRecentsOverlayManager.java b/packages/SystemUI/src/com/android/systemui/tv/pip/PipRecentsOverlayManager.java index 47cd8e5a9b44b..c0e221fa84426 100644 --- a/packages/SystemUI/src/com/android/systemui/tv/pip/PipRecentsOverlayManager.java +++ b/packages/SystemUI/src/com/android/systemui/tv/pip/PipRecentsOverlayManager.java @@ -16,8 +16,6 @@ package com.android.systemui.tv.pip; -import android.animation.AnimatorInflater; -import android.animation.AnimatorSet; import android.content.Context; import android.graphics.PixelFormat; import android.util.Log;