Remove mocked resources from slice test cases

Clean up some resources which are useless for the moment.

Bug: 117485451
Test: robotests
Change-Id: Id3591178791cc6c9f628a99a8916e9007a399728
This commit is contained in:
Mill Chen
2018-10-09 23:25:44 +08:00
parent bf421af90f
commit fdf06e242a
9 changed files with 1 additions and 69 deletions

View File

@@ -19,12 +19,9 @@ package com.android.settings.flashlight;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.spy;
import android.content.Context;
import android.content.res.Resources;
import android.provider.Settings;
import androidx.slice.Slice;
@@ -55,11 +52,6 @@ public class FlashlightSliceBuilderTest {
public void setUp() {
mContext = spy(RuntimeEnvironment.application);
// Prevent crash in SliceMetadata.
Resources resources = spy(mContext.getResources());
doReturn(60).when(resources).getDimensionPixelSize(anyInt());
doReturn(resources).when(mContext).getResources();
// Set-up specs for SliceMetadata.
SliceProvider.setSpecs(SliceLiveData.SUPPORTED_SPECS);
}