mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-15 02:44:23 -05:00
35 lines
999 B
Diff
35 lines
999 B
Diff
|
From 2e7c27c2b5d773905ded3e89cbaa424744ddd897 Mon Sep 17 00:00:00 2001
|
||
|
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
|
||
|
index 91c4ea74618..21339463265 100644
|
||
|
--- 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 {
|