2024-10-13 16:07:25 -04:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2024-10-13 15:51:16 -04:00
|
|
|
From: Chris Manton <cmanton@google.com>
|
|
|
|
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
|
2024-10-13 16:07:25 -04:00
|
|
|
index 91c4ea746..213394632 100644
|
2024-10-13 15:51:16 -04:00
|
|
|
--- a/main/shim/dumpsys.h
|
|
|
|
+++ b/main/shim/dumpsys.h
|
|
|
|
@@ -18,6 +18,13 @@
|
|
|
|
|
|
|
|
#include <functional>
|
|
|
|
#include <list>
|
|
|
|
+#include <string>
|
|
|
|
+
|
|
|
|
+constexpr char kPrivateAddressPrefix[] = "xx:xx:xx:xx";
|
|
|
|
+#define PRIVATE_ADDRESS(addr) \
|
|
|
|
+ (addr.ToString() \
|
|
|
|
+ .replace(0, strlen(kPrivateAddressPrefix), kPrivateAddressPrefix) \
|
|
|
|
+ .c_str())
|
|
|
|
|
|
|
|
namespace bluetooth {
|
|
|
|
namespace shim {
|