diff --git a/res/raw/toy-mono.wav b/res/raw/toy-mono.wav new file mode 100644 index 000000000..a6e0093a5 Binary files /dev/null and b/res/raw/toy-mono.wav differ diff --git a/src/org/linphone/LinphoneManager.java b/src/org/linphone/LinphoneManager.java index d76b2b2dc..ec3b81e30 100644 --- a/src/org/linphone/LinphoneManager.java +++ b/src/org/linphone/LinphoneManager.java @@ -158,6 +158,7 @@ public final class LinphoneManager implements LinphoneCoreListener { mLinphoneRootCaFile = basePath + "/rootca.pem"; mRingSoundFile = basePath + "/oldphone_mono.wav"; mRingbackSoundFile = basePath + "/ringback.wav"; + mPauseSoundFile = basePath + "/toy-mono.wav"; sLPref = LinphonePreferenceManager.getInstance(c); mAudioManager = ((AudioManager) c.getSystemService(Context.AUDIO_SERVICE)); @@ -167,7 +168,7 @@ public final class LinphoneManager implements LinphoneCoreListener { mConnectivityManager = (ConnectivityManager) c.getSystemService(Context.CONNECTIVITY_SERVICE); mR = c.getResources(); } - + private static final int LINPHONE_VOLUME_STREAM = STREAM_VOICE_CALL; private static final int dbStep = 4; /** Called when the activity is first created. */ @@ -176,6 +177,7 @@ public final class LinphoneManager implements LinphoneCoreListener { private final String mLinphoneConfigFile; private final String mRingSoundFile; private final String mRingbackSoundFile; + private final String mPauseSoundFile; private Timer mTimer = new Timer("Linphone scheduler"); @@ -414,6 +416,7 @@ public final class LinphoneManager implements LinphoneCoreListener { mLc.setPlaybackGain(3); mLc.setRing(null); mLc.setRootCA(mLinphoneRootCaFile); + mLc.setPlayFile(mPauseSoundFile); try { @@ -438,10 +441,11 @@ public final class LinphoneManager implements LinphoneCoreListener { Log.e(e,"Cannot start linphone"); } } - + private void copyAssetsFromPackage() throws IOException { copyIfNotExist(R.raw.oldphone_mono,mRingSoundFile); copyIfNotExist(R.raw.ringback,mRingbackSoundFile); + copyIfNotExist(R.raw.toy,mPauseSoundFile); copyFromPackage(R.raw.linphonerc, new File(mLinphoneInitialConfigFile).getName()); copyIfNotExist(R.raw.rootca, new File(mLinphoneRootCaFile).getName()); } diff --git a/src/org/linphone/core/LinphoneCoreImpl.java b/src/org/linphone/core/LinphoneCoreImpl.java index eeb082dca..b9d15299c 100644 --- a/src/org/linphone/core/LinphoneCoreImpl.java +++ b/src/org/linphone/core/LinphoneCoreImpl.java @@ -615,4 +615,10 @@ class LinphoneCoreImpl implements LinphoneCore { public boolean mediaEncryptionSupported(MediaEncryption menc) { return mediaEncryptionSupported(nativePtr,menc.mValue); } + + private native void setPlayFile(long nativePtr, String path); + @Override + public void setPlayFile(String path) { + setPlayFile(nativePtr, path); + } } diff --git a/submodules/linphone b/submodules/linphone index 8c2d49fae..6892c98cc 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 8c2d49fae3ef0fd8066350bfeaff959442b2e6c3 +Subproject commit 6892c98ccdcec6449eac51f19c932fdcbf956695