* #33827: added jni calls
diff --git a/src/org/sflphone/service/ISipService.aidl b/src/org/sflphone/service/ISipService.aidl
index f93952f..b05e4f1 100644
--- a/src/org/sflphone/service/ISipService.aidl
+++ b/src/org/sflphone/service/ISipService.aidl
@@ -42,6 +42,11 @@
boolean startRecordedFilePlayback(in String filepath);
void stopRecordedFilePlayback(in String filepath);
+ /* Mute */
+ void setMuted(boolean mute);
+ boolean isCaptureMuted();
+
+
/* DTMF */
void playDtmf(in String key);
diff --git a/src/org/sflphone/service/SipService.java b/src/org/sflphone/service/SipService.java
index 8f253f3..cfd9886 100644
--- a/src/org/sflphone/service/SipService.java
+++ b/src/org/sflphone/service/SipService.java
@@ -54,7 +54,6 @@
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
-import android.media.AudioManager;
import android.os.Bundle;
import android.os.Handler;
import android.os.HandlerThread;
@@ -1262,5 +1261,35 @@
return callManagerJNI.getCurrentAudioCodecName(callID);
}
+ @Override
+ public void setMuted(final boolean mute) throws RemoteException {
+ getExecutor().execute(new SipRunnable() {
+ @Override
+ protected void doRun() throws SameThreadException, RemoteException {
+ Log.i(TAG, "SipService.setMuted() thread running...");
+ configurationManagerJNI.muteCapture(mute);
+ }
+ });
+ }
+
+ @Override
+ public boolean isCaptureMuted() throws RemoteException {
+ class IsMuted extends SipRunnableWithReturn {
+
+ @Override
+ protected Boolean doRun() throws SameThreadException {
+ Log.i(TAG, "SipService.isCaptureMuted() thread running...");
+ return configurationManagerJNI.isCaptureMuted();
+ }
+ }
+
+ IsMuted runInstance = new IsMuted();
+ getExecutor().execute(runInstance);
+ while (!runInstance.isDone()) {
+ }
+
+ return (Boolean) runInstance.getVal();
+ }
+
};
}