summaryrefslogtreecommitdiff
path: root/android/src/org/rockbox/RockboxFramebuffer.java
AgeCommit message (Collapse)Author
2014-05-21Fix android black screen crashJonathan Gordon
Change-Id: I7a0eb121ff151b8b6e8f824ee8dbab8d99b73499
2014-03-09android: Get the port up and running againThomas Martitz
The build system needed fixes because the tools paths changed and one tool that we used (apkbuilder) was removed entirely. Recent NDKs don't ship gcc 4.4.3 anymore, therefore switch to 4.6. The code itself needed a fix for a jni reference bug that was uncovered by KitKat. The port now builds with latest sdk (r22) and ndk (r9d). Change-Id: Id74fa54ba93bbb0ee30373fbe79e92c5ff03201d
2012-03-22android: lcd_update/_rect() changesThomas Martitz
* rename some java methods (to update(), initialize()) * re-create the ByteBuffer object from the framebuffer on every update. This is needed now since 2c71aa9 added the possiblity for lcd_framebuffer to change. * do so, along with the creation of the dirty Rect object, in native code. Change-Id: Id39ea8e4b6148987c5f216a87e0ff3c8e7babe92
2011-07-18Android: Slightly rework logging to logcat by offloading duplicated code to ↵Thomas Martitz
a new helper class. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30161 a1c6a512-1295-4272-9138-f99709370657
2011-03-11Android: get rid of warnings (no functional changes)Maurus Cuelenaere
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29566 a1c6a512-1295-4272-9138-f99709370657
2011-02-23Android:Thomas Martitz
* Re-create RockboxFramebuffer instance with every time there's a new Activity. * Also, allow Rockbox to be started via multimedia buttons, immediately starting playback if wanted. We don't need to keep the fb instance around when it backround, and it makes us less depending on it and the activity (less race conditions). And this is how you usually do it in Android apps. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29384 a1c6a512-1295-4272-9138-f99709370657
2011-02-19Android: Rewrite lcd subsystem to use the SurfaceView API.Thomas Martitz
That enables drawing from outside the apps UI thread, i.e. from within the Rockbox native thread, without needing synchronization means, and adds determinism as to when the draw happens. It simplifies the drawing routines and adds a convinient way of detecting whether drawing should happen or not (surfaceCreated/Destroyed). It also restores max. fps on my phone which went down drastically with the gingerbread(CM7) update. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29333 a1c6a512-1295-4272-9138-f99709370657
2011-01-29Add widgets to android port.Antoine Cellerier
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29170 a1c6a512-1295-4272-9138-f99709370657
2010-12-02Android: Make lcd updates synchronous, doesn't make it faster but smoother ↵Thomas Martitz
(no updates are skipped) and guaranteed to be glitch free. test_fps can also now report reasonable numbers: ~62 fps for both 1/1 and 1/4 updates (was 300-400 previously). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28728 a1c6a512-1295-4272-9138-f99709370657
2010-11-10Touchscreen: Improved scroll thresholdThomas Martitz
Remove the hardcoded (and way too small) scroll threshold (the distance moved in pixels before we think the users wants to scroll) and replace it with something based on the actual DPI of the screen. On Android we call the API for that, on other touchscreens we reimplemented Android's formula (as of 2.2) and calculate it. Flyspray: 11727 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28548 a1c6a512-1295-4272-9138-f99709370657
2010-11-05Android port:Maurus Cuelenaere
* decouple RockboxFramebuffer resume/suspend behaviour from RockboxActivity * make RockboxFramebuffer native methods private * refactor attaching the RockboxFramebuffer view to RockboxActivity git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28505 a1c6a512-1295-4272-9138-f99709370657
2010-10-31Add support multimedia keys/buttons to the core, and adapt Rockbox on ↵Thomas Martitz
android for it (multimedia buttons are found on wired headsets and the lock screen in cyanogenmod). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28421 a1c6a512-1295-4272-9138-f99709370657
2010-10-31Pass the framebuffer to the service in the constructor rather than later ↵Thomas Martitz
from native code. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28411 a1c6a512-1295-4272-9138-f99709370657
2010-10-31Use a Native keyboard GUI instead of rockbox's internal one on androidJonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28407 a1c6a512-1295-4272-9138-f99709370657
2010-10-29Initialize (instantiate) RockboxFramebuffer from the C code like with the ↵Thomas Martitz
othe java objects. Remove some @Override annotations to make the Java code build with certain javac versions. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28386 a1c6a512-1295-4272-9138-f99709370657
2010-10-24Make sure the view always has focus and can be focused in touch mode so the ↵Jonathan Gordon
front buttons work after a touch git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28348 a1c6a512-1295-4272-9138-f99709370657
2010-09-12Code style changes in the java part (whitespaces and braces) to match ↵Thomas Martitz
Rockbox coding style. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28065 a1c6a512-1295-4272-9138-f99709370657
2010-08-16Android port: simplify sending touch events from Java->CMaurus Cuelenaere
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27833 a1c6a512-1295-4272-9138-f99709370657
2010-08-16Android port: add support for hardware keysMaurus Cuelenaere
* Forward Java KeyEvents to C layer and translate them to Rockbox BUTTON_*. * Add a basic Android keymap git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27832 a1c6a512-1295-4272-9138-f99709370657
2010-08-08A bit of cleanup.Thomas Martitz
Replace // with /* */ style comments Cleanup copy&paste from the doc examples. Don't pretend to handle exception we don't handle actually. cleanup imports git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27754 a1c6a512-1295-4272-9138-f99709370657
2010-08-04Implement HAVE_LCD_ENABLE and lcd_update_rect(). When Rockbox runs in the ↵Thomas Martitz
background this greatly reduces CPU load. lcd_update_rect shoves a bit as well. CPU usage with Rockbox in background is between 3% (with a 200kbps vbr mp3) and 12% (320kbps cbr mp3), so it's low but still dependent on codecs and even particular files. Driving a WPS with peakmeter, e.g. the builtin one, adds about 30% cpu usage. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27689 a1c6a512-1295-4272-9138-f99709370657
2010-08-02Rockbox as an application: Commit current Android port progress.Thomas Martitz
General state is: Rockbox is usable (plays music, saves configuration, touchscreen works too). Problems: - Playing music in the background (i.e. when switching to another app) doesn't work reliably, but I'm working on that now. - no cabbiev2 (only some preliminary files for it), no other default theme. - screen flickers sometimes if the updates are too frequent - no multi screen apk/package - strange behavior when a phone call comes in The java files (and the eclipse project) resides in android/, which is also supposed to be the build folder. I've put a small README in there for instructions. There are some steps needed after the make part, which are described there, and which eclipse mostly handles. But there ought to be some script/makefile rules which do that instead in the future. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27668 a1c6a512-1295-4272-9138-f99709370657