Skip to content
Snippets Groups Projects
Commit e23a8867 authored by Maxim Cournoyer's avatar Maxim Cournoyer Committed by Amin Bandali
Browse files

account: Make the default ringtone path portable.

Before this change, the default ringtone path would be for example set
to "/data/data/cx.ring/files/ringtones/default.opus" on Android;
migrating the account to GNU/Linux would cause the ringtone to not be
found.  The change leverages existing code that searches for a base
file name in a JAMI_DATADIR-prefixed location.

* globals.mk: Set JAMI_DATADIR from the environment if it's defined.
* src/account.cpp (DEFAULT_RINGTONE_PATH): Universally set to
"default.opus";
* src/manager.cpp: Add a definition check for the JAMI_DATADIR macro.
(Manager::playRingtone): Go through the ringtone path resolution
scheme on all platforms.  Some platforms will need to define the
JAMI_DATADIR macro correctly for this to work; for example the
libjami build on Android should have the JAMI_DATADIR macro set to
"/data/data/cx.ring/files" for this to work correctly.

Accompanying client-android change:
https://review.jami.net/c/jami-client-android/+/21148



Co-authored-by: default avatarAmin Bandali <amin.bandali@savoirfairelinux.com>
Change-Id: Ia408a8db263af91c2734f61aa38c4ed717605359
parent f6bf52ea
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment