decline calls while incall because multi call not supported yet
This commit is contained in:
parent
c293804781
commit
31bc125158
3 changed files with 10 additions and 5 deletions
|
@ -145,7 +145,7 @@ public class LinphoneActivity extends TabActivity {
|
||||||
} else {
|
} else {
|
||||||
mAudioManager.setSpeakerphoneOn(false);
|
mAudioManager.setSpeakerphoneOn(false);
|
||||||
}
|
}
|
||||||
|
stopProxymitySensor();//just in case
|
||||||
theLinphoneActivity = null;
|
theLinphoneActivity = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,9 +249,9 @@ public class LinphoneActivity extends TabActivity {
|
||||||
//Log.d(LinphoneService.TAG, "Proximity sensor report ["+event.values[0]+"] , for max range ["+event.sensor.getMaximumRange()+"]");
|
//Log.d(LinphoneService.TAG, "Proximity sensor report ["+event.values[0]+"] , for max range ["+event.sensor.getMaximumRange()+"]");
|
||||||
|
|
||||||
if (event.values[0] != event.sensor.getMaximumRange() ) {
|
if (event.values[0] != event.sensor.getMaximumRange() ) {
|
||||||
LinphoneActivity.instance().hideScreen(true);
|
hideScreen(true);
|
||||||
} else {
|
} else {
|
||||||
LinphoneActivity.instance().hideScreen(false);
|
hideScreen(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -257,9 +257,10 @@ public class LinphoneService extends Service implements LinphoneCoreListener {
|
||||||
}
|
}
|
||||||
public void callState(final LinphoneCore lc,final LinphoneCall call, final State state, final String message) {
|
public void callState(final LinphoneCore lc,final LinphoneCall call, final State state, final String message) {
|
||||||
Log.i(TAG, "new state ["+state+"]");
|
Log.i(TAG, "new state ["+state+"]");
|
||||||
if (state == LinphoneCall.State.IncomingReceived &&mLinphoneCore.isIncall()) {
|
if (state == LinphoneCall.State.IncomingReceived && !call.equals(mLinphoneCore.getCurrentCall())) {
|
||||||
//no multicall support, just decline
|
//no multicall support, just decline
|
||||||
//mLinphoneCore.terminateCall(call);
|
mLinphoneCore.terminateCall(call);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
mHandler.post(new Runnable() {
|
mHandler.post(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
|
@ -32,6 +32,7 @@ class LinphoneCallImpl implements LinphoneCall {
|
||||||
private native long getCurrentParamsCopy(long nativePtr);
|
private native long getCurrentParamsCopy(long nativePtr);
|
||||||
private native void enableCamera(long nativePtr, boolean enabled);
|
private native void enableCamera(long nativePtr, boolean enabled);
|
||||||
|
|
||||||
|
|
||||||
protected LinphoneCallImpl(long aNativePtr) {
|
protected LinphoneCallImpl(long aNativePtr) {
|
||||||
nativePtr = aNativePtr;
|
nativePtr = aNativePtr;
|
||||||
ref(nativePtr);
|
ref(nativePtr);
|
||||||
|
@ -68,4 +69,7 @@ class LinphoneCallImpl implements LinphoneCall {
|
||||||
public void enableCamera(boolean enabled) {
|
public void enableCamera(boolean enabled) {
|
||||||
enableCamera(nativePtr, enabled);
|
enableCamera(nativePtr, enabled);
|
||||||
}
|
}
|
||||||
|
public boolean equals(Object call) {
|
||||||
|
return nativePtr == ((LinphoneCallImpl)call).nativePtr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue