OSDN Git Service

DO NOT MERGE Blacklist devices for absolute volume control
authorAndre Eisenbach <eisenbach@google.com>
Wed, 2 Mar 2016 03:19:55 +0000 (03:19 +0000)
committerandroid-build-merger <android-build-merger@google.com>
Wed, 2 Mar 2016 03:19:55 +0000 (03:19 +0000)
am: 8fe9b6c9f7

* commit '8fe9b6c9f7538de91c1a3aded53518ca8c6d2fc0':
  DO NOT MERGE Blacklist devices for absolute volume control

1  2 
btif/src/btif_rc.c

diff --combined btif/src/btif_rc.c
@@@ -36,6 -36,7 +36,7 @@@
  #include "btif_common.h"
  #include "btif_util.h"
  #include "btif_av.h"
+ #include "device/include/interop.h"
  #include "hardware/bt_rc.h"
  #include "uinput.h"
  
@@@ -324,24 -325,19 +325,21 @@@ void handle_rc_features(
      bt_bdaddr_t rc_addr;
      bdcpy(rc_addr.address, btif_rc_cb.rc_addr);
  
-     // TODO(eisenbach): If devices need to be blacklisted for absolute
-     // volume, it should be added to device/include/interop_database.h
-     // For now, everything goes... If blacklisting is necessary, exclude
-     // the following bit here:
-     //    btif_rc_cb.rc_features &= ~BTA_AV_FEAT_ADV_CTRL;
+     if (interop_match(INTEROP_DISABLE_ABSOLUTE_VOLUME, &rc_addr))
+         btif_rc_cb.rc_features &= ~BTA_AV_FEAT_ADV_CTRL;
  
      if (btif_rc_cb.rc_features & BTA_AV_FEAT_BROWSE)
      {
          rc_features |= BTRC_FEAT_BROWSE;
      }
  
 +#if (AVRC_ADV_CTRL_INCLUDED == TRUE)
      if ( (btif_rc_cb.rc_features & BTA_AV_FEAT_ADV_CTRL) &&
           (btif_rc_cb.rc_features & BTA_AV_FEAT_RCTG))
      {
          rc_features |= BTRC_FEAT_ABSOLUTE_VOLUME;
      }
 +#endif
  
      if (btif_rc_cb.rc_features & BTA_AV_FEAT_METADATA)
      {