BT: Update add-on features vendor command support[1/2]

 - Update the status of  add-on features vendor
   command support to the application.

CRs-Fixed: 2407876
Change-Id: Ib293662fb2c4645e58a34e1007b02d6871dc12fe
diff --git a/packages_apps_bluetooth_ext/src/btservice/Vendor.java b/packages_apps_bluetooth_ext/src/btservice/Vendor.java
index b363eb2..6acaf4e 100644
--- a/packages_apps_bluetooth_ext/src/btservice/Vendor.java
+++ b/packages_apps_bluetooth_ext/src/btservice/Vendor.java
@@ -198,9 +198,7 @@
     void adapterPropertyChangedCallback(int[] types, byte[][] values) {
         byte[] val;
         int type;
-        short twsPlusType;
-        boolean autoConnect;
-        byte[] mPeerAddress;
+
         if (types.length <= 0) {
             Log.e(TAG, "No properties to update");
             return;
@@ -209,16 +207,14 @@
         for (int j = 0; j < types.length; j++) {
             type = types[j];
             val = values[j];
-            if (val.length > 0) {
-                Log.d(TAG, "Property type: " + type);
-                switch (type) {
-                    case AbstractionLayer.BT_VENDOR_PROPERTY_HOST_ADD_ON_FEATURES:
-                        mService.updateHostFeatureSupport(val);
-                        break;
-                    case AbstractionLayer.BT_VENDOR_PROPERTY_SOC_ADD_ON_FEATURES:
-                        mService.updateSocFeatureSupport(val);
-                        break;
-                }
+            Log.d(TAG, "Property type: " + type);
+            switch (type) {
+                case AbstractionLayer.BT_VENDOR_PROPERTY_HOST_ADD_ON_FEATURES:
+                    mService.updateHostFeatureSupport(val);
+                    break;
+                case AbstractionLayer.BT_VENDOR_PROPERTY_SOC_ADD_ON_FEATURES:
+                    mService.updateSocFeatureSupport(val);
+                    break;
             }
         }
     }
diff --git a/system_bt_ext/btif/src/btif_vendor.cc b/system_bt_ext/btif/src/btif_vendor.cc
index a0bb0e7..9d1f7f1 100644
--- a/system_bt_ext/btif/src/btif_vendor.cc
+++ b/system_bt_ext/btif/src/btif_vendor.cc
@@ -185,18 +185,20 @@
     uint8_t add_on_features_len = 0;
     bt_vendor_property_t vnd_prop;
     char buf[8];
+    vnd_prop.len = 0;
     const controller_t* controller = controller_get_interface();
     if(controller) {
         const bt_device_features_t* dev_features = controller->get_add_on_features(
                                     &add_on_features_len);
+
+        vnd_prop.type = BT_VENDOR_PROPERTY_SOC_ADD_ON_FEATURES;
+        vnd_prop.val = (void*)buf;
         if(dev_features && add_on_features_len > 0) {
-            vnd_prop.type = BT_VENDOR_PROPERTY_SOC_ADD_ON_FEATURES;
-            vnd_prop.val = (void*)buf;
             vnd_prop.len = add_on_features_len;
             memcpy(vnd_prop.val, dev_features, add_on_features_len);
-            HAL_CBACK(bt_vendor_callbacks, adapter_vendor_prop_cb,
-                                   BT_STATUS_SUCCESS, 1, &vnd_prop);
-         }
+        }
+        HAL_CBACK(bt_vendor_callbacks, adapter_vendor_prop_cb,
+                               BT_STATUS_SUCCESS, 1, &vnd_prop);
     }
 }