summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2021-03-12 14:31:53 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-03-12 14:31:53 +0000
commitd419a26c2ea644d802a0a992bc4f4096f0b7c1b2 (patch)
tree6c02a2bbc270270c7aace38a6dc0d42e5d3767c6 /core/java
parentac33aa4735289b835173accd895b37b12c487d9c (diff)
parent97eb3f1bd2d55bb23afa64c3908377645981cc74 (diff)
Merge "os.Build: add MEDIA_PERFORMANCE_CLASS" into sc-dev
Diffstat (limited to 'core/java')
-rwxr-xr-xcore/java/android/os/Build.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index 83f78a56487a..0d9f715c11d4 100755
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -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;
@@ -298,6 +299,19 @@ public class Build {
"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.
*