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

Commit ba865948 authored by Ganesh Ganapathi Batta's avatar Ganesh Ganapathi Batta Committed by Prerepa Viswanadham
Browse files

Add support for retrieving local LE features via get_adapter_properties

Change-Id: Iada59d0c7aa776f8b3aa25abec1a7612224a43bb
parent 3d7e334a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -45,6 +45,9 @@ final public class AbstractionLayer {
    static final int BT_PROPERTY_REMOTE_FRIENDLY_NAME = 0x0A;
    static final int BT_PROPERTY_REMOTE_RSSI = 0x0B;

    static final int BT_PROPERTY_REMOTE_VERSION_INFO = 0x0C;
    static final int BT_PROPERTY_LOCAL_LE_FEATURES = 0x0D;

    static final int BT_DEVICE_TYPE_BREDR = 0x01;
    static final int BT_DEVICE_TYPE_BLE = 0x02;
    static final int BT_DEVICE_TYPE_DUAL = 0x03;
+17 −0
Original line number Diff line number Diff line
@@ -487,6 +487,23 @@ class AdapterProperties {
                        mDiscoverableTimeout = Utils.byteArrayToInt(val, 0);
                        debugLog("Discoverable Timeout:" + mDiscoverableTimeout);
                        break;

                    case AbstractionLayer.BT_PROPERTY_LOCAL_LE_FEATURES:
                        int local_privacy_enabled = val[0];
                        int max_adv_instance = val [1];
                        int rpa_offload_supported = val [2];
                        int max_irk_list_size = val [3];
                        int max_adv_filter_supported = val[4];
                        int scan_result_storage_size = val[5];

                        debugLog("BT_PROPERTY_LOCAL_LE_FEATURES: privacy = " +local_privacy_enabled
                                      + " max adv instance = " + max_adv_instance
                                      + " rpa_offload_supported = " + rpa_offload_supported
                                      + " max_irk_list_size = " + max_irk_list_size
                                      + " max_adv_filter_supported = " + max_adv_filter_supported
                                      + " scan_result_storage_size = " + scan_result_storage_size);
                        break;

                    default:
                        errorLog("Property change not handled in Java land:" + type);
                }