[Title]added timeout for sms transmission fail
authorsungmin ha <sungmin82.ha@samsung.com>
Fri, 31 Aug 2012 09:07:47 +0000 (18:07 +0900)
committersungmin ha <sungmin82.ha@samsung.com>
Fri, 31 Aug 2012 09:07:47 +0000 (18:07 +0900)
[Type]Enhancement
[Module]eventinjector-eplugin
[Priority]Minor
[Jira#] // Jira Issue Number
[Redmine#]  // Redmine Isuue Number
[Problem]  // Problem Description
[Cause]  // Cause Description
[Solution] // Solution Description
[TestCase]  // Executed the test-target (How to)

org.tizen.telephony.sms/src/org/tizen/telephony/sms/page/SMS.java
package/pkginfo.manifest

index ba1d9a0..5653fac 100644 (file)
@@ -107,6 +107,7 @@ ISelectionListener{
        private IDevice currentDevice;
        
        public boolean isMsgReceived = false;
+       public int sleepCnt = 0;
        
        protected void createContents() {
                InjectorView.getDefault().addSelectionListener(this);
@@ -435,13 +436,18 @@ ISelectionListener{
                                                public void run(IProgressMonitor monitor)
                                                                throws InvocationTargetException,
                                                                InterruptedException {
+                                                       sleepCnt = 0;
                                                        while(true)
-                                                       {                                                               
+                                                       {                               
+                                                               if(sleepCnt > 100)      // elapsed 10 sec
+                                                                       break;
+                                                               
                                                                isMsgReceived = TelephonySocket.getInstance().getMsgReceived();
                                                                if(isMsgReceived)
                                                                        break;
                                                                
                                                                Thread.sleep(100);      // 1/10 sec
+                                                               sleepCnt++;
                                                        }
                                                        TelephonySocket.getInstance().setMsgReceived(false);
                                                        isMsgReceived = false;
@@ -450,6 +456,9 @@ ISelectionListener{
                } catch (Exception e) {
                        e.printStackTrace();
                }
+               
+               if(sleepCnt > 100)
+                       showDialog("Message transmission failed.");
        }
 
        private static boolean checkNumberFormat(String noStr) {
index e3c9a81..4967ab1 100644 (file)
@@ -1,5 +1,5 @@
 Source:eventinjector-eplugin
-Version:0.2.61
+Version:0.2.62
 Maintainer:yeongkyoon Lee <yeongkyoon.lee@samsung.com>, sungmin Ha <sungmin82.ha@samsung.com>
 
 Package:eventinjector-eplugin