summaryrefslogtreecommitdiffstats
path: root/app/main.cpp
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2022-03-02 16:48:04 -0500
committerScott Murray <scott.murray@konsulko.com>2022-03-02 16:51:17 -0500
commit26dc6a8c8847248450bf902124b7cd867e027274 (patch)
treef46f21f932eb825d4fa4d5dc70bc8101d0a5f7fe /app/main.cpp
parentfd598de2c48a9fcc0e13b5574c3da0b5b6edf407 (diff)
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
Diffstat (limited to 'app/main.cpp')
-rw-r--r--app/main.cpp16
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")));