diff options
author | Scott Murray <scott.murray@konsulko.com> | 2022-03-02 16:48:04 -0500 |
---|---|---|
committer | Scott Murray <scott.murray@konsulko.com> | 2022-03-02 16:51:17 -0500 |
commit | 26dc6a8c8847248450bf902124b7cd867e027274 (patch) | |
tree | f46f21f932eb825d4fa4d5dc70bc8101d0a5f7fe | |
parent | fd598de2c48a9fcc0e13b5574c3da0b5b6edf407 (diff) |
Add Bluetooth enableneedlefish_13.93.0needlefish/13.93.0marlin_12.93.0marlin/12.93.013.93.012.93.0
Use the network API interface object to enable Bluetooth via ConnMan,
thus deactivating the default rfkill state and persisting the new one
across reboots (since ConnMan will restore the enabled state on boot).
This used to be done in the agl-service-bluetooth binding, doing it
here should be considered a likely temporary placeholder for further
investigation into Bluetooth device management in future AGL releases.
At the moment device auto-connection is not likely to match pre-Marlin
releases unless a device manages to connect on its own versus the
active auto-connect that was in agl-service-bluetooth. The latter is
now dependent on this application being run until further
re-architecting takes place.
Bug-AGL: SPEC-4253
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: Ic18452a65345da82a27370a46fbc7121cbf85aea
-rw-r--r-- | app/main.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/app/main.cpp b/app/main.cpp index 4c989ae..bf82588 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -66,7 +66,21 @@ int main(int argc, char *argv[]) } context->setContextProperty("bluetooth", new Bluetooth(true, context)); - context->setContextProperty("network", new Network(true, context)); + + // Use the network API interface to enable Bluetooth via ConnMan, thus + // deactivating the default rfkill state and persisting the new one across + // reboots (since ConnMan will restore the enabled state on boot). + // This used to be done in the agl-service-bluetooth binding, doing it + // here should be considered a likely temporary placeholder for further + // investigation into Bluetooth device management in future AGL releases. + // At the moment device auto-connection is not likely to match pre-Marlin + // releases unless a device manages to connect on its own versus the + // active auto-connect that was in agl-service-bluetooth. The latter is + // now dependent on this application being run until further re-architecting + // takes place. + Network *network = new Network(true, context); + network->power(true, QString("bluetooth")); + context->setContextProperty("network", network); engine.load(QUrl(QStringLiteral("qrc:/Settings.qml"))); |