Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77b2d49a authored by Craig Lafayette's avatar Craig Lafayette Committed by Android (Google) Code Review
Browse files

Merge "Remove device initializer status messages" into mnc-dev

parents 96d7058a 240e6482
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -234,6 +234,7 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/symbols/system/lib/libinputflingerh
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/lib/libinputflingerhost.so $(PRODUCT_OUT)/obj_arm/lib/libinputflingerhost.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libinputflingerhost_intermediates $(PRODUCT_OUT)/obj_arm/SHARED_LIBRARIES/libinputflingerhost_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/target/common/obj/framework.aidl)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates)

# ******************************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST ABOVE THIS BANNER
+0 −22
Original line number Diff line number Diff line
@@ -5681,23 +5681,6 @@ package android.app.admin {
    field public static final java.lang.String EXTRA_LOCK_TASK_PACKAGE = "android.app.extra.LOCK_TASK_PACKAGE";
  }
  public class DeviceInitializerStatus {
    field public static final int FLAG_STATUS_CUSTOM = 33554432; // 0x2000000
    field public static final int FLAG_STATUS_ERROR = 16777216; // 0x1000000
    field public static final int FLAG_STATUS_HIGH_PRIORITY = 134217728; // 0x8000000
    field public static final int FLAG_STATUS_RESERVED = 67108864; // 0x4000000
    field public static final int STATUS_ERROR_CONNECT_WIFI = 16777237; // 0x1000015
    field public static final int STATUS_ERROR_DELETE_APPS = 16777242; // 0x100001a
    field public static final int STATUS_ERROR_DOUBLE_BUMP = 16777246; // 0x100001e
    field public static final int STATUS_ERROR_DOWNLOAD_PACKAGE = 16777239; // 0x1000017
    field public static final int STATUS_ERROR_INSTALL_PACKAGE = 16777240; // 0x1000018
    field public static final int STATUS_ERROR_RESET_PROTECTION_BLOCKING_PROVISIONING = 16777238; // 0x1000016
    field public static final int STATUS_ERROR_SET_DEVICE_POLICY = 16777241; // 0x1000019
    field public static final int STATUS_STATE_CONNECTING_BLUETOOTH_PROXY = 134217736; // 0x8000008
    field public static final int STATUS_STATE_DEVICE_PROVISIONED = 134217738; // 0x800000a
    field public static final int STATUS_STATE_DISCONNECTING_BLUETOOTH_PROXY = 134217737; // 0x8000009
  }
  public class DevicePolicyManager {
    method public void addCrossProfileIntentFilter(android.content.ComponentName, android.content.IntentFilter, int);
    method public boolean addCrossProfileWidgetProvider(android.content.ComponentName, java.lang.String);
@@ -5765,7 +5748,6 @@ package android.app.admin {
    method public boolean removeCrossProfileWidgetProvider(android.content.ComponentName, java.lang.String);
    method public boolean removeUser(android.content.ComponentName, android.os.UserHandle);
    method public boolean resetPassword(java.lang.String, int);
    method public void sendDeviceInitializerStatus(int, java.lang.String);
    method public void setAccountManagementDisabled(android.content.ComponentName, java.lang.String, boolean);
    method public boolean setApplicationHidden(android.content.ComponentName, java.lang.String, boolean);
    method public void setApplicationRestrictions(android.content.ComponentName, java.lang.String, android.os.Bundle);
@@ -5829,10 +5811,6 @@ package android.app.admin {
    field public static final java.lang.String EXTRA_DEVICE_ADMIN = "android.app.extra.DEVICE_ADMIN";
    field public static final java.lang.String EXTRA_PROVISIONING_ACCOUNT_TO_MIGRATE = "android.app.extra.PROVISIONING_ACCOUNT_TO_MIGRATE";
    field public static final java.lang.String EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE = "android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE";
    field public static final java.lang.String EXTRA_PROVISIONING_BT_DEVICE_ID = "android.app.extra.PROVISIONING_BT_DEVICE_ID";
    field public static final java.lang.String EXTRA_PROVISIONING_BT_MAC_ADDRESS = "android.app.extra.PROVISIONING_BT_MAC_ADDRESS";
    field public static final java.lang.String EXTRA_PROVISIONING_BT_USE_PROXY = "android.app.extra.PROVISIONING_BT_USE_PROXY";
    field public static final java.lang.String EXTRA_PROVISIONING_BT_UUID = "android.app.extra.PROVISIONING_BT_UUID";
    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_CERTIFICATE_CHECKSUM = "android.app.extra.PROVISIONING_DEVICE_ADMIN_CERTIFICATE_CHECKSUM";
    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME = "android.app.extra.PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME";
    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_MINIMUM_VERSION_CODE = "android.app.extra.PROVISIONING_DEVICE_ADMIN_MINIMUM_VERSION_CODE";
+0 −25
Original line number Diff line number Diff line
@@ -5781,23 +5781,6 @@ package android.app.admin {
    field public static final java.lang.String EXTRA_LOCK_TASK_PACKAGE = "android.app.extra.LOCK_TASK_PACKAGE";
  }
  public class DeviceInitializerStatus {
    field public static final int FLAG_STATUS_CUSTOM = 33554432; // 0x2000000
    field public static final int FLAG_STATUS_ERROR = 16777216; // 0x1000000
    field public static final int FLAG_STATUS_HIGH_PRIORITY = 134217728; // 0x8000000
    field public static final int FLAG_STATUS_RESERVED = 67108864; // 0x4000000
    field public static final int STATUS_ERROR_CONNECT_WIFI = 16777237; // 0x1000015
    field public static final int STATUS_ERROR_DELETE_APPS = 16777242; // 0x100001a
    field public static final int STATUS_ERROR_DOUBLE_BUMP = 16777246; // 0x100001e
    field public static final int STATUS_ERROR_DOWNLOAD_PACKAGE = 16777239; // 0x1000017
    field public static final int STATUS_ERROR_INSTALL_PACKAGE = 16777240; // 0x1000018
    field public static final int STATUS_ERROR_RESET_PROTECTION_BLOCKING_PROVISIONING = 16777238; // 0x1000016
    field public static final int STATUS_ERROR_SET_DEVICE_POLICY = 16777241; // 0x1000019
    field public static final int STATUS_STATE_CONNECTING_BLUETOOTH_PROXY = 134217736; // 0x8000008
    field public static final int STATUS_STATE_DEVICE_PROVISIONED = 134217738; // 0x800000a
    field public static final int STATUS_STATE_DISCONNECTING_BLUETOOTH_PROXY = 134217737; // 0x8000009
  }
  public class DevicePolicyManager {
    method public void addCrossProfileIntentFilter(android.content.ComponentName, android.content.IntentFilter, int);
    method public boolean addCrossProfileWidgetProvider(android.content.ComponentName, java.lang.String);
@@ -5874,7 +5857,6 @@ package android.app.admin {
    method public boolean removeCrossProfileWidgetProvider(android.content.ComponentName, java.lang.String);
    method public boolean removeUser(android.content.ComponentName, android.os.UserHandle);
    method public boolean resetPassword(java.lang.String, int);
    method public void sendDeviceInitializerStatus(int, java.lang.String);
    method public void setAccountManagementDisabled(android.content.ComponentName, java.lang.String, boolean);
    method public deprecated boolean setActiveProfileOwner(android.content.ComponentName, java.lang.String) throws java.lang.IllegalArgumentException;
    method public boolean setApplicationHidden(android.content.ComponentName, java.lang.String, boolean);
@@ -5927,7 +5909,6 @@ package android.app.admin {
    field public static final java.lang.String ACTION_MANAGED_PROFILE_PROVISIONED = "android.app.action.MANAGED_PROFILE_PROVISIONED";
    field public static final java.lang.String ACTION_PROVISION_MANAGED_DEVICE = "android.app.action.PROVISION_MANAGED_DEVICE";
    field public static final java.lang.String ACTION_PROVISION_MANAGED_PROFILE = "android.app.action.PROVISION_MANAGED_PROFILE";
    field public static final java.lang.String ACTION_SEND_DEVICE_INITIALIZER_STATUS = "android.app.action.SEND_DEVICE_INITIALIZER_STATUS";
    field public static final java.lang.String ACTION_SET_NEW_PASSWORD = "android.app.action.SET_NEW_PASSWORD";
    field public static final java.lang.String ACTION_SET_PROFILE_OWNER = "android.app.action.SET_PROFILE_OWNER";
    field public static final java.lang.String ACTION_START_ENCRYPTION = "android.app.action.START_ENCRYPTION";
@@ -5939,15 +5920,9 @@ package android.app.admin {
    field public static final int ENCRYPTION_STATUS_UNSUPPORTED = 0; // 0x0
    field public static final java.lang.String EXTRA_ADD_EXPLANATION = "android.app.extra.ADD_EXPLANATION";
    field public static final java.lang.String EXTRA_DEVICE_ADMIN = "android.app.extra.DEVICE_ADMIN";
    field public static final java.lang.String EXTRA_DEVICE_INITIALIZER_STATUS_CODE = "android.app.extra.DEVICE_INITIALIZER_STATUS_CODE";
    field public static final java.lang.String EXTRA_DEVICE_INITIALIZER_STATUS_DESCRIPTION = "android.app.extra.DEVICE_INITIALIZER_STATUS_DESCRIPTION";
    field public static final java.lang.String EXTRA_PROFILE_OWNER_NAME = "android.app.extra.PROFILE_OWNER_NAME";
    field public static final java.lang.String EXTRA_PROVISIONING_ACCOUNT_TO_MIGRATE = "android.app.extra.PROVISIONING_ACCOUNT_TO_MIGRATE";
    field public static final java.lang.String EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE = "android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE";
    field public static final java.lang.String EXTRA_PROVISIONING_BT_DEVICE_ID = "android.app.extra.PROVISIONING_BT_DEVICE_ID";
    field public static final java.lang.String EXTRA_PROVISIONING_BT_MAC_ADDRESS = "android.app.extra.PROVISIONING_BT_MAC_ADDRESS";
    field public static final java.lang.String EXTRA_PROVISIONING_BT_USE_PROXY = "android.app.extra.PROVISIONING_BT_USE_PROXY";
    field public static final java.lang.String EXTRA_PROVISIONING_BT_UUID = "android.app.extra.PROVISIONING_BT_UUID";
    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_CERTIFICATE_CHECKSUM = "android.app.extra.PROVISIONING_DEVICE_ADMIN_CERTIFICATE_CHECKSUM";
    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME = "android.app.extra.PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME";
    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_MINIMUM_VERSION_CODE = "android.app.extra.PROVISIONING_DEVICE_ADMIN_MINIMUM_VERSION_CODE";
+0 −145
Original line number Diff line number Diff line
/*
 * Copyright (C) 2015 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.app.admin;

/**
 * Defines constants designating device provisioning status used with {@link
 * android.app.admin.DevicePolicyManager#sendDeviceInitializerStatus(int,String)}.
 *
 * This class contains flag constants that define special status codes:
 * <ul>
 * <li>{@link #FLAG_STATUS_ERROR} is used to define provisioning error status codes
 * <li>{@link #FLAG_STATUS_CUSTOM} is used to define custom status codes
 * <li>{@link #FLAG_STATUS_HIGH_PRIORITY} is used to define high priority status codes
 * </ul>
 *
 * <p>Status codes used by ManagedProvisioning are also defined in this class. These status codes
 * include provisioning errors and status codes.
 * <ul>
 * <li>{@link #STATUS_ERROR_CONNECT_WIFI}
 * <li>{@link #STATUS_ERROR_RESET_PROTECTION_BLOCKING_PROVISIONING}
 * <li>{@link #STATUS_ERROR_DOWNLOAD_PACKAGE}
 * <li>{@link #STATUS_ERROR_INSTALL_PACKAGE}
 * <li>{@link #STATUS_ERROR_SET_DEVICE_POLICY}
 * <li>{@link #STATUS_ERROR_DELETE_APPS}
 * <li>{@link #STATUS_ERROR_DOUBLE_BUMP}
 * <li>{@link #STATUS_STATE_CONNECTING_BLUETOOTH_PROXY}
 * <li>{@link #STATUS_STATE_DISCONNECTING_BLUETOOTH_PROXY}
 * <li>{@link #STATUS_STATE_DEVICE_PROVISIONED}
 * </ul>
 */
public class DeviceInitializerStatus {
    /**
     * A flag used to designate an error status.
     *
     * <p>This flag is used with {@code statusCode} values sent through
     * {@link android.app.admin.DevicePolicyManager#sendDeviceInitializerStatus(int,String)}
     * @see #isErrorStatus(int)
     */
    public static final int FLAG_STATUS_ERROR = 0x01000000;

    /**
     * A flag used to designate a custom status. Custom status codes will be defined by device
     * initializer agents.
     *
     * <p>This flag is used with {@code statusCode} values sent through
     * {@link android.app.admin.DevicePolicyManager#sendDeviceInitializerStatus(int,String)}
     * @see #isCustomStatus(int)
     */
    public static final int FLAG_STATUS_CUSTOM = 0x02000000;

    /**
     * A bit flag used to designate a reserved status. Reserved status codes will not be defined
     * in AOSP.
     *
     * <p>This flag is used with {@code statusCode} values sent through
     * {@link android.app.admin.DevicePolicyManager#sendDeviceInitializerStatus(int,String)}
     */
    public static final int FLAG_STATUS_RESERVED = 0x04000000;

    /**
     * A flag used to indicate that a status message is high priority.
     *
     * <p>This flag is used with {@code statusCode} values sent through
     * {@link android.app.admin.DevicePolicyManager#sendDeviceInitializerStatus(int,String)}
     * @see #isHighPriority(int)
     */
    public static final int FLAG_STATUS_HIGH_PRIORITY = 0x08000000;

    /**
     * Device provisioning status code that indicates that a device is connecting to establish
     * a Bluetooth network proxy.
     */
    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_DISCONNECTING_BLUETOOTH_PROXY = FLAG_STATUS_HIGH_PRIORITY | 9;

    /**
     * Device provisioning status code that indicates that a device has been successfully
     * provisioned.
     */
    public static final int STATUS_STATE_DEVICE_PROVISIONED = FLAG_STATUS_HIGH_PRIORITY | 10;

    /**
     * Device provisioning error status code that indicates that a device could not connect to
     * a Wi-Fi network.
     */
    public static final int STATUS_ERROR_CONNECT_WIFI = FLAG_STATUS_ERROR | 21;

    /**
     * Device provisioning error status indicating that factory reset protection is enabled on
     * the provisioned device and cannot be disabled with the provided data.
     */
    public static final int STATUS_ERROR_RESET_PROTECTION_BLOCKING_PROVISIONING =
            FLAG_STATUS_ERROR | 22;

    /**
     * Device provisioning error status indicating that device administrator and device initializer
     * packages could not be downloaded and verified successfully.
     */
    public static final int STATUS_ERROR_DOWNLOAD_PACKAGE = FLAG_STATUS_ERROR | 23;

    /**
     * Device provisioning error status indicating that device owner and device initializer packages
     * could not be installed.
     */
    public static final int STATUS_ERROR_INSTALL_PACKAGE = FLAG_STATUS_ERROR | 24;

    /**
     * Device provisioning error status indicating that the device owner or device initializer
     * components could not be set.
     */
    public static final int STATUS_ERROR_SET_DEVICE_POLICY = FLAG_STATUS_ERROR | 25;

    /**
     * Device provisioning error status indicating that deleting non-required applications during
     * provisioning failed.
     */
    public static final int STATUS_ERROR_DELETE_APPS = FLAG_STATUS_ERROR | 26;

    /**
     * Device provisioning error status code that indicates that a provisioning attempt has failed
     * because the device has already been provisioned or that provisioning has already started.
     */
    public static final int STATUS_ERROR_DOUBLE_BUMP = FLAG_STATUS_ERROR | 30;

    private DeviceInitializerStatus() {}
}
+1 −103
Original line number Diff line number Diff line
@@ -539,50 +539,6 @@ public class DevicePolicyManager {
    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.
     *
     * <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_BT_MAC_ADDRESS
            = "android.app.extra.PROVISIONING_BT_MAC_ADDRESS";

    /**
     * A String extra holding the Bluetooth service UUID on the device to connect to with status
     * updates during provisioning.
     *
     * <p>This value must be specified when {@code #EXTRA_PROVISIONING_BT_MAC_ADDRESS} is present.
     *
     * <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_BT_UUID
            = "android.app.extra.PROVISIONING_BT_UUID";

    /**
     * A String extra holding a unique identifier used to identify the device connecting over
     * Bluetooth. This identifier will be part of every status message sent to the remote device.
     *
     * <p>This value must be specified when {@code #EXTRA_PROVISIONING_BT_MAC_ADDRESS} is present.
     *
     * <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_BT_DEVICE_ID
            = "android.app.extra.PROVISIONING_BT_DEVICE_ID";

    /**
     * A Boolean extra that that will cause a provisioned device to temporarily proxy network
     * traffic over Bluetooth. When a Wi-Fi network is available, the network proxy will stop.
     *
     * <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_BT_USE_PROXY
            = "android.app.extra.PROVISIONING_BT_USE_PROXY";

    /**
     * A {@link android.os.Parcelable} extra of type {@link android.os.PersistableBundle} that
     * holds data needed by the system to wipe factory reset protection. The data needed to wipe
@@ -665,11 +621,7 @@ public class DevicePolicyManager {
     * Replaces {@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME}. The value of the property
     * should be converted to a String via
     * {@link android.content.ComponentName#flattenToString()}</li>
     * <li>{@link #EXTRA_PROVISIONING_DEVICE_ADMIN_MINIMUM_VERSION_CODE}, optional</li>
     * <li>{@link #EXTRA_PROVISIONING_BT_MAC_ADDRESS}, optional</li>
     * <li>{@link #EXTRA_PROVISIONING_BT_UUID}, optional</li>
     * <li>{@link #EXTRA_PROVISIONING_BT_DEVICE_ID}, optional</li>
     * <li>{@link #EXTRA_PROVISIONING_BT_USE_PROXY}, optional</li></ul>
     * <li>{@link #EXTRA_PROVISIONING_DEVICE_ADMIN_MINIMUM_VERSION_CODE}, optional</li></ul>
     *
     * <p> When device owner provisioning has completed, an intent of the type
     * {@link DeviceAdminReceiver#ACTION_PROFILE_PROVISIONING_COMPLETE} is broadcasted to the
@@ -726,45 +678,6 @@ public class DevicePolicyManager {
    public static final String ACTION_SET_PROFILE_OWNER
            = "android.app.action.SET_PROFILE_OWNER";

    /**
     * Protected broadcast action that will be sent to managed provisioning to notify it that a
     * status update has been reported by the device initializer. The status update will be
     * reported to the remote setup device over Bluetooth.
     *
     * <p>Broadcasts with this action must supply a
     * {@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
     * {@link EXTRA_DEVICE_INITIALIZER_STATUS_DESCRIPTION} extra.
     * @hide
     */
    @SystemApi
    public static final String ACTION_SEND_DEVICE_INITIALIZER_STATUS
            = "android.app.action.SEND_DEVICE_INITIALIZER_STATUS";

    /**
     * An integer extra that contains the status code that defines a status update. This extra must
     * 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#FLAG_STATUS_CUSTOM}.
     * @hide
     */
    @SystemApi
    public static final String EXTRA_DEVICE_INITIALIZER_STATUS_CODE
            = "android.app.extra.DEVICE_INITIALIZER_STATUS_CODE";

    /**
     * A {@code String} extra that contains an optional description accompanying a status update.
     * This extra my be sent as part of a broadcast with an action of
     * {@code ACTION_SEND_DEVICE_INITIALIZER_STATUS}.
     * @hide
     */
    @SystemApi
    public static final String EXTRA_DEVICE_INITIALIZER_STATUS_DESCRIPTION
            = "android.app.extra.DEVICE_INITIALIZER_STATUS_DESCRIPTION";

    /**
     * @hide
     * Name of the profile owner admin that controls the user.
@@ -4290,21 +4203,6 @@ 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#FLAG_STATUS_CUSTOM}.
     * @param description custom description of the status code sent
     */
    public void sendDeviceInitializerStatus(int statusCode, String description) {
        try {
            mService.sendDeviceInitializerStatus(statusCode, description);
        } catch (RemoteException re) {
            Log.w(TAG, "Could not send device initializer status", re);
        }
    }

    /**
     * Called by device owners to set a local system update policy. When a new policy is set,
     * {@link #ACTION_SYSTEM_UPDATE_POLICY_CHANGED} is broadcasted.
Loading