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

Commit e6b71f10 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "[BluetoothMetrics] Adding Counter Metrics for AutoConnect=true/false" am: 3e3546ab

parents 46ce2db8 3e3546ab
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -84,6 +84,7 @@ import com.android.bluetooth.Utils;
import com.android.bluetooth.btservice.AbstractionLayer;
import com.android.bluetooth.btservice.AdapterService;
import com.android.bluetooth.btservice.BluetoothAdapterProxy;
import com.android.bluetooth.btservice.MetricsLogger;
import com.android.bluetooth.btservice.CompanionManager;
import com.android.bluetooth.btservice.ProfileService;
import com.android.bluetooth.util.NumberUtils;
@@ -3641,6 +3642,11 @@ public class GattService extends ProfileService {
                    + opportunistic + ", phy=" + phy);
        }
        statsLogAppPackage(address, attributionSource.getUid(), clientIf);
        if (isDirect) {
          MetricsLogger.getInstance().count(BluetoothProtoEnums.GATT_CLIENT_CONNECT_IS_DIRECT, 1);
        } else {
          MetricsLogger.getInstance().count(BluetoothProtoEnums.GATT_CLIENT_CONNECT_IS_AUTOCONNECT, 1);
        }
        statsLogGattConnectionStateChange(
                BluetoothProfile.GATT, address, clientIf,
                BluetoothProtoEnums.CONNECTION_STATE_CONNECTING, -1);