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

Commit 3c6b1fa5 authored by Andre Eisenbach's avatar Andre Eisenbach
Browse files

LE: Do not invoke callback if retrying read/write operation

When a descriptor read/write operation fails with insufficient
authentication/encryption, it will automatically be tried again with
elevated security requirements. The first (failed) attempt should not be
reported to the application requesting the read/write, since it will get
the 2nd callback once the retry succeeds/fails.

Change-Id: Ia27b91afa63b6f9ffdc597d59c24d29f3d8a1008
parent 44523493
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -491,6 +491,7 @@ public final class BluetoothGatt implements BluetoothProfile {
                        mService.readDescriptor(mClientIf, address,
                            srvcType, srvcInstId, srvcUuid, charInstId, charUuid,
                            descrInstId, descrUuid, AUTHENTICATION_MITM);
                        return;
                    } catch (RemoteException e) {
                        Log.e(TAG,"",e);
                    }
@@ -544,6 +545,7 @@ public final class BluetoothGatt implements BluetoothProfile {
                            srvcType, srvcInstId, srvcUuid, charInstId, charUuid,
                            descrInstId, descrUuid, characteristic.getWriteType(),
                            AUTHENTICATION_MITM, descriptor.getValue());
                        return;
                    } catch (RemoteException e) {
                        Log.e(TAG,"",e);
                    }