diff options
author | Craig Lafayette <craiglafa@google.com> | 2015-05-08 22:12:53 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-08 22:12:58 +0000 |
commit | ed1ef7d4eb8934f6940a2e828ebd0e6878e1af89 (patch) | |
tree | 5674ff0091bcc59312f42902273658d3c2a147ad /core | |
parent | e239f782509583b14c95b1c88bf2b085d1e1b6e1 (diff) | |
parent | 9ef04bfb0711d54fc951ca79d38c4d14a0cc817a (diff) | |
download | frameworks_base-ed1ef7d4eb8934f6940a2e828ebd0e6878e1af89.zip frameworks_base-ed1ef7d4eb8934f6940a2e828ebd0e6878e1af89.tar.gz frameworks_base-ed1ef7d4eb8934f6940a2e828ebd0e6878e1af89.tar.bz2 |
Merge "DeviceInitializerStatus API review changes" into mnc-dev
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/app/admin/DeviceInitializerStatus.java | 40 | ||||
-rw-r--r-- | core/java/android/app/admin/DevicePolicyManager.java | 6 |
2 files changed, 7 insertions, 39 deletions
diff --git a/core/java/android/app/admin/DeviceInitializerStatus.java b/core/java/android/app/admin/DeviceInitializerStatus.java index b58711c..7de518b 100644 --- a/core/java/android/app/admin/DeviceInitializerStatus.java +++ b/core/java/android/app/admin/DeviceInitializerStatus.java @@ -37,8 +37,8 @@ package android.app.admin; * <li>{@link #STATUS_ERROR_SET_DEVICE_POLICY} * <li>{@link #STATUS_ERROR_DELETE_APPS} * <li>{@link #STATUS_ERROR_DOUBLE_BUMP} - * <li>{@link #STATUS_STATE_CONNECT_BLUETOOTH_PROXY} - * <li>{@link #STATUS_STATE_DISCONNECT_BLUETOOTH_PROXY} + * <li>{@link #STATUS_STATE_CONNECTING_BLUETOOTH_PROXY} + * <li>{@link #STATUS_STATE_DISCONNECTING_BLUETOOTH_PROXY} * <li>{@link #STATUS_STATE_DEVICE_PROVISIONED} * </ul> */ @@ -84,13 +84,13 @@ public class DeviceInitializerStatus { * Device provisioning status code that indicates that a device is connecting to establish * a Bluetooth network proxy. */ - public static final int STATUS_STATE_CONNECT_BLUETOOTH_PROXY = FLAG_STATUS_HIGH_PRIORITY | 8; + public static final int STATUS_STATE_CONNECTING_BLUETOOTH_PROXY = FLAG_STATUS_HIGH_PRIORITY | 8; /** * Device provisioning status code that indicates that a connected Bluetooth network proxy * is being shut down. */ - public static final int STATUS_STATE_DISCONNECT_BLUETOOTH_PROXY = FLAG_STATUS_HIGH_PRIORITY | 9; + public static final int STATUS_STATE_DISCONNECTING_BLUETOOTH_PROXY = FLAG_STATUS_HIGH_PRIORITY | 9; /** * Device provisioning status code that indicates that a device has been successfully @@ -141,37 +141,5 @@ public class DeviceInitializerStatus { */ public static final int STATUS_ERROR_DOUBLE_BUMP = FLAG_STATUS_ERROR | 30; - /** - * Determine if the specified status code represents an error status. - * @param statusCode status code to check - * @return {@code true} if the status code is an error status code - */ - public static boolean isErrorStatus(int statusCode) { - return isFlagSet(statusCode, FLAG_STATUS_ERROR); - } - - /** - * Determine if the specified status code is a custom status. Custom status codes are defined - * and sent by device initialization agents. - * @param statusCode status code to check - * @return {@code true} if the status code is a custom status code - */ - public static boolean isCustomStatus(int statusCode) { - return isFlagSet(statusCode, FLAG_STATUS_CUSTOM); - } - - /** - * Determine if the specified status code is a high priority status code. - * @param statusCode status code to check - * @return {@code true} if the status code is a high priority status code - */ - public static boolean isHighPriority(int statusCode) { - return isFlagSet(statusCode, FLAG_STATUS_HIGH_PRIORITY); - } - - private static boolean isFlagSet(int statusCode, int flag) { - return (statusCode & flag) != 0; - } - private DeviceInitializerStatus() {} } diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index 355f298..ae07206 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -702,7 +702,7 @@ public class DevicePolicyManager { * reported to the remote setup device over Bluetooth. * * <p>Broadcasts with this action must supply a - * {@linkplain DeviceInitializerStatus#isCustomStatus(int) custom} status code in the + * {@linkplain DeviceInitializerStatus#FLAG_STATUS_CUSTOM custom} status code in the * {@link EXTRA_DEVICE_INITIALIZER_STATUS_CODE} extra. * * <p>Broadcasts may optionally contain a description in the @@ -718,7 +718,7 @@ public class DevicePolicyManager { * sent as part of a broadcast with an action of {@code ACTION_SEND_DEVICE_INITIALIZER_STATUS}. * * <p>The status code sent with this extra must be a custom status code as defined by - * {@link DeviceInitializerStatus#isCustomStatus(int)}. + * {@link DeviceInitializerStatus#FLAG_STATUS_CUSTOM}. * @hide */ @SystemApi @@ -4229,7 +4229,7 @@ public class DevicePolicyManager { * Called by device initializer to send a provisioning status update to the remote setup device. * * @param statusCode a custom status code value as defined by - * {@link DeviceInitializerStatus#isCustomStatus(int)}. + * {@link DeviceInitializerStatus#FLAG_STATUS_CUSTOM}. * @param description custom description of the status code sent */ public void sendDeviceInitializerStatus(int statusCode, String description) { |