summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorOliver Woodman <olly@google.com>2020-12-04 14:55:22 +0000
committerOliver Woodman <olly@google.com>2021-01-26 15:34:18 +0000
commitbe2de184716f99800cd193a54fdcbb4bb13166cc (patch)
treecffb5575e2c809146f82f146a26d6e53789dff09 /core/java
parent40d66357017797929a8f6b2ce01c05bae748d241 (diff)
API to get SOC manufacturer and model
BUG: 158284209 Test: atest android.os.cts.BuildTest Change-Id: I9a2e1a4f667e7751252ac0f404d0d56c452718a5
Diffstat (limited to 'core/java')
-rwxr-xr-xcore/java/android/os/Build.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index 10761187d969..5ae53b502330 100755
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -26,6 +26,7 @@ import android.app.ActivityThread;
import android.app.Application;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Context;
+import android.sysprop.SocProperties;
import android.sysprop.TelephonyProperties;
import android.text.TextUtils;
import android.util.Slog;
@@ -87,6 +88,14 @@ public class Build {
/** The end-user-visible name for the end product. */
public static final String MODEL = getString("ro.product.model");
+ /** The manufacturer of the device's primary system-on-chip. */
+ @NonNull
+ public static final String SOC_MANUFACTURER = SocProperties.soc_manufacturer().orElse(UNKNOWN);
+
+ /** The model name of the device's primary system-on-chip. */
+ @NonNull
+ public static final String SOC_MODEL = SocProperties.soc_model().orElse(UNKNOWN);
+
/** The system bootloader version number. */
public static final String BOOTLOADER = getString("ro.bootloader");