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

Commit fb2370e9 authored by Gurpreet Ghai's avatar Gurpreet Ghai Committed by Bruno Martins
Browse files

BT: Add new intent to broadcast IOT device details

This intent will be used to broadcast IOT device details
when IOT related issue is encountered.

CRs-Fixed: 2109009
Change-Id: I5eb97e3e2835a5acf3b2edb6c3d29e9da81bdc75
parent 22b31dd8
Loading
Loading
Loading
Loading
+75 −0
Original line number Original line Diff line number Diff line
@@ -229,6 +229,18 @@ public final class BluetoothDevice implements Parcelable {
    public static final String ACTION_BOND_STATE_CHANGED =
    public static final String ACTION_BOND_STATE_CHANGED =
            "android.bluetooth.device.action.BOND_STATE_CHANGED";
            "android.bluetooth.device.action.BOND_STATE_CHANGED";


     /**
     * Broadcast Action: Broadcast details of IOT device when an IOT
     * related issue is observed.
     * <p>Always contains the extra fields {@link #EXTRA_NAME}.
     * <p>Requires {@link android.Manifest.permission#BLUETOOTH} to receive.
     * @hide
     **/

    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
    public static final String ACTION_REMOTE_ISSUE_OCCURRED  =
            "org.codeaurora.intent.bluetooth.action.REMOTE_ISSUE_OCCURRED";

    /**
    /**
     * Broadcast Action: Indicates the battery level of a remote device has
     * Broadcast Action: Indicates the battery level of a remote device has
     * been retrieved for the first time, or changed since the last retrieval
     * been retrieved for the first time, or changed since the last retrieval
@@ -291,6 +303,69 @@ public final class BluetoothDevice implements Parcelable {
     */
     */
    public static final String EXTRA_BQR = "android.bluetooth.qti.extra.EXTRA_BQR";
    public static final String EXTRA_BQR = "android.bluetooth.qti.extra.EXTRA_BQR";


    /**
     * Used as a String extra field in {@link #ACTION_REMOTE_ISSUE_OCCURRED}
     * intents. It contains the type of IOT issue that occurred.
     * @hide
     */
    public static final String EXTRA_ISSUE_TYPE = "android.bluetooth.qti.extra.ERROR_TYPE";

    /**
     * Used as a String extra field in {@link #ACTION_REMOTE_ISSUE_OCCURRED} intents.
     * It contains the details of details of the issue.
     * @hide
     */
    public static final String EXTRA_ERROR_CODE = "android.bluetooth.qti.extra.ERROR_CODE";

    /**
     * Used as a String extra field in {@link #ACTION_REMOTE_ISSUE_OCCURRED} intents.
     * It contains the SoC event mask when issue occurred.
     * @hide
     */
    public static final String EXTRA_ERROR_EVENT_MASK = "android.bluetooth.qti.extra.ERROR_EVENT_MASK";

    /**
     * Used as a String extra field in {@link #ACTION_REMOTE_ISSUE_OCCURRED} intents.
     * It contains the LMP Version of IOT device.
     * @hide
     */
    public static final String EXTRA_LMP_VERSION = "android.bluetooth.qti.extra.EXTRA_LMP_VERSION";

    /**
     * Used as a String extra field in {@link #ACTION_REMOTE_ISSUE_OCCURRED} intents.
     * It contains the LMP Sub Version of IOT device.
     * @hide
     */
    public static final String EXTRA_LMP_SUBVER = "android.bluetooth.qti.extra.EXTRA_LMP_SUBVER";

    /**
     * Used as a String extra field in {@link #ACTION_REMOTE_ISSUE_OCCURRED} intents.
     * It contains the Manufacturer ID of IOT device.
     * @hide
     */
    public static final String EXTRA_MANUFACTURER = "android.bluetooth.qti.extra.EXTRA_MANUFACTURER";

    /**
     * Used as a String extra field in {@link #ACTION_REMOTE_ISSUE_OCCURRED} intents.
     * It contains the Power level.
     * @hide
     */
    public static final String EXTRA_POWER_LEVEL = "android.bluetooth.qti.extra.EXTRA_POWER_LEVEL";

    /**
     * Used as a String extra field in {@link #ACTION_REMOTE_ISSUE_OCCURRED} intents.
     * It contains the Link Quality of the connection.
     * @hide
     */
    public static final String EXTRA_LINK_QUALITY = "android.bluetooth.qti.extra.EXTRA_LINK_QUALITY";

    /**
     * Used as a String extra field in {@link #ACTION_REMOTE_ISSUE_OCCURRED} intents.
     * It contains the coutnt of glitches occured since last broadcast.
     * @hide
     */
    public static final String EXTRA_GLITCH_COUNT = "android.bluetooth.qti.extra.EXTRA_GLITCH_COUNT";

    /**
    /**
     * Used as an optional short extra field in {@link #ACTION_FOUND} intents.
     * Used as an optional short extra field in {@link #ACTION_FOUND} intents.
     * Contains the RSSI value of the remote device as reported by the
     * Contains the RSSI value of the remote device as reported by the
+1 −0
Original line number Original line Diff line number Diff line
@@ -160,6 +160,7 @@
    <protected-broadcast android:name="android.bluetooth.device.action.BATTERY_LEVEL_CHANGED" />
    <protected-broadcast android:name="android.bluetooth.device.action.BATTERY_LEVEL_CHANGED" />
    <protected-broadcast android:name="android.bluetooth.devicepicker.action.LAUNCH" />
    <protected-broadcast android:name="android.bluetooth.devicepicker.action.LAUNCH" />
    <protected-broadcast android:name="android.bluetooth.devicepicker.action.DEVICE_SELECTED" />
    <protected-broadcast android:name="android.bluetooth.devicepicker.action.DEVICE_SELECTED" />
    <protected-broadcast android:name="org.codeaurora.intent.bluetooth.action.REMOTE_ISSUE_OCCURRED" />
    <protected-broadcast
    <protected-broadcast
        android:name="android.bluetooth.headset.profile.action.CONNECTION_STATE_CHANGED" />
        android:name="android.bluetooth.headset.profile.action.CONNECTION_STATE_CHANGED" />
    <protected-broadcast
    <protected-broadcast