aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 86bdeb3..2e428f9 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -19,6 +19,7 @@
#include <src/exporter.h>
#include <src/rotation-lock.h>
+#include <src/usb-manager.h>
#include <glib/gi18n.h> // bindtextdomain()
#include <gio/gio.h>
@@ -28,6 +29,9 @@
int
main(int /*argc*/, char** /*argv*/)
{
+#warning NB the next line turns on verbose debug logging and is used for developement. Remove it before landing.
+g_assert(g_setenv("G_MESSAGES_DEBUG", "all", true));
+
// Work around a deadlock in glib's type initialization.
// It can be removed when https://bugzilla.gnome.org/show_bug.cgi?id=674885 is fixed.
g_type_ensure(G_TYPE_DBUS_CONNECTION);
@@ -54,6 +58,13 @@ main(int /*argc*/, char** /*argv*/)
exporters.push_back(exporter);
}
+ // We need the ADBD handler running,
+ // even though it doesn't have an indicator component yet
+ static constexpr char const * ADB_SOCKET_PATH {"/dev/socket/adbd"};
+ static constexpr char const * PUBLIC_KEYS_FILENAME {"/data/misc/adb/adb_keys"};
+ UsbManager usb_manager {ADB_SOCKET_PATH, PUBLIC_KEYS_FILENAME};
+
+ // let's go!
g_main_loop_run(loop);
// cleanup