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

@@ -32,7 +32,6 @@ import android.view.LayoutInflater;
import android.view.TextureView;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import androidx.preference.PreferenceFragmentCompat;
import androidx.preference.PreferenceViewHolder;
@@ -61,8 +60,6 @@ public class VideoPreferenceTest {
private ImageView fakePreview;
@Mock
private ImageView fakePlayButton;
@Mock
private LinearLayout mAnimationView;
private Context mContext;
private VideoPreference mVideoPreference;
@@ -77,7 +74,6 @@ public class VideoPreferenceTest {
new MediaAnimationController(mContext, R.raw.accessibility_screen_magnification));
mVideoPreference = new VideoPreference(mContext, null /* attrs */);
mVideoPreference.mAnimationController = mAnimationController;
mVideoPreference.mAnimationView = mAnimationView;
when(mAnimationController.getVideoWidth()).thenReturn(VIDEO_WIDTH);
when(mAnimationController.getVideoHeight()).thenReturn(VIDEO_HEIGHT);
@@ -162,13 +158,6 @@ public class VideoPreferenceTest {
assertThat(vp2.mAnimationController instanceof VectorAnimationController).isTrue();
}
@Test
public void setBackgroundColor_shouldBeCalled() {
mVideoPreference.setBackgroundColor(1111);
assertThat(mVideoPreference.mBackgroundResId).isEqualTo(1111);
}
public static class TestFragment extends PreferenceFragmentCompat {
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {