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

Commit 97eb3f1b authored by Lajos Molnar's avatar Lajos Molnar
Browse files

os.Build: add MEDIA_PERFORMANCE_CLASS

Bug: 175813535
Test: atest android.mediapc.cts.PerformanceClassTest
Test: atest android.os.cts.BuildTest
Change-Id: I66e172f4c619a3277bde1004ba4828e2173f69a0
parent cc82a02d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -30425,6 +30425,7 @@ package android.os {
    field public static final String BASE_OS;
    field public static final String CODENAME;
    field public static final String INCREMENTAL;
    field public static final int MEDIA_PERFORMANCE_CLASS;
    field public static final int PREVIEW_SDK_INT;
    field public static final String RELEASE;
    field @NonNull public static final String RELEASE_OR_CODENAME;
+14 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.app.ActivityThread;
import android.app.Application;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.sysprop.DeviceProperties;
import android.sysprop.SocProperties;
import android.sysprop.TelephonyProperties;
import android.text.TextUtils;
@@ -297,6 +298,19 @@ public class Build {
        public static final String SECURITY_PATCH = SystemProperties.get(
                "ro.build.version.security_patch", "");

        /**
         * The media performance class of the device or 0 if none.
         * <p>
         * If this value is not <code>0</code>, the device conforms to the media performance class
         * definition of the SDK version of this value. This value never changes while a device is
         * booted, but it may increase when the hardware manufacturer provides an OTA update.
         * <p>
         * Possible non-zero values are defined in {@link Build.VERSION_CODES} starting with
         * {@link Build.VERSION_CODES#S}.
         */
        public static final int MEDIA_PERFORMANCE_CLASS =
                DeviceProperties.media_performance_class().orElse(0);

        /**
         * The user-visible SDK version of the framework in its raw String
         * representation; use {@link #SDK_INT} instead.