Skip to content

Commit

Permalink
s/RuntimeEnvironment.application/ApplicationProvider.getApplicationCo…
Browse files Browse the repository at this point in the history
…ntext()/g

PiperOrigin-RevId: 351185422
  • Loading branch information
sjudd authored and glide-copybara-robot committed Jan 11, 2021
1 parent e2a467d commit 8f77079
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import androidx.test.core.app.ApplicationProvider;
import com.bumptech.glide.Glide;
import com.bumptech.glide.GlideBuilder;
import com.bumptech.glide.load.Transformation;
Expand All @@ -35,7 +36,6 @@
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Config;

@RunWith(RobolectricTestRunner.class)
Expand All @@ -51,7 +51,7 @@ public class DrawableTransformationTest {
public void setUp() {
MockitoAnnotations.initMocks(this);
transformation = new DrawableTransformation(bitmapTransformation, /*isRequired=*/ true);
context = RuntimeEnvironment.application;
context = ApplicationProvider.getApplicationContext();
bitmapPool = new BitmapPoolAdapter();
Glide.init(context, new GlideBuilder().setBitmapPool(bitmapPool));
}
Expand Down

0 comments on commit 8f77079

Please sign in to comment.