From: Chris Manton Date: Sun, 17 Jan 2021 17:00:18 +0000 (-0800) Subject: Add API tACL_CONN::is_{disconnect/role_switch}_pending X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=1bd885574eef6b729fbeeb187f2e3da409091a81;p=android-x86%2Fsystem-bt.git Add API tACL_CONN::is_{disconnect/role_switch}_pending Towards encapsulated code Bug: 163134718 Tag: #refactor Test: gd/cert/run --host Change-Id: I0420630f45bb16719e669c9f75f929ba46c88c2e --- diff --git a/stack/acl/acl.h b/stack/acl/acl.h index 10c18c55f..88a0b2bd6 100644 --- a/stack/acl/acl.h +++ b/stack/acl/acl.h @@ -253,6 +253,14 @@ struct sACL_CONN { #define BTM_SEC_DISC_PENDING 2 /* Disconnect is pending */ uint8_t rs_disc_pending = BTM_SEC_RS_NOT_PENDING; + public: + bool is_disconnect_pending() const { + return rs_disc_pending == BTM_SEC_DISC_PENDING; + } + bool is_role_switch_pending() const { + return rs_disc_pending == BTM_SEC_RS_PENDING; + } + private: uint8_t switch_role_state_;