Home | History | Annotate | Download | only in shadows
      1 // BEGIN-INTERNAL
      2 package main.java.org.robolectric.shadows;
      3 
      4 import android.content.res.ApkAssets;
      5 import android.os.Build;
      6 
      7 import com.android.internal.util.Preconditions;
      8 
      9 import org.robolectric.annotation.Implementation;
     10 import org.robolectric.annotation.Implements;
     11 
     12 import java.io.IOException;
     13 
     14 @Implements(value = ApkAssets.class, minSdk = Build.VERSION_CODES.P, isInAndroidSdk = false)
     15 public class ShadowApkAssets {
     16   private String assetPath;
     17 
     18   @Implementation
     19   protected void __constructor__(String path, boolean system, boolean forceSharedLib,
     20       boolean overlay) throws IOException {
     21     Preconditions.checkNotNull(path, "path");
     22     assetPath = path;
     23   }
     24 
     25   @Implementation
     26   protected String getAssetPath() {
     27     return assetPath;
     28   }
     29 }
     30 // END-INTERNAL