Android: refactor DeviceDiscoveryBroadcastReceiver for testing


Move the code that parses raw bytes of a scan record into a separate
exported function, and add an Android-specific test that executes this
function. For now, provide only simple test cases that should execute
successfully.

Even the valid data, when tested on x86 CPU in CI, revealed a problem
with incorrect interpretation of the data type. That will be handled
in a follow-up patch; for now simply add QEXPECT_FAIL.

This is a pre-requisite for fixing real implementation bugs and adding
more tests.

The code uses Q_BLUETOOTH_EXPORT, not the combination of
Q_AUTOTEST_EXPORT and QT_BUILD_INTERNAL, because our CI does not check
any developer-build configurations on Android, so the internal tests
are never executed.

Picking this patch to 5.15 will be non-trivial, because the QJni* APIs
didn't exist back then.

Note: the test and the test data were developed by AI.

Task-number: QTBUG-145934
Pick-to: 6.11 6.8 6.5
Change-Id: Ib3753a25ff7d7c1f1a732aca15748ea04a355ffc
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
commitef08e378fc33e5cf2121cacb1c815fe9d370bc2e
parent30bf2af40822881a417cdee1c0eeba47521e5cf7
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeWed, 29 Apr 2026 08:38:09 +0000