Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1409)

Unified Diff: samples/android_sample/jni/input_service.cc

Issue 11416343: Refactored Android samples / embedder. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix type error on playBackground Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/android_sample/jni/input_service.h ('k') | samples/android_sample/jni/log.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/android_sample/jni/input_service.cc
diff --git a/samples/android_sample/jni/input_service.cc b/samples/android_sample/jni/input_service.cc
index e4c4df7559f20dcc6875bd6a3d4ecd8e8fee85c1..f09c1c2cbd6405f2a13a1bbf7cb109c576120e81 100644
--- a/samples/android_sample/jni/input_service.cc
+++ b/samples/android_sample/jni/input_service.cc
@@ -1,8 +1,12 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
#include <android_native_app_glue.h>
#include <cmath>
-#include "bin/log.h"
#include "jni/input_service.h"
+#include "jni/log.h"
InputService::InputService(android_app* application,
VMGlue* vm_glue,
@@ -54,7 +58,7 @@ bool InputService::OnTouchEvent(AInputEvent* event) {
float move_x = AMotionEvent_getX(event, 0);
float move_y = AMotionEvent_getY(event, 0);
int64_t when = AMotionEvent_getEventTime(event);
- Log::Print("Got motion event %d at %f, %f", type, move_x, move_y);
+ LOGI("Got motion event %d at %f, %f", type, move_x, move_y);
if (vm_glue_->OnMotionEvent(function, when, move_x, move_y) != 0) {
return false;
@@ -105,7 +109,7 @@ bool InputService::OnKeyEvent(AInputEvent* event) {
* java.lang.System.nanoTime() time base. */
int64_t when = AKeyEvent_getEventTime(event);
- Log::Print("Got key event %d %d", type, key_code);
+ LOGI("Got key event %d %d", type, key_code);
if (vm_glue_->OnKeyEvent(function, when, flags, key_code,
meta_state, repeat) != 0) {
return false;
@@ -115,4 +119,3 @@ bool InputService::OnKeyEvent(AInputEvent* event) {
}
return true;
}
-
« no previous file with comments | « samples/android_sample/jni/input_service.h ('k') | samples/android_sample/jni/log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698