Index: remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java |
diff --git a/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java b/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java |
index 55056180ffae5acdaeb40da7a0e96d137f6af9b0..b2f82f014c88f0c5a68bd4fd10efead3ed63afff 100644 |
--- a/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java |
+++ b/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java |
@@ -198,7 +198,7 @@ public class JniInterface { |
*/ |
public static Bitmap retrieveVideoFrame() { |
if (Looper.myLooper() == Looper.getMainLooper()) { |
- Log.w("deskview", "Canvas being redrawn on UI thread"); |
+ Log.w("jniiface", "Canvas being redrawn on UI thread"); |
} |
if (!sConnected) { |
@@ -213,8 +213,12 @@ public class JniInterface { |
return Bitmap.createBitmap(frame, 0, sWidth, sWidth, sHeight, Bitmap.Config.ARGB_8888); |
} |
- /** Moves the mouse cursor, possibly while clicking. */ |
+ /** Moves the mouse cursor, possibly while clicking the specified (nonnegative) button. */ |
public static void mouseAction(int x, int y, int whichButton, boolean buttonDown) { |
+ if (whichButton < 0) { |
+ Log.e("jniiface", "Attempted to press a negative mouse button"); |
garykac
2013/07/30 17:50:05
Why are there negative buttons? Isn't this constr
solb
2013/07/30 18:28:54
Yes, it is constrained thusly. However, I added th
|
+ return; |
+ } |
if (!sConnected) { |
return; |
} |
@@ -222,8 +226,12 @@ public class JniInterface { |
mouseActionNative(x, y, whichButton, buttonDown); |
} |
- /** Presses and releases the specified key. */ |
+ /** Presses and releases the specified (nonnegative) key. */ |
public static void keyboardAction(int keyCode, boolean keyDown) { |
+ if (keyCode < 0) { |
+ Log.e("jniiface", "Attempted to hit a negative key"); |
+ return; |
+ } |
if (!sConnected) { |
return; |
} |