package org.robolectric.shadows;

import android.content.ContentResolver;
import android.graphics.Bitmap;
import android.net.Uri;
import android.provider.MediaStore;

import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.robolectric.annotation.Resetter;
import org.robolectric.util.ReflectionHelpers;

@SuppressWarnings({"UnusedDeclaration"})
@Implements(MediaStore.class)
public class ShadowMediaStore {

  @Implements(MediaStore.Images.class)
  public static class ShadowImages {
    @Implements(MediaStore.Images.Media.class)
    public static class ShadowMedia {
      @Implementation
      public static Bitmap getBitmap(ContentResolver cr, Uri url) {
        return ShadowBitmapFactory.create(url.toString());
      }
    }
  }

  @Resetter
  public static void reset() {
    ReflectionHelpers.setStaticField(MediaStore.Images.Media.class, "EXTERNAL_CONTENT_URI", Uri.parse("content://media/external/images/media"));

    ReflectionHelpers.setStaticField(MediaStore.Images.Media.class, "INTERNAL_CONTENT_URI", Uri.parse("content://media/internal/images/media"));

    ReflectionHelpers.setStaticField(MediaStore.Video.Media.class, "EXTERNAL_CONTENT_URI", Uri.parse("content://media/external/video/media"));

    ReflectionHelpers.setStaticField(MediaStore.Video.Media.class, "INTERNAL_CONTENT_URI", Uri.parse("content://media/internal/video/media"));
  }
}

@@ -451,17 +451,16 @@
 Store %7B%0A
-%0A
   @Imple
@@ -782,634 +782,7 @@
 %0A  %7D
-%0A%0A  @Resetter%0A  public static void reset() %7B%0A    ReflectionHelpers.setStaticField(MediaStore.Images.Media.class, %22EXTERNAL_CONTENT_URI%22, Uri.parse(%22content://media/external/images/media%22));%0A%0A    ReflectionHelpers.setStaticField(MediaStore.Images.Media.class, %22INTERNAL_CONTENT_URI%22, Uri.parse(%22content://media/internal/images/media%22));%0A%0A    ReflectionHelpers.setStaticField(MediaStore.Video.Media.class, %22EXTERNAL_CONTENT_URI%22, Uri.parse(%22content://media/external/video/media%22));%0A%0A    ReflectionHelpers.setStaticField(MediaStore.Video.Media.class, %22INTERNAL_CONTENT_URI%22, Uri.parse(%22content://media/internal/video/media%22));%0A  %7D
 %0A%7D%0A

Remove unnecessary resetter