Home | History | Annotate | Download | only in robolectric
      1 package org.robolectric;
      2 
      3 /**
      4  * Represents the contents of a `uses-sdk` element in an Android manifest file.
      5  */
      6 public interface UsesSdk {
      7   /**
      8    * Returns the minimum Android SDK version that this package expects to be runnable on, as
      9    * specified in the manifest.
     10    *
     11    * @return the minimum SDK version
     12    */
     13   int getMinSdkVersion();
     14 
     15   /**
     16    * Returns the Android SDK version that this package prefers to be run on, as specified in the
     17    * manifest.
     18    *
     19    * Note that this value changes the behavior of some Android code (notably {@link
     20    * android.content.SharedPreferences}) to emulate old bugs.
     21    *
     22    * @return the target SDK version
     23    */
     24   int getTargetSdkVersion();
     25 
     26   /**
     27    * Returns the maximum Android SDK version that this package expects to be runnable on, as
     28    * specified in the manifest.
     29    *
     30    * If no maximum version is specified, `null` may be returned.
     31    *
     32    * @return the maximum SDK version, or `null`
     33    */
     34   Integer getMaxSdkVersion();
     35 }
     36