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

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

Merge "app: Introduce getLoggableAddress" am: 52afccd5

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1918717

Change-Id: I2ea68b79a6972dcca45a39f3f678fcfd2374ef81
parents 6d61f012 52afccd5
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -122,6 +122,14 @@ public final class Utils {
        }
    }

    public static String getLoggableAddress(@Nullable BluetoothDevice device) {
        if (device == null) {
            return "00:00:00:00:00:00";
        } else {
            return "xx:xx:xx:xx:" + device.toString().substring(12);
        }
    }

    public static String getAddressStringFromByte(byte[] address) {
        if (address == null || address.length != BD_ADDR_LEN) {
            return null;