Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.chromoting; | 5 package org.chromium.chromoting; |
| 6 | 6 |
| 7 import android.app.ActionBar; | 7 import android.app.ActionBar; |
| 8 import android.app.Activity; | 8 import android.app.Activity; |
| 9 import android.graphics.Bitmap; | 9 import android.graphics.Bitmap; |
| 10 import android.graphics.Canvas; | 10 import android.graphics.Canvas; |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 402 public void onLongPress(MotionEvent e) { | 402 public void onLongPress(MotionEvent e) { |
| 403 if (e.getPointerCount() > 1) { | 403 if (e.getPointerCount() > 1) { |
| 404 return; | 404 return; |
| 405 } | 405 } |
| 406 | 406 |
| 407 float[] coordinates = new float[] {e.getRawX(), e.getY()}; | 407 float[] coordinates = new float[] {e.getRawX(), e.getY()}; |
| 408 | 408 |
| 409 Log.i("mouse", "Finger held down"); | 409 Log.i("mouse", "Finger held down"); |
| 410 if (mMousePressed) { | 410 if (mMousePressed) { |
| 411 Log.i("mouse", "\tReleasing the currently-pressed button"); | 411 Log.i("mouse", "\tReleasing the currently-pressed button"); |
| 412 handleMouseMovement(coordinates, mMouseButton, false); | 412 handleMouseMovement(new float[] {coordinates[0], coordinates[1]} , |
|
garykac
2013/08/06 20:50:32
Why is this necessary?
solb
2013/08/07 04:30:46
Because in Java, arrays are objects and objects ar
| |
| 413 mMouseButton, false); | |
| 413 } | 414 } |
| 414 | 415 |
| 415 Log.i("mouse", "\tStarting right click"); | 416 Log.i("mouse", "\tStarting right click"); |
| 416 mMouseButton = BUTTON_RIGHT; | 417 mMouseButton = BUTTON_RIGHT; |
| 417 mMousePressed = true; | 418 mMousePressed = true; |
| 418 handleMouseMovement(coordinates, mMouseButton, mMousePressed); | 419 handleMouseMovement(coordinates, mMouseButton, mMousePressed); |
| 419 } | 420 } |
| 420 } | 421 } |
| 421 } | 422 } |
| OLD | NEW |