[Title]modified for sending MO call dialling or alert when connect with vmodem
authorsungmin ha <sungmin82.ha@samsung.com>
Wed, 12 Sep 2012 11:37:45 +0000 (20:37 +0900)
committersungmin ha <sungmin82.ha@samsung.com>
Wed, 12 Sep 2012 11:37:45 +0000 (20:37 +0900)
[Type]Bugfix
[Module]eventinjector-eplugin
[Priority]Major
[Jira#]N_SE-9914
[Redmine#]  // Redmine Isuue Number
[Problem]  // Problem Description
[Cause]  // Cause Description
[Solution] // Solution Description
[TestCase]  // Executed the test-target (How to)

org.tizen.injector.telephony.call/src/org/tizen/injector/telephony/call/page/MOMTCall.java
org.tizen.injector/src/org/tizen/injector/socket/TelephonySocket.java
package/pkginfo.manifest

index dce5489..60bc7d5 100644 (file)
@@ -28,6 +28,7 @@
 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;
 
@@ -86,7 +87,7 @@ ISelectionListener{
        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) {
@@ -296,7 +297,8 @@ ISelectionListener{
        }
        
        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();
@@ -659,13 +661,13 @@ ISelectionListener{
                        }
                        loopCount -= addCnt;
                        ((TelephonyCall)getParent()).refresh();
-                       if(emulChange == true)
+/*                     if(emulChange == true)
                        {
                                callEnd(false);
                                calling = false;
                                emulChange = false;
                        }
-                       
+*/                     
                        if(loopCount == 6)
                                listfull = true;
                        else
@@ -690,8 +692,17 @@ ISelectionListener{
                        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);
                        
@@ -713,11 +724,22 @@ ISelectionListener{
                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();
index 5477141..86aefb3 100644 (file)
@@ -65,7 +65,7 @@ public class TelephonySocket {
        private BufferedInputStream input;
        private boolean isConnected = false;
        private Receiver receiverThread;
-       public boolean callWaiting = false;
+       public boolean callWaiting = true;
        private boolean isMsgReceived = false;
        private IDevice currentDevice = null;
 
index aa02cd5..94de15e 100644 (file)
@@ -1,5 +1,5 @@
 Source:eventinjector-eplugin
-Version:0.2.66
+Version:0.2.67
 Maintainer:yeongkyoon Lee <yeongkyoon.lee@samsung.com>, sungmin Ha <sungmin82.ha@samsung.com>
 
 Package:eventinjector-eplugin