summaryrefslogtreecommitdiffstats
path: root/core/java/android/app
diff options
context:
space:
mode:
authorSander Alewijnse <salewijnse@google.com>2015-04-20 10:31:26 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-04-20 10:31:28 +0000
commite94787a027763a6da7428639b0f5d00e23aa2196 (patch)
tree73914710c080fbd573c22f2e961ec44d98b74f78 /core/java/android/app
parentf851d6dd2a15b74f63c85403afad0ed747f7311c (diff)
parente4f878cbe663a7b48f879d57ec003cebf0dcd1b6 (diff)
downloadframeworks_base-e94787a027763a6da7428639b0f5d00e23aa2196.zip
frameworks_base-e94787a027763a6da7428639b0f5d00e23aa2196.tar.gz
frameworks_base-e94787a027763a6da7428639b0f5d00e23aa2196.tar.bz2
Merge "Add certificate checksum extras."
Diffstat (limited to 'core/java/android/app')
-rw-r--r--core/java/android/app/admin/DevicePolicyManager.java58
1 files changed, 52 insertions, 6 deletions
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index 44760ce..0ea237a 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -364,9 +364,12 @@ public class DevicePolicyManager {
/**
* A String extra holding the URL-safe base64 encoded SHA-1 checksum of the file at download
- * location specified in {@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION}. If
- * this doesn't match the file at the download location an error will be shown to the user and
- * the user will be asked to factory reset the device.
+ * location specified in {@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION}.
+ *
+ * <p>Either this extra or {@link #EXTRA_PROVISIONING_DEVICE_ADMIN_CERTIFICATE_CHECKSUM} should be
+ * present. The provided checksum should match the checksum of the file at the download
+ * location. If the checksum doesn't match an error will be shown to the user and the user will
+ * be asked to factory reset the device.
*
* <p>Use in an NFC record with {@link #MIME_TYPE_PROVISIONING_NFC} that starts device owner
* provisioning via an NFC bump.
@@ -375,6 +378,26 @@ public class DevicePolicyManager {
= "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM";
/**
+ * A String extra holding the URL-safe base64 encoded SHA-1 checksum of any certificate of the
+ * android package archive at the download location specified in {@link
+ * #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION}.
+ *
+ * <p>The certificates of an android package archive can be obtained using
+ * {@link android.content.pm.PackageManager#getPackageArchiveInfo} with flag
+ * {@link android.content.pm.PackageManager#GET_SIGNATURES}.
+ *
+ * <p>Either this extra or {@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM} should be
+ * present. The provided checksum should match the checksum of any certificate of the file at
+ * the download location. If the checksum does not match an error will be shown to the user and
+ * the user will be asked to factory reset the device.
+ *
+ * <p>Use in an NFC record with {@link #MIME_TYPE_PROVISIONING_NFC} that starts device owner
+ * provisioning via an NFC bump.
+ */
+ public static final String EXTRA_PROVISIONING_DEVICE_ADMIN_CERTIFICATE_CHECKSUM
+ = "android.app.extra.PROVISIONING_DEVICE_ADMIN_CERTIFICATE_CHECKSUM";
+
+ /**
* Broadcast Action: This broadcast is sent to indicate that provisioning of a managed profile
* has completed successfully.
*
@@ -449,9 +472,12 @@ public class DevicePolicyManager {
/**
* A String extra holding the URL-safe base64 encoded SHA-1 checksum of the file at download
* location specified in
- * {@link #EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_DOWNLOAD_LOCATION}. If this doesn't
- * match the file at the download location an error will be shown to the user and the user will
- * be asked to factory reset the device.
+ * {@link #EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_DOWNLOAD_LOCATION}.
+ *
+ * <p>Either this extra or {@link #EXTRA_PROVISIONING_DEVICE_INITIALIZER_CERTIFICATE_CHECKSUM}
+ * should be present. The provided checksum should match the checksum of the file at the
+ * download location. If the checksum doesn't match an error will be shown to the user and the
+ * user will be asked to factory reset the device.
*
* <p>Use in an NFC record with {@link #MIME_TYPE_PROVISIONING_NFC_V2} that starts device owner
* provisioning via an NFC bump.
@@ -460,6 +486,26 @@ public class DevicePolicyManager {
= "android.app.extra.PROVISIONING_DEVICE_INITIALIZER_PACKAGE_CHECKSUM";
/**
+ * A String extra holding the URL-safe base64 encoded SHA-1 checksum of any certificate of the
+ * android package archive at the download location specified in {@link
+ * #EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_DOWNLOAD_LOCATION}.
+ *
+ * <p>The certificates of an android package archive can be obtained using
+ * {@link android.content.pm.PackageManager#getPackageArchiveInfo} with flag
+ * {@link android.content.pm.PackageManager#GET_SIGNATURES}.
+ *
+ * <p>Either this extra or {@link #EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_CHECKSUM}
+ * should be present. The provided checksum should match the checksum of any certificate of the
+ * file at the download location. If the checksum doesn't match an error will be shown to the
+ * user and the user will be asked to factory reset the device.
+ *
+ * <p>Use in an NFC record with {@link #MIME_TYPE_PROVISIONING_NFC_V2} that starts device owner
+ * provisioning via an NFC bump.
+ */
+ public static final String EXTRA_PROVISIONING_DEVICE_INITIALIZER_CERTIFICATE_CHECKSUM
+ = "android.app.extra.PROVISIONING_DEVICE_INITIALIZER_CERTIFICATE_CHECKSUM";
+
+ /**
* A String extra holding the MAC address of the Bluetooth device to connect to with status
* updates during provisioning.
*