summaryrefslogtreecommitdiff
path: root/core/java/android/os/Build.java
diff options
context:
space:
mode:
authorMichael Groover <mpgroover@google.com>2019-05-23 14:03:03 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-05-23 14:03:03 -0700
commit0cd054da96be22efdabceca2f00bf9cc01d640f2 (patch)
tree1706f1cf6eaeefcc8e63c9388afcd4bcb66bcf97 /core/java/android/os/Build.java
parentac4a95adea23a34f5e7c14012d04e8eb2715833e (diff)
parent7b8af958724cb34d9eaf2cfa0d16d9e5e89f5d71 (diff)
Merge "Document device ID access restriction target SDK behavior" into qt-dev am: f087f06ed9
am: 7b8af95872 Change-Id: Iabe3013554cd0794bd634f0e61008e080629f9bd
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.