Log API calls to createBond(), cancelBondProcess(), removeBond()

In an attempt to better be able to debug Bluetooth-related parts of
the system, add info-level logging including calling process and
thread whenever the aforementioned functions are called.

Bug: 25996120
Change-Id: I5a72b2ab929f805ec1c43cc54879ed079a8dfe34
diff --git a/core/java/android/bluetooth/BluetoothDevice.java b/core/java/android/bluetooth/BluetoothDevice.java
index d27dfa0..cd5c205 100644
--- a/core/java/android/bluetooth/BluetoothDevice.java
+++ b/core/java/android/bluetooth/BluetoothDevice.java
@@ -25,6 +25,7 @@
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.os.ParcelUuid;
+import android.os.Process;
 import android.os.RemoteException;
 import android.util.Log;
 
@@ -823,6 +824,9 @@
             return false;
         }
         try {
+            Log.i(TAG, "createBond() for device " + getAddress() +
+                    " called by pid: " + Process.myPid() +
+                    " tid: " + Process.myTid());
             return sService.createBond(this, TRANSPORT_AUTO);
         } catch (RemoteException e) {Log.e(TAG, "", e);}
         return false;
@@ -854,6 +858,9 @@
             throw new IllegalArgumentException(transport + " is not a valid Bluetooth transport");
         }
         try {
+            Log.i(TAG, "createBond() for device " + getAddress() +
+                    " called by pid: " + Process.myPid() +
+                    " tid: " + Process.myTid());
             return sService.createBond(this, transport);
         } catch (RemoteException e) {Log.e(TAG, "", e);}
         return false;
@@ -922,6 +929,9 @@
             return false;
         }
         try {
+            Log.i(TAG, "cancelBondProcess() for device " + getAddress() +
+                    " called by pid: " + Process.myPid() +
+                    " tid: " + Process.myTid());
             return sService.cancelBondProcess(this);
         } catch (RemoteException e) {Log.e(TAG, "", e);}
         return false;
@@ -943,6 +953,9 @@
             return false;
         }
         try {
+            Log.i(TAG, "removeBond() for device " + getAddress() +
+                    " called by pid: " + Process.myPid() +
+                    " tid: " + Process.myTid());
             return sService.removeBond(this);
         } catch (RemoteException e) {Log.e(TAG, "", e);}
         return false;