package org.tizen.injector.telephony.call.page;
import java.lang.reflect.InvocationTargetException;
+import java.nio.ByteBuffer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
boolean calling = false;
boolean isbtenabled = true;
private IDevice currentDevice;
- private boolean emulChange = false;
+// private boolean emulChange = false;
private boolean rssiStatus = true;
public void setRssiStatus(boolean status) {
}
public void callEnd(boolean isAllSelection){
- if(emulChange == true || isAllSelection)
+ //if(emulChange == true || isAllSelection)
+ if(isAllSelection)
viewer.getTable().setSelection(0, 5);
IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
}
loopCount -= addCnt;
((TelephonyCall)getParent()).refresh();
- if(emulChange == true)
+/* if(emulChange == true)
{
callEnd(false);
calling = false;
emulChange = false;
}
-
+*/
if(loopCount == 6)
listfull = true;
else
lblMOCallCallType.setText(CALL_TYPE_LIST[callType]);
butMOCall.setEnabled(true);
- butMOCall.setText("Alert");
- MOCallevent = 0;
+ byte[] callStatus = sga.getByteArray("CALL_NUMBER");
+ if(callStatus[0] == 0x04) // 0x04 is alert
+ {
+ butMOCall.setText("Connect");
+ MOCallevent = 1;
+ }
+ else // 0x03 is dialling
+ {
+ butMOCall.setText("Alert");
+ MOCallevent = 0;
+ }
cmbMOCallCallStatus.setEnabled(true);
if(currentDevice != null)
{
if (currentDevice.getSerialNumber() != selectedEntry.getFileListingService().getDevice().getSerialNumber()) {
- if(lblMOCallNumber.getText() != "")
- moDisconnect();
-
- emulChange = true;
- callEnd(false);
+ try {
+ viewer.getTable().removeAll();
+ cmbMOCallCallStatus.setEnabled(false);
+ butMTCallConnect.setEnabled(true);
+
+ butMOCall.setEnabled(false);
+ MOCallevent = 0;
+
+ lblMOCallCallId.setText("");
+ lblMOCallNumber.setText("");
+ lblMOCallCallType.setText("");
+ TelephonySocket.getInstance().sendAskData();
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
}
}
currentDevice = ConnectionPlugin.getDefault().getCurrentDevice();