Merge changes from topic "incl_svc_parsing_fix"
* changes: Fix included service parsing (3/3) Bluetooth: fix typo in comment
This commit is contained in:
@@ -311,8 +311,7 @@ public final class BluetoothGatt implements BluetoothProfile {
|
|||||||
|
|
||||||
for (BluetoothGattService brokenRef : includedServices) {
|
for (BluetoothGattService brokenRef : includedServices) {
|
||||||
BluetoothGattService includedService = getService(mDevice,
|
BluetoothGattService includedService = getService(mDevice,
|
||||||
brokenRef.getUuid(), brokenRef.getInstanceId(),
|
brokenRef.getUuid(), brokenRef.getInstanceId());
|
||||||
brokenRef.getType());
|
|
||||||
if (includedService != null) {
|
if (includedService != null) {
|
||||||
fixedService.addIncludedService(includedService);
|
fixedService.addIncludedService(includedService);
|
||||||
} else {
|
} else {
|
||||||
@@ -714,10 +713,9 @@ public final class BluetoothGatt implements BluetoothProfile {
|
|||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
/*package*/ BluetoothGattService getService(BluetoothDevice device, UUID uuid,
|
/*package*/ BluetoothGattService getService(BluetoothDevice device, UUID uuid,
|
||||||
int instanceId, int type) {
|
int instanceId) {
|
||||||
for (BluetoothGattService svc : mServices) {
|
for (BluetoothGattService svc : mServices) {
|
||||||
if (svc.getDevice().equals(device)
|
if (svc.getDevice().equals(device)
|
||||||
&& svc.getType() == type
|
|
||||||
&& svc.getInstanceId() == instanceId
|
&& svc.getInstanceId() == instanceId
|
||||||
&& svc.getUuid().equals(uuid)) {
|
&& svc.getUuid().equals(uuid)) {
|
||||||
return svc;
|
return svc;
|
||||||
@@ -913,7 +911,7 @@ public final class BluetoothGatt implements BluetoothProfile {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the preferred connection PHY for this app. Please note that this is just a
|
* Set the preferred connection PHY for this app. Please note that this is just a
|
||||||
* recommendation, whether the PHY change will happen depends on other applications peferences,
|
* recommendation, whether the PHY change will happen depends on other applications preferences,
|
||||||
* local and remote controller capabilities. Controller can override these settings.
|
* local and remote controller capabilities. Controller can override these settings.
|
||||||
* <p>
|
* <p>
|
||||||
* {@link BluetoothGattCallback#onPhyUpdate} will be triggered as a result of this call, even
|
* {@link BluetoothGattCallback#onPhyUpdate} will be triggered as a result of this call, even
|
||||||
|
|||||||
Reference in New Issue
Block a user