Loading android/app/src/com/android/bluetooth/btservice/ProfileService.java +4 −8 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ public abstract class ProfileService extends Service { @Override public void onCreate() { if (DBG) { log("onCreate"); Log.d(mName, "onCreate"); } super.onCreate(); mAdapter = BluetoothAdapter.getDefaultAdapter(); Loading @@ -127,7 +127,7 @@ public abstract class ProfileService extends Service { @Override public int onStartCommand(Intent intent, int flags, int startId) { if (DBG) { log("onStartCommand()"); Log.d(mName, "onStartCommand()"); } if (checkCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM) Loading Loading @@ -156,7 +156,7 @@ public abstract class ProfileService extends Service { @Override public IBinder onBind(Intent intent) { if (DBG) { log("onBind"); Log.d(mName, "onBind"); } if (mAdapter != null && mBinder == null) { // initBinder returned null, you can't bind Loading @@ -168,7 +168,7 @@ public abstract class ProfileService extends Service { @Override public boolean onUnbind(Intent intent) { if (DBG) { log("onUnbind"); Log.d(mName, "onUnbind"); } return super.onUnbind(intent); } Loading Loading @@ -297,8 +297,4 @@ public abstract class ProfileService extends Service { } return null; } protected void log(String msg) { Log.d(mName, msg); } } android/app/src/com/android/bluetooth/hdp/HealthService.java +6 −5 Original line number Diff line number Diff line Loading @@ -147,7 +147,7 @@ public class HealthService extends ProfileService { @Override public void handleMessage(Message msg) { if (DBG) { log("HealthService Handler msg: " + msg.what); Log.d(TAG, "HealthService Handler msg: " + msg.what); } switch (msg.what) { case MESSAGE_REGISTER_APPLICATION: { Loading @@ -160,8 +160,8 @@ public class HealthService extends ProfileService { int halRole = convertRoleToHal(appConfig.getRole()); int halChannelType = convertChannelTypeToHal(appConfig.getChannelType()); if (VDBG) { log("register datatype: " + appConfig.getDataType() + " role: " + halRole + " name: " + appConfig.getName() + " channeltype: " Log.d(TAG, "register datatype: " + appConfig.getDataType() + " role: " + halRole + " name: " + appConfig.getName() + " channeltype: " + halChannelType); } int appId = registerHealthAppNative(appConfig.getDataType(), halRole, Loading Loading @@ -554,7 +554,7 @@ public class HealthService extends ProfileService { private void callStatusCallback(BluetoothHealthAppConfiguration config, int status) { if (VDBG) { log("Health Device Application: " + config + " State Change: status:" + status); Log.d(TAG, "Health Device Application: " + config + " State Change: status:" + status); } IBluetoothHealthCallback callback = (mApps.get(config)).mCallback; if (callback == null) { Loading Loading @@ -636,7 +636,8 @@ public class HealthService extends ProfileService { BluetoothDevice device, int state, int prevState, ParcelFileDescriptor fd, int id) { broadcastHealthDeviceStateChange(device, state); log("Health Device Callback: " + device + " State Change: " + prevState + "->" + state); Log.d(TAG, "Health Device Callback: " + device + " State Change: " + prevState + "->" + state); ParcelFileDescriptor dupedFd = null; if (fd != null) { Loading android/app/src/com/android/bluetooth/hid/HidHostService.java +4 −4 Original line number Diff line number Diff line Loading @@ -235,7 +235,7 @@ public class HidHostService extends ProfileService { case MESSAGE_SET_PROTOCOL_MODE: { BluetoothDevice device = (BluetoothDevice) msg.obj; byte protocolMode = (byte) msg.arg1; log("sending set protocol mode(" + protocolMode + ")"); Log.d(TAG, "sending set protocol mode(" + protocolMode + ")"); if (!setProtocolModeNative(Utils.getByteAddress(device), protocolMode)) { Log.e(TAG, "Error: set protocol mode native returns false"); } Loading Loading @@ -751,7 +751,7 @@ public class HidHostService extends ProfileService { /* Notifying the connection state change of the profile before sending the intent for connection state change, as it was causing a race condition, with the UI not being updated with the correct connection state. */ log("Connection state " + device + ": " + prevState + "->" + newState); Log.d(TAG, "Connection state " + device + ": " + prevState + "->" + newState); Intent intent = new Intent(BluetoothHidHost.ACTION_CONNECTION_STATE_CHANGED); intent.putExtra(BluetoothProfile.EXTRA_PREVIOUS_STATE, prevState); intent.putExtra(BluetoothProfile.EXTRA_STATE, newState); Loading @@ -775,7 +775,7 @@ public class HidHostService extends ProfileService { intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); sendBroadcast(intent, BLUETOOTH_PERM); if (DBG) { log("Protocol Mode (" + device + "): " + protocolMode); Log.d(TAG, "Protocol Mode (" + device + "): " + protocolMode); } } Loading Loading @@ -803,7 +803,7 @@ public class HidHostService extends ProfileService { intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); sendBroadcast(intent, BLUETOOTH_PERM); if (DBG) { log("Idle time (" + device + "): " + idleTime); Log.d(TAG, "Idle time (" + device + "): " + idleTime); } } Loading android/app/src/com/android/bluetooth/pan/PanService.java +6 −4 Original line number Diff line number Diff line Loading @@ -194,7 +194,8 @@ public class PanService extends ProfileService { BluetoothDevice device = getDevice(cs.addr); // TBD get iface from the msg if (DBG) { log("MESSAGE_CONNECT_STATE_CHANGED: " + device + " state: " + cs.state); Log.d(TAG, "MESSAGE_CONNECT_STATE_CHANGED: " + device + " state: " + cs.state); } handlePanDeviceStateChange(device, mPanIfName /* iface */, convertHalState(cs.state), cs.local_role, cs.remote_role); Loading Loading @@ -462,8 +463,8 @@ public class PanService extends ProfileService { private void onConnectStateChanged(byte[] address, int state, int error, int localRole, int remoteRole) { if (DBG) { log("onConnectStateChanged: " + state + ", local role:" + localRole + ", remoteRole: " + remoteRole); Log.d(TAG, "onConnectStateChanged: " + state + ", local role:" + localRole + ", remoteRole: " + remoteRole); } Message msg = mHandler.obtainMessage(MESSAGE_CONNECT_STATE_CHANGED); msg.obj = new ConnectState(address, state, error, localRole, remoteRole); Loading @@ -472,7 +473,8 @@ public class PanService extends ProfileService { private void onControlStateChanged(int localRole, int state, int error, String ifname) { if (DBG) { log("onControlStateChanged: " + state + ", error: " + error + ", ifname: " + ifname); Log.d(TAG, "onControlStateChanged: " + state + ", error: " + error + ", ifname: " + ifname); } if (error == 0) { mPanIfName = ifname; Loading Loading
android/app/src/com/android/bluetooth/btservice/ProfileService.java +4 −8 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ public abstract class ProfileService extends Service { @Override public void onCreate() { if (DBG) { log("onCreate"); Log.d(mName, "onCreate"); } super.onCreate(); mAdapter = BluetoothAdapter.getDefaultAdapter(); Loading @@ -127,7 +127,7 @@ public abstract class ProfileService extends Service { @Override public int onStartCommand(Intent intent, int flags, int startId) { if (DBG) { log("onStartCommand()"); Log.d(mName, "onStartCommand()"); } if (checkCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM) Loading Loading @@ -156,7 +156,7 @@ public abstract class ProfileService extends Service { @Override public IBinder onBind(Intent intent) { if (DBG) { log("onBind"); Log.d(mName, "onBind"); } if (mAdapter != null && mBinder == null) { // initBinder returned null, you can't bind Loading @@ -168,7 +168,7 @@ public abstract class ProfileService extends Service { @Override public boolean onUnbind(Intent intent) { if (DBG) { log("onUnbind"); Log.d(mName, "onUnbind"); } return super.onUnbind(intent); } Loading Loading @@ -297,8 +297,4 @@ public abstract class ProfileService extends Service { } return null; } protected void log(String msg) { Log.d(mName, msg); } }
android/app/src/com/android/bluetooth/hdp/HealthService.java +6 −5 Original line number Diff line number Diff line Loading @@ -147,7 +147,7 @@ public class HealthService extends ProfileService { @Override public void handleMessage(Message msg) { if (DBG) { log("HealthService Handler msg: " + msg.what); Log.d(TAG, "HealthService Handler msg: " + msg.what); } switch (msg.what) { case MESSAGE_REGISTER_APPLICATION: { Loading @@ -160,8 +160,8 @@ public class HealthService extends ProfileService { int halRole = convertRoleToHal(appConfig.getRole()); int halChannelType = convertChannelTypeToHal(appConfig.getChannelType()); if (VDBG) { log("register datatype: " + appConfig.getDataType() + " role: " + halRole + " name: " + appConfig.getName() + " channeltype: " Log.d(TAG, "register datatype: " + appConfig.getDataType() + " role: " + halRole + " name: " + appConfig.getName() + " channeltype: " + halChannelType); } int appId = registerHealthAppNative(appConfig.getDataType(), halRole, Loading Loading @@ -554,7 +554,7 @@ public class HealthService extends ProfileService { private void callStatusCallback(BluetoothHealthAppConfiguration config, int status) { if (VDBG) { log("Health Device Application: " + config + " State Change: status:" + status); Log.d(TAG, "Health Device Application: " + config + " State Change: status:" + status); } IBluetoothHealthCallback callback = (mApps.get(config)).mCallback; if (callback == null) { Loading Loading @@ -636,7 +636,8 @@ public class HealthService extends ProfileService { BluetoothDevice device, int state, int prevState, ParcelFileDescriptor fd, int id) { broadcastHealthDeviceStateChange(device, state); log("Health Device Callback: " + device + " State Change: " + prevState + "->" + state); Log.d(TAG, "Health Device Callback: " + device + " State Change: " + prevState + "->" + state); ParcelFileDescriptor dupedFd = null; if (fd != null) { Loading
android/app/src/com/android/bluetooth/hid/HidHostService.java +4 −4 Original line number Diff line number Diff line Loading @@ -235,7 +235,7 @@ public class HidHostService extends ProfileService { case MESSAGE_SET_PROTOCOL_MODE: { BluetoothDevice device = (BluetoothDevice) msg.obj; byte protocolMode = (byte) msg.arg1; log("sending set protocol mode(" + protocolMode + ")"); Log.d(TAG, "sending set protocol mode(" + protocolMode + ")"); if (!setProtocolModeNative(Utils.getByteAddress(device), protocolMode)) { Log.e(TAG, "Error: set protocol mode native returns false"); } Loading Loading @@ -751,7 +751,7 @@ public class HidHostService extends ProfileService { /* Notifying the connection state change of the profile before sending the intent for connection state change, as it was causing a race condition, with the UI not being updated with the correct connection state. */ log("Connection state " + device + ": " + prevState + "->" + newState); Log.d(TAG, "Connection state " + device + ": " + prevState + "->" + newState); Intent intent = new Intent(BluetoothHidHost.ACTION_CONNECTION_STATE_CHANGED); intent.putExtra(BluetoothProfile.EXTRA_PREVIOUS_STATE, prevState); intent.putExtra(BluetoothProfile.EXTRA_STATE, newState); Loading @@ -775,7 +775,7 @@ public class HidHostService extends ProfileService { intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); sendBroadcast(intent, BLUETOOTH_PERM); if (DBG) { log("Protocol Mode (" + device + "): " + protocolMode); Log.d(TAG, "Protocol Mode (" + device + "): " + protocolMode); } } Loading Loading @@ -803,7 +803,7 @@ public class HidHostService extends ProfileService { intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); sendBroadcast(intent, BLUETOOTH_PERM); if (DBG) { log("Idle time (" + device + "): " + idleTime); Log.d(TAG, "Idle time (" + device + "): " + idleTime); } } Loading
android/app/src/com/android/bluetooth/pan/PanService.java +6 −4 Original line number Diff line number Diff line Loading @@ -194,7 +194,8 @@ public class PanService extends ProfileService { BluetoothDevice device = getDevice(cs.addr); // TBD get iface from the msg if (DBG) { log("MESSAGE_CONNECT_STATE_CHANGED: " + device + " state: " + cs.state); Log.d(TAG, "MESSAGE_CONNECT_STATE_CHANGED: " + device + " state: " + cs.state); } handlePanDeviceStateChange(device, mPanIfName /* iface */, convertHalState(cs.state), cs.local_role, cs.remote_role); Loading Loading @@ -462,8 +463,8 @@ public class PanService extends ProfileService { private void onConnectStateChanged(byte[] address, int state, int error, int localRole, int remoteRole) { if (DBG) { log("onConnectStateChanged: " + state + ", local role:" + localRole + ", remoteRole: " + remoteRole); Log.d(TAG, "onConnectStateChanged: " + state + ", local role:" + localRole + ", remoteRole: " + remoteRole); } Message msg = mHandler.obtainMessage(MESSAGE_CONNECT_STATE_CHANGED); msg.obj = new ConnectState(address, state, error, localRole, remoteRole); Loading @@ -472,7 +473,8 @@ public class PanService extends ProfileService { private void onControlStateChanged(int localRole, int state, int error, String ifname) { if (DBG) { log("onControlStateChanged: " + state + ", error: " + error + ", ifname: " + ifname); Log.d(TAG, "onControlStateChanged: " + state + ", error: " + error + ", ifname: " + ifname); } if (error == 0) { mPanIfName = ifname; Loading