Add additional logging for device properties

Bug: 31947953
Test: Manual
Change-Id: I7e23b55c03e7f0382d59efe9a94221ed4bdf57ab
(cherry picked from commit 055babc4ab16a11320ffd44e2a1dea97047feb55)
diff --git a/src/com/android/bluetooth/btservice/RemoteDevices.java b/src/com/android/bluetooth/btservice/RemoteDevices.java
index 9048036..7d3d319 100644
--- a/src/com/android/bluetooth/btservice/RemoteDevices.java
+++ b/src/com/android/bluetooth/btservice/RemoteDevices.java
@@ -34,7 +34,7 @@
 import java.util.Queue;
 
 final class RemoteDevices {
-    private static final boolean DBG = false;
+    private static final boolean DBG = true;
     private static final String TAG = "BluetoothRemoteDevices";
 
     // Maximum number of device properties to remember
@@ -256,20 +256,27 @@
         BluetoothDevice bdDevice = getDevice(address);
         DeviceProperties device;
         if (bdDevice == null) {
+            debugLog("Added new device property");
             device = addDeviceProperties(address);
             bdDevice = getDevice(address);
         } else {
             device = getDeviceProperties(bdDevice);
         }
 
+        if (types.length <= 0) {
+            errorLog("No properties to update");
+            return;
+        }
+
         for (int j = 0; j < types.length; j++) {
             type = types[j];
             val = values[j];
-            if(val.length <= 0)
+            if (val.length <= 0)
                 errorLog("devicePropertyChangedCallback: bdDevice: " + bdDevice
                         + ", value is empty for type: " + type);
             else {
                 synchronized(mObject) {
+                    debugLog("Property type: " + type);
                     switch (type) {
                         case AbstractionLayer.BT_PROPERTY_BDNAME:
                             device.mName = new String(val);