From 9db70f1bf6fcc5b4054d0f1c69b282cfce27a876 Mon Sep 17 00:00:00 2001 From: sungmin ha Date: Fri, 22 Jun 2012 19:11:50 +0900 Subject: [PATCH] [Title]modified for unlimited waiting when old emul [Type]Bugfix [Module]eventinjector-eplugin [Priority]Major [Jira#]S1-4133 [Redmine#] // Redmine Isuue Number [Problem] // Problem Description [Cause] // Cause Description [Solution] // Solution Description [TestCase] // Executed the test-target (How to) --- .../src/org/tizen/device/sdcard/page/SdcardPage.java | 16 +++++++++++----- .../src/org/tizen/injector/socket/SDcardSocket.java | 4 ++-- package/pkginfo.manifest | 4 ++-- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/org.tizen.device/src/org/tizen/device/sdcard/page/SdcardPage.java b/org.tizen.device/src/org/tizen/device/sdcard/page/SdcardPage.java index b0d1043..c61f304 100644 --- a/org.tizen.device/src/org/tizen/device/sdcard/page/SdcardPage.java +++ b/org.tizen.device/src/org/tizen/device/sdcard/page/SdcardPage.java @@ -66,7 +66,8 @@ public class SdcardPage extends AbstractInjectorPage implements ISelectionListen Button button_mount, button_umount; private boolean isMounted = false; - + private boolean isOldEmul = false; + @Override protected void createContents() { InjectorView.getDefault().addSelectionListener(this); @@ -83,7 +84,7 @@ public class SdcardPage extends AbstractInjectorPage implements ISelectionListen cmbRecordFormat.select(0); Composite buttonComposite = formUtil.createComposite(parent, 2); - button_mount = formUtil.createButton(buttonComposite, SdcardConstants.button1, SWT.PUSH); + button_mount = formUtil.createButton(buttonComposite, SdcardConstants.button1, SWT.PUSH); button_umount = formUtil.createButton(buttonComposite, SdcardConstants.button2, SWT.PUSH); button_umount.setEnabled(false); @@ -231,17 +232,19 @@ public class SdcardPage extends AbstractInjectorPage implements ISelectionListen while(sdsock.isDataWaiting) { - if(sleepCnt > 200) + if(sleepCnt > 10) { sleepCnt = 0; sdsock.isDataWaiting = false; + isOldEmul = true; DialogUtil.openMessageDialog("This is Event Injector message.\n" + "You are not available SD Card.\nPlease upgrade version of emulator."); } + else + isOldEmul = false; - Thread.sleep(10); + Thread.sleep(1); sleepCnt += 1; } - if(sdsock.isMounted) { @@ -252,6 +255,9 @@ public class SdcardPage extends AbstractInjectorPage implements ISelectionListen { cmbRecordFormat.select(0); umntButtonClick(); + + if(isOldEmul) + button_mount.setEnabled(false); } } catch (Exception e) { // TODO Auto-generated catch block diff --git a/org.tizen.injector/src/org/tizen/injector/socket/SDcardSocket.java b/org.tizen.injector/src/org/tizen/injector/socket/SDcardSocket.java index 96a7b34..4994127 100644 --- a/org.tizen.injector/src/org/tizen/injector/socket/SDcardSocket.java +++ b/org.tizen.injector/src/org/tizen/injector/socket/SDcardSocket.java @@ -126,13 +126,13 @@ public class SDcardSocket { while(isDataWaiting) { - if(sleepCnt > 200) + if(sleepCnt > 10) { sleepCnt = 0; isDataWaiting = false; } - Thread.sleep(10); + Thread.sleep(1); sleepCnt += 1; } } diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest index 428e561..d2b1246 100644 --- a/package/pkginfo.manifest +++ b/package/pkginfo.manifest @@ -1,5 +1,5 @@ Package:eventinjector-eplugin -Version:0.2.23 +Version:0.2.24 OS:linux Build-host-os:linux Maintainer:yeongkyoon Lee , sungmin Ha @@ -9,7 +9,7 @@ Install-dependency:common-eplugin[linux], base-ide-product[linux] Source:eventinjector-eplugin Package:eventinjector-eplugin -Version:0.2.23 +Version:0.2.24 OS:windows Build-host-os:linux Maintainer:yeongkyoon Lee , sungmin Ha -- 2.7.4