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 {
|
||||
mAudioManager.setSpeakerphoneOn(false);
|
||||
}
|
||||
|
||||
stopProxymitySensor();//just in case
|
||||
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()+"]");
|
||||
|
||||
if (event.values[0] != event.sensor.getMaximumRange() ) {
|
||||
LinphoneActivity.instance().hideScreen(true);
|
||||
hideScreen(true);
|
||||
} 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) {
|
||||
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
|
||||
//mLinphoneCore.terminateCall(call);
|
||||
mLinphoneCore.terminateCall(call);
|
||||
return;
|
||||
}
|
||||
mHandler.post(new Runnable() {
|
||||
public void run() {
|
||||
|
|
|
@ -31,6 +31,7 @@ class LinphoneCallImpl implements LinphoneCall {
|
|||
native private int getState(long nativePtr);
|
||||
private native long getCurrentParamsCopy(long nativePtr);
|
||||
private native void enableCamera(long nativePtr, boolean enabled);
|
||||
|
||||
|
||||
protected LinphoneCallImpl(long aNativePtr) {
|
||||
nativePtr = aNativePtr;
|
||||
|
@ -68,4 +69,7 @@ class LinphoneCallImpl implements LinphoneCall {
|
|||
public void enableCamera(boolean enabled) {
|
||||
enableCamera(nativePtr, enabled);
|
||||
}
|
||||
public boolean equals(Object call) {
|
||||
return nativePtr == ((LinphoneCallImpl)call).nativePtr;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue