Loading android/app/src/com/android/bluetooth/btservice/AdapterProperties.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -720,7 +720,7 @@ class AdapterProperties { + prevState + " -> " + state); + prevState + " -> " + state); BluetoothStatsLog.write(BluetoothStatsLog.BLUETOOTH_CONNECTION_STATE_CHANGED, state, BluetoothStatsLog.write(BluetoothStatsLog.BLUETOOTH_CONNECTION_STATE_CHANGED, state, 0 /* deprecated */, profile, mService.obfuscateAddress(device), 0 /* deprecated */, profile, mService.obfuscateAddress(device), mService.getMetricId(device), 0); mService.getMetricId(device), 0, -1); if (!isNormalStateTransition(prevState, state)) { if (!isNormalStateTransition(prevState, state)) { Log.w(TAG, Log.w(TAG, Loading android/app/src/com/android/bluetooth/gatt/GattService.java +10 −8 Original line number Original line Diff line number Diff line Loading @@ -2054,7 +2054,7 @@ public class GattService extends ProfileService { (status == BluetoothGatt.GATT_SUCCESS), address); (status == BluetoothGatt.GATT_SUCCESS), address); } } statsLogGattConnectionStateChange( statsLogGattConnectionStateChange( BluetoothProfile.GATT, address, clientIf, connectionState); BluetoothProfile.GATT, address, clientIf, connectionState, status); } } void onDisconnected(int clientIf, int connId, int status, String address) void onDisconnected(int clientIf, int connId, int status, String address) Loading Loading @@ -2089,7 +2089,7 @@ public class GattService extends ProfileService { } } statsLogGattConnectionStateChange( statsLogGattConnectionStateChange( BluetoothProfile.GATT, address, clientIf, BluetoothProfile.GATT, address, clientIf, BluetoothProtoEnums.CONNECTION_STATE_DISCONNECTED); BluetoothProtoEnums.CONNECTION_STATE_DISCONNECTED, status); } } void onClientPhyUpdate(int connId, int txPhy, int rxPhy, int status) throws RemoteException { void onClientPhyUpdate(int connId, int txPhy, int rxPhy, int status) throws RemoteException { Loading Loading @@ -3437,7 +3437,7 @@ public class GattService extends ProfileService { statsLogAppPackage(address, attributionSource.getUid(), clientIf); statsLogAppPackage(address, attributionSource.getUid(), clientIf); statsLogGattConnectionStateChange( statsLogGattConnectionStateChange( BluetoothProfile.GATT, address, clientIf, BluetoothProfile.GATT, address, clientIf, BluetoothProtoEnums.CONNECTION_STATE_CONNECTING); BluetoothProtoEnums.CONNECTION_STATE_CONNECTING, -1); gattClientConnectNative(clientIf, address, isDirect, transport, opportunistic, phy); gattClientConnectNative(clientIf, address, isDirect, transport, opportunistic, phy); } } Loading @@ -3454,7 +3454,7 @@ public class GattService extends ProfileService { } } statsLogGattConnectionStateChange( statsLogGattConnectionStateChange( BluetoothProfile.GATT, address, clientIf, BluetoothProfile.GATT, address, clientIf, BluetoothProtoEnums.CONNECTION_STATE_DISCONNECTING); BluetoothProtoEnums.CONNECTION_STATE_DISCONNECTING, -1); gattClientDisconnectNative(clientIf, address, connId != null ? connId : 0); gattClientDisconnectNative(clientIf, address, connId != null ? connId : 0); } } Loading Loading @@ -4022,7 +4022,7 @@ public class GattService extends ProfileService { app.callback.onServerConnectionState((byte) 0, serverIf, connected, address); app.callback.onServerConnectionState((byte) 0, serverIf, connected, address); statsLogAppPackage(address, applicationUid, serverIf); statsLogAppPackage(address, applicationUid, serverIf); statsLogGattConnectionStateChange( statsLogGattConnectionStateChange( BluetoothProfile.GATT_SERVER, address, serverIf, connectionState); BluetoothProfile.GATT_SERVER, address, serverIf, connectionState, -1); } } void onServerReadCharacteristic(String address, int connId, int transId, int handle, int offset, void onServerReadCharacteristic(String address, int connId, int transId, int handle, int offset, Loading Loading @@ -4712,16 +4712,18 @@ public class GattService extends ProfileService { } } private void statsLogGattConnectionStateChange( private void statsLogGattConnectionStateChange( int profile, String address, int sessionIndex, int connectionState) { int profile, String address, int sessionIndex, int connectionState, int connectionStatus) { BluetoothDevice device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(address); BluetoothDevice device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(address); BluetoothStatsLog.write( BluetoothStatsLog.write( BluetoothStatsLog.BLUETOOTH_CONNECTION_STATE_CHANGED, connectionState, BluetoothStatsLog.BLUETOOTH_CONNECTION_STATE_CHANGED, connectionState, 0 /* deprecated */, profile, new byte[0], 0 /* deprecated */, profile, new byte[0], mAdapterService.getMetricId(device), sessionIndex); mAdapterService.getMetricId(device), sessionIndex, connectionStatus); if (DBG) { if (DBG) { Log.d(TAG, "Gatt Logging: metric_id=" + mAdapterService.getMetricId(device) Log.d(TAG, "Gatt Logging: metric_id=" + mAdapterService.getMetricId(device) + ", session_index=" + sessionIndex + ", session_index=" + sessionIndex + ", connection state=" + connectionState); + ", connection state=" + connectionState + ", connection status=" + connectionStatus); } } } } Loading Loading
android/app/src/com/android/bluetooth/btservice/AdapterProperties.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -720,7 +720,7 @@ class AdapterProperties { + prevState + " -> " + state); + prevState + " -> " + state); BluetoothStatsLog.write(BluetoothStatsLog.BLUETOOTH_CONNECTION_STATE_CHANGED, state, BluetoothStatsLog.write(BluetoothStatsLog.BLUETOOTH_CONNECTION_STATE_CHANGED, state, 0 /* deprecated */, profile, mService.obfuscateAddress(device), 0 /* deprecated */, profile, mService.obfuscateAddress(device), mService.getMetricId(device), 0); mService.getMetricId(device), 0, -1); if (!isNormalStateTransition(prevState, state)) { if (!isNormalStateTransition(prevState, state)) { Log.w(TAG, Log.w(TAG, Loading
android/app/src/com/android/bluetooth/gatt/GattService.java +10 −8 Original line number Original line Diff line number Diff line Loading @@ -2054,7 +2054,7 @@ public class GattService extends ProfileService { (status == BluetoothGatt.GATT_SUCCESS), address); (status == BluetoothGatt.GATT_SUCCESS), address); } } statsLogGattConnectionStateChange( statsLogGattConnectionStateChange( BluetoothProfile.GATT, address, clientIf, connectionState); BluetoothProfile.GATT, address, clientIf, connectionState, status); } } void onDisconnected(int clientIf, int connId, int status, String address) void onDisconnected(int clientIf, int connId, int status, String address) Loading Loading @@ -2089,7 +2089,7 @@ public class GattService extends ProfileService { } } statsLogGattConnectionStateChange( statsLogGattConnectionStateChange( BluetoothProfile.GATT, address, clientIf, BluetoothProfile.GATT, address, clientIf, BluetoothProtoEnums.CONNECTION_STATE_DISCONNECTED); BluetoothProtoEnums.CONNECTION_STATE_DISCONNECTED, status); } } void onClientPhyUpdate(int connId, int txPhy, int rxPhy, int status) throws RemoteException { void onClientPhyUpdate(int connId, int txPhy, int rxPhy, int status) throws RemoteException { Loading Loading @@ -3437,7 +3437,7 @@ public class GattService extends ProfileService { statsLogAppPackage(address, attributionSource.getUid(), clientIf); statsLogAppPackage(address, attributionSource.getUid(), clientIf); statsLogGattConnectionStateChange( statsLogGattConnectionStateChange( BluetoothProfile.GATT, address, clientIf, BluetoothProfile.GATT, address, clientIf, BluetoothProtoEnums.CONNECTION_STATE_CONNECTING); BluetoothProtoEnums.CONNECTION_STATE_CONNECTING, -1); gattClientConnectNative(clientIf, address, isDirect, transport, opportunistic, phy); gattClientConnectNative(clientIf, address, isDirect, transport, opportunistic, phy); } } Loading @@ -3454,7 +3454,7 @@ public class GattService extends ProfileService { } } statsLogGattConnectionStateChange( statsLogGattConnectionStateChange( BluetoothProfile.GATT, address, clientIf, BluetoothProfile.GATT, address, clientIf, BluetoothProtoEnums.CONNECTION_STATE_DISCONNECTING); BluetoothProtoEnums.CONNECTION_STATE_DISCONNECTING, -1); gattClientDisconnectNative(clientIf, address, connId != null ? connId : 0); gattClientDisconnectNative(clientIf, address, connId != null ? connId : 0); } } Loading Loading @@ -4022,7 +4022,7 @@ public class GattService extends ProfileService { app.callback.onServerConnectionState((byte) 0, serverIf, connected, address); app.callback.onServerConnectionState((byte) 0, serverIf, connected, address); statsLogAppPackage(address, applicationUid, serverIf); statsLogAppPackage(address, applicationUid, serverIf); statsLogGattConnectionStateChange( statsLogGattConnectionStateChange( BluetoothProfile.GATT_SERVER, address, serverIf, connectionState); BluetoothProfile.GATT_SERVER, address, serverIf, connectionState, -1); } } void onServerReadCharacteristic(String address, int connId, int transId, int handle, int offset, void onServerReadCharacteristic(String address, int connId, int transId, int handle, int offset, Loading Loading @@ -4712,16 +4712,18 @@ public class GattService extends ProfileService { } } private void statsLogGattConnectionStateChange( private void statsLogGattConnectionStateChange( int profile, String address, int sessionIndex, int connectionState) { int profile, String address, int sessionIndex, int connectionState, int connectionStatus) { BluetoothDevice device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(address); BluetoothDevice device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(address); BluetoothStatsLog.write( BluetoothStatsLog.write( BluetoothStatsLog.BLUETOOTH_CONNECTION_STATE_CHANGED, connectionState, BluetoothStatsLog.BLUETOOTH_CONNECTION_STATE_CHANGED, connectionState, 0 /* deprecated */, profile, new byte[0], 0 /* deprecated */, profile, new byte[0], mAdapterService.getMetricId(device), sessionIndex); mAdapterService.getMetricId(device), sessionIndex, connectionStatus); if (DBG) { if (DBG) { Log.d(TAG, "Gatt Logging: metric_id=" + mAdapterService.getMetricId(device) Log.d(TAG, "Gatt Logging: metric_id=" + mAdapterService.getMetricId(device) + ", session_index=" + sessionIndex + ", session_index=" + sessionIndex + ", connection state=" + connectionState); + ", connection state=" + connectionState + ", connection status=" + connectionStatus); } } } } Loading