Merge "Use values-night to control the dark mode background color" into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-03-13 03:13:27 +00:00
committed by Android (Google) Code Review
3 changed files with 1 additions and 28 deletions

View File

@@ -39,17 +39,12 @@ import com.android.settings.R;
public class VideoPreference extends Preference {
private static final String TAG = "VideoPreference";
private static final int DEFAULT_BACKGROUND_RESOURCE_ID = -1;
private final Context mContext;
@VisibleForTesting
AnimationController mAnimationController;
@VisibleForTesting
boolean mAnimationAvailable;
@VisibleForTesting
LinearLayout mAnimationView;
@VisibleForTesting
int mBackgroundResId = DEFAULT_BACKGROUND_RESOURCE_ID;
private float mAspectRatio = 1.0f;
private int mPreviewId;
@@ -120,7 +115,6 @@ public class VideoPreference extends Preference {
mVideo = (TextureView) holder.findViewById(R.id.video_texture_view);
mPreviewImage = (ImageView) holder.findViewById(R.id.video_preview_image);
mPlayButton = (ImageView) holder.findViewById(R.id.video_play_button);
mAnimationView = (LinearLayout) holder.itemView;
final AspectRatioFrameLayout layout = (AspectRatioFrameLayout) holder.findViewById(
R.id.video_container);
@@ -130,9 +124,6 @@ public class VideoPreference extends Preference {
layout.setLayoutParams(new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT, mHeight));
}
if (mBackgroundResId != DEFAULT_BACKGROUND_RESOURCE_ID) {
mAnimationView.setBackgroundResource(mBackgroundResId);
}
if (mAnimationController != null) {
mAnimationController.attachView(mVideo, mPreviewImage, mPlayButton);
}
@@ -212,14 +203,6 @@ public class VideoPreference extends Preference {
/ (float) mAnimationController.getVideoHeight();
}
/**
* Set the background color of the video preference
* @param resId resource id of color
*/
public void setBackgroundColor(int resId) {
mBackgroundResId = resId;
}
/**
* Handle animation operations.
*/