diff options
author | Craig Lafayette <craiglafa@google.com> | 2015-05-06 16:57:01 -0400 |
---|---|---|
committer | Craig Lafayette <craiglafa@google.com> | 2015-05-06 17:24:20 -0400 |
commit | 9ef04bfb0711d54fc951ca79d38c4d14a0cc817a (patch) | |
tree | 8020ac74ba7ce1fd3d2e85c270f3cb56a800cdf8 /core | |
parent | 6223ec129b256526d8c30920271b2ee3960bcf1f (diff) | |
download | frameworks_base-9ef04bfb0711d54fc951ca79d38c4d14a0cc817a.zip frameworks_base-9ef04bfb0711d54fc951ca79d38c4d14a0cc817a.tar.gz frameworks_base-9ef04bfb0711d54fc951ca79d38c4d14a0cc817a.tar.bz2 |
DeviceInitializerStatus API review changes
- Remove DeviceInitializerStatus.is*Status()
- Remove DeviceInitializerStatus.FLAG_STATUS_RESERVED
- Rename STATUS_STATE_CONNECT_BLUETOOTH_PROXY to
STATUS_STATE_CONNECTING_BLUETOOTH_PROXY
- Rename STATUS_STATE_DISCONNECT_BLUETOOTH_PROXY to
STATUS_STATE_DISCONNECTING_BLUETOOTH_PROXY
Bug: 20819590
Change-Id: I276c5674a36726d3681dcc29e896ad39888d116d
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 8009b6c..5bac43f 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) { |