Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f76d61d authored by Palash Ahuja's avatar Palash Ahuja
Browse files

[BluetoothMetrics]: Logging RDI for HFP metric

Bug: 330953458
Test: m com.android.btservices and Manual test with HFP and running statsd_testdrive
Flag: EXEMPT, Metrics Logging

Change-Id: Iad32160ec33eb27d66aa61f5bb5edfaf25b7a6a2
parent 69eeeabd
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ import android.util.Log;
import com.android.bluetooth.BluetoothStatsLog;
import com.android.bluetooth.Utils;
import com.android.bluetooth.btservice.AdapterService;
import com.android.bluetooth.btservice.MetricsLogger;
import com.android.bluetooth.btservice.ProfileService;
import com.android.bluetooth.btservice.storage.DatabaseManager;
import com.android.bluetooth.flags.Flags;
@@ -586,7 +587,8 @@ public class HeadsetStateMachine extends StateMachine {
                                BluetoothProtoEnums.RESULT_FAILURE,
                                BluetoothProfile.STATE_DISCONNECTED,
                                BluetoothProfile.STATE_DISCONNECTED,
                                BluetoothProtoEnums.REASON_NATIVE_LAYER_REJECTED);
                                BluetoothProtoEnums.REASON_NATIVE_LAYER_REJECTED,
                                MetricsLogger.getInstance().getRemoteDeviceInfoProto(mDevice));
                        break;
                    }
                    transitionTo(mConnecting);
@@ -654,7 +656,8 @@ public class HeadsetStateMachine extends StateMachine {
                                BluetoothProtoEnums.RESULT_FAILURE,
                                BluetoothProfile.STATE_DISCONNECTED,
                                BluetoothProfile.STATE_DISCONNECTED,
                                BluetoothProtoEnums.REASON_INCOMING_CONN_REJECTED);
                                BluetoothProtoEnums.REASON_INCOMING_CONN_REJECTED,
                                MetricsLogger.getInstance().getRemoteDeviceInfoProto(mDevice));
                    }
                    break;
                case HeadsetHalConstants.CONNECTION_STATE_DISCONNECTING:
@@ -681,7 +684,8 @@ public class HeadsetStateMachine extends StateMachine {
                        result,
                        mPrevState.getConnectionStateInt(),
                        BluetoothProfile.STATE_DISCONNECTED,
                        BluetoothProtoEnums.REASON_UNEXPECTED_STATE);
                        BluetoothProtoEnums.REASON_UNEXPECTED_STATE,
                        MetricsLogger.getInstance().getRemoteDeviceInfoProto(mDevice));
            }
        }
    }
@@ -1324,7 +1328,8 @@ public class HeadsetStateMachine extends StateMachine {
                        BluetoothProtoEnums.RESULT_SUCCESS,
                        mPrevState.getConnectionStateInt(),
                        BluetoothProfile.STATE_CONNECTED,
                        BluetoothProtoEnums.REASON_SUCCESS);
                        BluetoothProtoEnums.REASON_SUCCESS,
                        MetricsLogger.getInstance().getRemoteDeviceInfoProto(mDevice));
            }
        }
    }