From c423d7a61870ccff826b3597bed83ef06cc00478 Mon Sep 17 00:00:00 2001 From: "giwoong.kim" Date: Thu, 12 Apr 2012 14:47:06 +0900 Subject: [PATCH] [Title] removed DragDetectListener [Type] [Module] [Priority] [Jira#] [Redmine#] [Problem] [Cause] performance of long press [Solution] [TestCase] --- .../client/src/org/tizen/emulator/skin/EmulatorSkin.java | 15 +++++++++------ .../tizen/emulator/skin/comm/sock/SocketCommunicator.java | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java index 658ad91..31e7c69 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java @@ -159,7 +159,7 @@ public class EmulatorSkin { private MouseMoveListener shellMouseMoveListener; private MouseListener shellMouseListener; - private DragDetectListener canvasDragDetectListener; + //private DragDetectListener canvasDragDetectListener; private MouseMoveListener canvasMouseMoveListener; private MouseListener canvasMouseListener; private KeyListener canvasKeyListener; @@ -666,7 +666,7 @@ public class EmulatorSkin { // remove 'input method' menu item ( avoid bug ) canvas.addMenuDetectListener( canvasMenuDetectListener ); - canvasDragDetectListener = new DragDetectListener() { + /*canvasDragDetectListener = new DragDetectListener() { @Override public void dragDetected( DragDetectEvent e ) { @@ -685,7 +685,7 @@ public class EmulatorSkin { } }; - canvas.addDragDetectListener( canvasDragDetectListener ); + canvas.addDragDetectListener( canvasDragDetectListener );*/ canvasMouseMoveListener = new MouseMoveListener() { @@ -756,6 +756,9 @@ public class EmulatorSkin { MouseEventData mouseEventData = new MouseEventData( MouseEventType.DOWN.value(), geometry[0], geometry[1], 0 ); communicator.sendToQEMU( SendCommand.SEND_MOUSE_EVENT, mouseEventData ); + if ( false == EmulatorSkin.this.isDragStartedInLCD ) { + EmulatorSkin.this.isDragStartedInLCD = true; + } } } @@ -858,9 +861,9 @@ public class EmulatorSkin { private void removeCanvasListeners() { - if ( null != canvasDragDetectListener ) { - lcdCanvas.removeDragDetectListener( canvasDragDetectListener ); - } +// if ( null != canvasDragDetectListener ) { +// lcdCanvas.removeDragDetectListener( canvasDragDetectListener ); +// } if ( null != canvasMouseMoveListener ) { lcdCanvas.removeMouseMoveListener( canvasMouseMoveListener ); } diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/comm/sock/SocketCommunicator.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/comm/sock/SocketCommunicator.java index a3faeea..11eee12 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/comm/sock/SocketCommunicator.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/comm/sock/SocketCommunicator.java @@ -312,7 +312,7 @@ public class SocketCommunicator implements ICommunicator { } - public void sendToQEMU( SendCommand command, ISendData data, boolean useDataTransfer ) { + public synchronized void sendToQEMU( SendCommand command, ISendData data, boolean useDataTransfer ) { if ( useDataTransfer ) { this.dataTransfer.reset(); } @@ -320,7 +320,7 @@ public class SocketCommunicator implements ICommunicator { } @Override - public void sendToQEMU( SendCommand command, ISendData data ) { + public synchronized void sendToQEMU( SendCommand command, ISendData data ) { try { -- 2.7.4