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