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

Commit 04942915 authored by Ömer Faruk Yılmaz's avatar Ömer Faruk Yılmaz
Browse files

Obfuscate address logging in GattService and a few other files

Bug: 376274765
Test: atest GattServiceTest
Flag: Exempt log change
Change-Id: If0c57cd783188815360ac0ae8ab02d71e9a5b656
parent 5e3ad229
Loading
Loading
Loading
Loading
+20 −4
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@

package com.android.bluetooth.btservice;

import android.bluetooth.BluetoothUtils;
import android.util.Log;

/**
@@ -62,7 +63,12 @@ public class InteropUtil {
            return false;
        }

        Log.d(TAG, "interopMatchAddr: feature=" + feature.name() + ", address=" + address);
        Log.d(
                TAG,
                "interopMatchAddr: feature="
                        + feature.name()
                        + ", address="
                        + BluetoothUtils.toAnonymizedAddress(address));
        if (address == null) {
            return false;
        }
@@ -121,7 +127,12 @@ public class InteropUtil {
            return false;
        }

        Log.d(TAG, "interopMatchAddrOrName: feature=" + feature.name() + ", address=" + address);
        Log.d(
                TAG,
                "interopMatchAddrOrName: feature="
                        + feature.name()
                        + ", address="
                        + BluetoothUtils.toAnonymizedAddress(address));
        if (address == null) {
            return false;
        }
@@ -156,7 +167,7 @@ public class InteropUtil {
                "interopDatabaseAddAddr: feature="
                        + feature.name()
                        + ", address="
                        + address
                        + BluetoothUtils.toAnonymizedAddress(address)
                        + ", length="
                        + length);
        if (address == null || (length <= 0 || length > 6)) {
@@ -184,7 +195,12 @@ public class InteropUtil {
            return;
        }

        Log.d(TAG, "interopDatabaseRemoveAddr: feature=" + feature.name() + ", address=" + address);
        Log.d(
                TAG,
                "interopDatabaseRemoveAddr: feature="
                        + feature.name()
                        + ", address="
                        + BluetoothUtils.toAnonymizedAddress(address));
        if (address == null) {
            return;
        }
+2 −1
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.bluetooth.BluetoothManager;
import android.bluetooth.BluetoothProfile;
import android.bluetooth.BluetoothProtoEnums;
import android.bluetooth.BluetoothSinkAudioPolicy;
import android.bluetooth.BluetoothUtils;
import android.bluetooth.IBluetoothConnectionCallback;
import android.content.Context;
import android.content.Intent;
@@ -183,7 +184,7 @@ public class RemoteDevices {

                        debugLog(
                                "reset(): address="
                                        + address
                                        + BluetoothUtils.toAnonymizedAddress(address)
                                        + ", connected="
                                        + bluetoothDevice.isConnected());

Loading