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

Commit 5e5c4133 authored by Sravan voleti's avatar Sravan voleti Committed by Bruno Martins
Browse files

DeviceGroup: UI frameworks changes

Add system APIS to support Group UI

CRs-Fixed: 2829452
Change-Id: Id7de6e48f3c8be05be0af172055c35cab322e5fe
parent b9404880
Loading
Loading
Loading
Loading
+37 −0
Original line number Diff line number Diff line
@@ -2897,4 +2897,41 @@ public final class BluetoothDevice implements Parcelable, Attributable {
    public static @MetadataKey int getMaxMetadataKey() {
        return METADATA_UNTETHERED_CASE_LOW_BATTERY_THRESHOLD;
    }

    /**
     * Returns Device type.
     *
     * @return device type.
     * @hide
     */
    @RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
    public int getDeviceType() {
        if (sService == null) {
            Log.e(TAG, "getDeviceType query remote device info failed");
            return -1;
        }
        try {
            return sService.getDeviceType(this);
        } catch (RemoteException e) {
            Log.e(TAG, "getDeviceType fail ", e);
        }
        return -1;
    }

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

    /**
     * Used as a String extra field in {@link #ACTION_BOND_STATE_CHANGED} intents.
     * It contains the IGNORE DEVICE flag of IOT device.
     * @hide
     */
    public static final String EXTRA_IS_PRIVATE_ADDRESS =
            "android.bluetooth.qti.extra.IS_PRIVATE_ADDRESS";


}