Replace AndroidManifest.xml permission parsing with PackageManager APIs
AAB (Android App Bundle) packaging, used by Play Store, may produce
several distinct .apk files when an application is delivered to a
device. This is part of its mechanisms to optimize the delivery to
each specific device.
This turned out to be problematic for parsing ApplicationManifest.xml
in order to check Bluetooth's need for Location permission. The code
doing the parsing may be located in a different .apk than the manifest
file itself, causing an error to find the permissions.
Instead of manually parsing manifest XML, use PackageManager APIs.
This should be a more robust solution that works independent of the
.apk split.
Amends: dca2eb939c1208e7a05fcf65277ffca3b8dab946
Fixes: QTBUG-133975
Pick-to: 6.9 6.9.0 6.8
Change-Id: I896079051dc9602b9223469213d44f4aef5f2bd4
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>