From 2e7c27c2b5d773905ded3e89cbaa424744ddd897 Mon Sep 17 00:00:00 2001 From: Chris Manton Date: Sun, 29 Nov 2020 17:05:05 -0800 Subject: [PATCH] Add privatize option for bluetooth addresses for logging Toward loggable code Bug: 163134718 Tag: #refactor Test: gd/cert/run --host Change-Id: Id568adb9f9497072a79100202501c4d207e40828 --- main/shim/dumpsys.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main/shim/dumpsys.h b/main/shim/dumpsys.h index 91c4ea74618..21339463265 100644 --- a/main/shim/dumpsys.h +++ b/main/shim/dumpsys.h @@ -18,6 +18,13 @@ #include #include +#include + +constexpr char kPrivateAddressPrefix[] = "xx:xx:xx:xx"; +#define PRIVATE_ADDRESS(addr) \ + (addr.ToString() \ + .replace(0, strlen(kPrivateAddressPrefix), kPrivateAddressPrefix) \ + .c_str()) namespace bluetooth { namespace shim {