Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6cff5c28 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "API that reports first SDK level of the device."

parents 6f6026d3 28c660f1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -30968,6 +30968,7 @@ package android.os {
    ctor public Build.VERSION();
    field public static final java.lang.String BASE_OS;
    field public static final java.lang.String CODENAME;
    field public static final int FIRST_SDK_INT;
    field public static final java.lang.String INCREMENTAL;
    field public static final int MIN_SUPPORTED_TARGET_SDK_INT;
    field public static final int PREVIEW_SDK_INT;
+1 −0
Original line number Diff line number Diff line
@@ -120,6 +120,7 @@ package android.app.usage {

  public class StorageStatsManager {
    method public boolean isQuotaSupported(java.util.UUID);
    method public boolean isReservedSupported(java.util.UUID);
  }

}
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.app.usage.ExternalStorageStats;
/** {@hide} */
interface IStorageStatsManager {
    boolean isQuotaSupported(String volumeUuid, String callingPackage);
    boolean isReservedSupported(String volumeUuid, String callingPackage);
    long getTotalBytes(String volumeUuid, String callingPackage);
    long getFreeBytes(String volumeUuid, String callingPackage);
    long getCacheBytes(String volumeUuid, String callingPackage);
+10 −0
Original line number Diff line number Diff line
@@ -78,6 +78,16 @@ public class StorageStatsManager {
        return isQuotaSupported(convert(uuid));
    }

    /** {@hide} */
    @TestApi
    public boolean isReservedSupported(@NonNull UUID storageUuid) {
        try {
            return mService.isReservedSupported(convert(storageUuid), mContext.getOpPackageName());
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * Return the total size of the underlying physical media that is hosting
     * this storage volume.
+20 −2
Original line number Diff line number Diff line
@@ -221,12 +221,30 @@ public class Build {
        public static final String SDK = getString("ro.build.version.sdk");

        /**
         * The user-visible SDK version of the framework; its possible
         * values are defined in {@link Build.VERSION_CODES}.
         * The SDK version of the software currently running on this hardware
         * device. This value never changes while a device is booted, but it may
         * increase when the hardware manufacturer provides an OTA update.
         * <p>
         * Possible values are defined in {@link Build.VERSION_CODES}.
         *
         * @see #FIRST_SDK_INT
         */
        public static final int SDK_INT = SystemProperties.getInt(
                "ro.build.version.sdk", 0);

        /**
         * The SDK version of the software that <em>initially</em> shipped on
         * this hardware device. It <em>never</em> changes during the lifetime
         * of the device, even when {@link #SDK_INT} increases due to an OTA
         * update.
         * <p>
         * Possible values are defined in {@link Build.VERSION_CODES}.
         *
         * @see #SDK_INT
         */
        public static final int FIRST_SDK_INT = SystemProperties
                .getInt("ro.product.first_api_level", 0);

        /**
         * The developer preview revision of a prerelease SDK. This value will always
         * be <code>0</code> on production platform builds/devices.
Loading