Skip to content

Commit

Permalink
added some logging in remotecontroller in order to narrow down issue …
Browse files Browse the repository at this point in the history
…#194

git-svn-id: http://android-xbmcremote.googlecode.com/svn/trunk/XBMC Remote@583 677bec2c-7919-11de-bdc7-1f637afd43b1
  • Loading branch information
mikkle committed Apr 16, 2010
1 parent 5ce3b33 commit c1c30ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion AndroidManifest.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.xbmc.android.remote"
android:versionName="0.6.7+" android:versionCode="582">
android:versionName="0.6.7+" android:versionCode="583">
<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false" >
<activity android:name=".presentation.activity.HomeActivity"
android:label="@string/app_name"
Expand Down
Expand Up @@ -92,15 +92,19 @@ public boolean onTrackballEvent(MotionEvent event) {
return keyboardAction(ButtonCodes.KEYBOARD_ENTER);
else{
// check when the last trackball move happened to avoid too speedy selections
long newstamp = System.currentTimeMillis();
long newstamp = System.currentTimeMillis();
System.out.println("DEBUG RemoteController - Delta since last motion event: " + (newstamp - mTimestamp) + " ms");
if (newstamp - mTimestamp > MOTION_EVENT_MIN_DELTA_TIME){
System.out.println("DEBUG RemoteController - DELTA gt minimum, proceeding.");
mTimestamp = newstamp;
if (Math.abs(event.getX()) > MOTION_EVENT_MIN_DELTA_POSITION) {
return keyboardAction(event.getX() < 0 ? ButtonCodes.KEYBOARD_LEFT : ButtonCodes.KEYBOARD_RIGHT);
} else if (Math.abs(event.getY()) > MOTION_EVENT_MIN_DELTA_POSITION){
return keyboardAction(event.getY() < 0 ? ButtonCodes.KEYBOARD_UP : ButtonCodes.KEYBOARD_DOWN);
}
}
else
System.out.println("DEBUG RemoteController - DELTA lt minimum, skipping event.");
}
return true;
}
Expand Down

0 comments on commit c1c30ee

Please sign in to comment.