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

Commit 879d96b8 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski Committed by Automerger Merge Worker
Browse files

csip: Force CSIP implementation to behave incorrectly am: 78b38488 am:...

csip: Force CSIP implementation to behave incorrectly am: 78b38488 am: aceffd8d am: e21948c8 am: 48105b28

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2142054



Change-Id: I8b87812d10a7b1e1ead0652f4eaa70d29ac1bc58
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 98b9c80c 48105b28
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -376,6 +376,7 @@ class CsisClientImpl : public CsisClient {
      if (next_dev) {
        auto next_csis_inst = next_dev->GetCsisInstanceByGroupId(group_id);
        LOG_ASSERT(csis_instance) << " csis_instance does not exist!";
#if CSIP_UPPER_TESTER_FORCE_TO_SEND_LOCK == FALSE
        if (next_csis_inst->GetLockState() ==
            CsisLockState::CSIS_STATE_LOCKED) {
          /* Somebody else managed to lock it.
@@ -384,6 +385,7 @@ class CsisClientImpl : public CsisClient {
          HandleCsisLockProcedureError(csis_group, next_dev);
          return;
        }
#endif
        SetLock(next_dev, next_csis_inst, CsisLockState::CSIS_STATE_LOCKED);
      }
    }
@@ -479,6 +481,7 @@ class CsisClientImpl : public CsisClient {
      return;
    }

#if CSIP_UPPER_TESTER_FORCE_TO_SEND_LOCK == FALSE
    if (lock && !csis_group->IsAvailableForCsisLockOperation()) {
      DLOG(INFO) << __func__ << " Group " << group_id << " locked by other";
      NotifyGroupStatus(group_id, false,
@@ -486,6 +489,7 @@ class CsisClientImpl : public CsisClient {
                        std::move(cb));
      return;
    }
#endif

    csis_group->SetTargetLockState(new_lock_state, std::move(cb));

+12 −0
Original line number Diff line number Diff line
@@ -560,6 +560,18 @@
#ifndef GATT_UPPER_TESTER_MULT_VARIABLE_LENGTH_READ
#define GATT_UPPER_TESTER_MULT_VARIABLE_LENGTH_READ FALSE
#endif

/******************************************************************************
 *
 * CSIP
 *
 *****************************************************************************/

/* Used to trigger invalid behaviour of CSIP test case PTS */
#ifndef CSIP_UPPER_TESTER_FORCE_TO_SEND_LOCK
#define CSIP_UPPER_TESTER_FORCE_TO_SEND_LOCK FALSE
#endif

/******************************************************************************
 *
 * SMP