summaryrefslogtreecommitdiff
path: root/core/java/android/os/Build.java
diff options
context:
space:
mode:
authorMichael Groover <mpgroover@google.com>2019-05-23 12:31:16 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-05-23 12:31:16 -0700
commit1eb50d4f78b941eec109127b4137b5810cdec0e7 (patch)
tree6d2e2329f632580b046b82292af9bcb9091f72e5 /core/java/android/os/Build.java
parent06946e95570b03f1c18e657af0668bd3eb9c67d3 (diff)
parentf087f06ed94b01f6f5b4d3b4bb6137cfeb1635a6 (diff)
Merge "Document device ID access restriction target SDK behavior" into qt-dev
am: f087f06ed9 Change-Id: I047d6f523a59ee637b2b795590c2ecd8c4b31509
Diffstat (limited to 'core/java/android/os/Build.java')
-rwxr-xr-xcore/java/android/os/Build.java20
1 files changed, 17 insertions, 3 deletions
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index 746c3eec3ef3..534fd9933911 100755
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -132,10 +132,24 @@ public class Build {
* <a href="/training/articles/security-key-attestation.html">key attestation</a> to obtain
* proof of the device's original identifiers.
*
- * <p>Requires Permission: READ_PRIVILEGED_PHONE_STATE, or for the calling package to be the
- * device or profile owner and have the READ_PHONE_STATE permission. Profile owner access is
- * deprecated and will be removed in a future release.
+ * <p>Requires Permission: READ_PRIVILEGED_PHONE_STATE, for the calling app to be the device or
+ * profile owner and have the READ_PHONE_STATE permission, or that the calling app has carrier
+ * privileges (see {@link android.telephony.TelephonyManager#hasCarrierPrivileges}). The profile
+ * owner is an app that owns a managed profile on the device; for more details see <a
+ * href="https://developer.android.com/work/managed-profiles">Work profiles</a>. Profile owner
+ * access is deprecated and will be removed in a future release.
*
+ * <p>If the calling app does not meet one of these requirements then this method will behave
+ * as follows:
+ *
+ * <ul>
+ * <li>If the calling app's target SDK is API level 28 or lower and the app has the
+ * READ_PHONE_STATE permission then {@link Build#UNKNOWN} is returned.</li>
+ * <li>If the calling app's target SDK is API level 28 or lower and the app does not have
+ * the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or
+ * higher, then a SecurityException is thrown.</li>
+ * </ul>
+ * *
* @return The serial number if specified.
*/
@SuppressAutoDoc // No support for device / profile owner.