From 15c28e17fae8eab4b736cbe9e2ce846fc05cd726 Mon Sep 17 00:00:00 2001 From: Jozef Mlich Date: Fri, 5 Apr 2024 10:55:08 +0200 Subject: [PATCH] Enable find my phone on Ubuntu Touch --- daemon/daemon.pro | 2 ++ daemon/src/deviceinterface.cpp | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/daemon/daemon.pro b/daemon/daemon.pro index 09ae46e1..9a3dcc04 100644 --- a/daemon/daemon.pro +++ b/daemon/daemon.pro @@ -43,6 +43,8 @@ flavor_silica { calendar } else:flavor_uuitk { DEFINES += UUITK_EDITION + LIBS += -lpulse-simple + PKGCONFIG += libpulse WATCHFISH_FEATURES += music \ voicecall \ notificationmonitor \ diff --git a/daemon/src/deviceinterface.cpp b/daemon/src/deviceinterface.cpp index d041acb8..64ca935f 100644 --- a/daemon/src/deviceinterface.cpp +++ b/daemon/src/deviceinterface.cpp @@ -15,7 +15,7 @@ #include #include -#ifdef MER_EDITION_SAILFISH +#if defined(MER_EDITION_SAILFISH) || defined(UUITK_EDITION) #include #include #endif @@ -684,7 +684,7 @@ void DeviceInterface::findDevice() m_playedSounds++; -#ifdef MER_EDITION_SAILFISH +#if defined(MER_EDITION_SAILFISH) || defined(UUITK_EDITION) /* The Sample format to use */ static const pa_sample_spec ss = { @@ -696,11 +696,16 @@ void DeviceInterface::findDevice() pa_simple *s = NULL; int error; + +#ifdef MER_EDITION_SAILFISH QFile file("/usr/share/harbour-amazfish/chirp.raw"); +#else // elif defined(UUITK_EDITION) + QFile file("/opt/click.ubuntu.com/uk.co.piggz.amazfish/current/share/harbour-amazfish/chirp.raw"); +#endif if(!file.open(QIODevice::ReadOnly)) { - qDebug() << "Unable to open chirp sound"; + qWarning() << Q_FUNC_INFO << "Unable to open chirp sound"; return; }