Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using PairState enum for paired status of remote bluetooth device. #362

Merged
merged 4 commits into from
Mar 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion commons/passive/phone/phone_bluetooth_device_scanned.avsc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
{"name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)."},
{"name": "macAddressHash", "type": ["null", "bytes"], "default": null, "doc":"Hash of Nearby Bluetooth device MAC address."},
{"name": "hashSaltReference", "type": ["null", "int"], "doc": "Random identifier associated with the device or installation of the app. If the app gets reinstalled or installed on another device, it's clear during analysis that the mac addresses between iterations are not comparable.", "default": null},
{"name": "isPaired", "type": ["null","boolean"], "doc": "Whether the bluetooth device is paired.", "default": null}
Copy link
Member

@yatharthranjan yatharthranjan Mar 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not delete this owing to schema evolution and backwards compatibility. You can keep this as is and update the doc to say this is deprecated in favour of pairedState in newer versions.

As a rule, we never delete any fields and always add null default in new fields in any existing schema.

PS: nice spot @afolarin

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, nice to know about it. I will be updating this accordingly.

{"name": "isPaired", "type": ["null","boolean"], "doc": "Whether the bluetooth device is paired. This has been deprecated in favor of pairedState in newer versions.", "default": null},
{"name": "pairedState", "type": ["null", {
"name": "PairedState",
"type": "enum",
"doc": "Represent the bond state of the remote device. \nNOT_PAIRED indicates the remote device is not paired. \nPAIRING indicates pairing is in progress with the remote device. \nPAIRED Indicates the remote device is paired. \nUNKNOWN indicates the pairing status is not known.",
"symbols": ["NOT_PAIRED", "PAIRING", "PAIRED", "UNKNOWN"]
}], "doc": "Indicates the current paired status of the remote device.", "default": null }
]
}
Loading