Loading android/app/src/com/android/bluetooth/btservice/AdapterProperties.java +20 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ class AdapterProperties { private boolean mIsLeCodedPhySupported; private boolean mIsLeExtendedAdvertisingSupported; private boolean mIsLePeriodicAdvertisingSupported; private int mLeMaximumAdvertisingDataLength; private BroadcastReceiver mReceiver = new BroadcastReceiver() { @Override Loading Loading @@ -312,6 +313,13 @@ class AdapterProperties { return mIsLePeriodicAdvertisingSupported; } /** * @return the getLeMaximumAdvertisingDataLength */ int getLeMaximumAdvertisingDataLength() { return mLeMaximumAdvertisingDataLength; } /** * @return total number of trackable advertisements */ Loading Loading @@ -629,6 +637,8 @@ class AdapterProperties { mIsLeCodedPhySupported = ((0xFF & ((int) val[15])) != 0); mIsLeExtendedAdvertisingSupported = ((0xFF & ((int) val[16])) != 0); mIsLePeriodicAdvertisingSupported = ((0xFF & ((int) val[17])) != 0); mLeMaximumAdvertisingDataLength = (0xFF & ((int)val[18])) + ((0xFF & ((int)val[19])) << 8); Log.d(TAG, "BT_PROPERTY_LOCAL_LE_FEATURES: update from BT controller" + " mNumOfAdvertisementInstancesSupported = " Loading @@ -650,6 +660,16 @@ class AdapterProperties { + mIsExtendedScanSupported + " mIsDebugLogSupported = " + mIsDebugLogSupported + " mIsLe2MPhySupported = " + mIsLe2MPhySupported + " mIsLeCodedPhySupported = " + mIsLeCodedPhySupported + " mIsLeExtendedAdvertisingSupported = " + mIsLeExtendedAdvertisingSupported + " mIsLePeriodicAdvertisingSupported = " + mIsLePeriodicAdvertisingSupported + " mLeMaximumAdvertisingDataLength = " + mLeMaximumAdvertisingDataLength ); } Loading android/app/src/com/android/bluetooth/btservice/AdapterService.java +11 −0 Original line number Diff line number Diff line Loading @@ -1352,6 +1352,12 @@ public class AdapterService extends Service { return service.isLePeriodicAdvertisingSupported(); } public int getLeMaximumAdvertisingDataLength() { AdapterService service = getService(); if (service == null) return 0; return service.getLeMaximumAdvertisingDataLength(); } public boolean isActivityAndEnergyReportingSupported() { AdapterService service = getService(); if (service == null) return false; Loading Loading @@ -1919,6 +1925,11 @@ public class AdapterService extends Service { return mAdapterProperties.isLePeriodicAdvertisingSupported(); } public int getLeMaximumAdvertisingDataLength() { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); return mAdapterProperties.getLeMaximumAdvertisingDataLength(); } private BluetoothActivityEnergyInfo reportActivityInfo() { enforceCallingOrSelfPermission(BLUETOOTH_PRIVILEGED, "Need BLUETOOTH permission"); if (mAdapterProperties.getState() != BluetoothAdapter.STATE_ON || Loading Loading
android/app/src/com/android/bluetooth/btservice/AdapterProperties.java +20 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ class AdapterProperties { private boolean mIsLeCodedPhySupported; private boolean mIsLeExtendedAdvertisingSupported; private boolean mIsLePeriodicAdvertisingSupported; private int mLeMaximumAdvertisingDataLength; private BroadcastReceiver mReceiver = new BroadcastReceiver() { @Override Loading Loading @@ -312,6 +313,13 @@ class AdapterProperties { return mIsLePeriodicAdvertisingSupported; } /** * @return the getLeMaximumAdvertisingDataLength */ int getLeMaximumAdvertisingDataLength() { return mLeMaximumAdvertisingDataLength; } /** * @return total number of trackable advertisements */ Loading Loading @@ -629,6 +637,8 @@ class AdapterProperties { mIsLeCodedPhySupported = ((0xFF & ((int) val[15])) != 0); mIsLeExtendedAdvertisingSupported = ((0xFF & ((int) val[16])) != 0); mIsLePeriodicAdvertisingSupported = ((0xFF & ((int) val[17])) != 0); mLeMaximumAdvertisingDataLength = (0xFF & ((int)val[18])) + ((0xFF & ((int)val[19])) << 8); Log.d(TAG, "BT_PROPERTY_LOCAL_LE_FEATURES: update from BT controller" + " mNumOfAdvertisementInstancesSupported = " Loading @@ -650,6 +660,16 @@ class AdapterProperties { + mIsExtendedScanSupported + " mIsDebugLogSupported = " + mIsDebugLogSupported + " mIsLe2MPhySupported = " + mIsLe2MPhySupported + " mIsLeCodedPhySupported = " + mIsLeCodedPhySupported + " mIsLeExtendedAdvertisingSupported = " + mIsLeExtendedAdvertisingSupported + " mIsLePeriodicAdvertisingSupported = " + mIsLePeriodicAdvertisingSupported + " mLeMaximumAdvertisingDataLength = " + mLeMaximumAdvertisingDataLength ); } Loading
android/app/src/com/android/bluetooth/btservice/AdapterService.java +11 −0 Original line number Diff line number Diff line Loading @@ -1352,6 +1352,12 @@ public class AdapterService extends Service { return service.isLePeriodicAdvertisingSupported(); } public int getLeMaximumAdvertisingDataLength() { AdapterService service = getService(); if (service == null) return 0; return service.getLeMaximumAdvertisingDataLength(); } public boolean isActivityAndEnergyReportingSupported() { AdapterService service = getService(); if (service == null) return false; Loading Loading @@ -1919,6 +1925,11 @@ public class AdapterService extends Service { return mAdapterProperties.isLePeriodicAdvertisingSupported(); } public int getLeMaximumAdvertisingDataLength() { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); return mAdapterProperties.getLeMaximumAdvertisingDataLength(); } private BluetoothActivityEnergyInfo reportActivityInfo() { enforceCallingOrSelfPermission(BLUETOOTH_PRIVILEGED, "Need BLUETOOTH permission"); if (mAdapterProperties.getState() != BluetoothAdapter.STATE_ON || Loading