summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/android/button-android.c (follow)
Commit message (Collapse)AuthorAge
* touch devices: Disable touch on softlock.Jean-Louis Biasini2013-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | Target that have a touchpad/touchscreen should disable it while being locked (In order to avoid LCD to drain battery power due to "key locked" constant reporting messages. If they a have a keylock button this was already handled at driver level. If not (e.g. fuze+), they will have to implement a switch at driver level that action.c can operate on softlock. This patch does the following for any target having a touchpad or a touchscreen and no HAS_BUTTON_HOLD (ie any softlock target) 1) it implements the code to call button_enable_touch(bool en) in action.c. 2) button_enable_touch is implemented in button.c and call either touchpad_enable or touchscreen_enable 3) those two function are implemented respectively in touchscreen.c and a new touchpad.c file. They provide a generic way to silents touch's device and call a function at driver level where target specific code can be implemented if possible/needed (for power saving for instance). Those function name are touchpad_enable_device and touchscreen_enable_device 4) we implement an empty function at driver level of targets that need it to have them still being able to compiled. Change-Id: I9ead78a25bd33466a8533f5b9f259b395cb5ce49 Reviewed-on: http://gerrit.rockbox.org/569 Reviewed-by: Thomas Martitz <kugel@rockbox.org> Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* android: Add facility for java code to wait native code to be ready.Thomas Martitz2012-03-22
| | | | | | | | | | | | | Especially when unzipping rockbox.zip, the native code can be initialized a lot later than the java code. The java code needs to be prevented from accessing rockbox structures (e.g. current_tick, event queues) before they're ready. This commit adds wait_rockbox_ready() and fixes dodgy behavior of starting rockbox via widget play button, headset remote buttons or multimedia keys. Also fixes wrong small list items before first redraw. Change-Id: I1caf925e829a9c1c6bb6e0016d5c80574574c91e
* Android: Fix crash on start up.Thomas Martitz2011-07-22
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30190 a1c6a512-1295-4272-9138-f99709370657
* Android: Change headphone detection to call into native.Thomas Martitz2011-07-19
| | | | | | | | Making a JNI call from tick tasks is not permitted as the underlying thread is not attached to the Java VM. This is an error and crashes in the emulator (which has stricter JNI checks enabled by default). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30173 a1c6a512-1295-4272-9138-f99709370657
* Android: Refactor some of the glue code.Thomas Martitz2011-07-18
| | | | | | | | | | | * Cleanup RockboxService.java by moving the battery and headphone monitors to separate classes and detaching their instances * Move those monitors and RockboxTelephony.java into a new monitors subdirectory * Call those monitors all the same from native code by creating the objects there git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30160 a1c6a512-1295-4272-9138-f99709370657
* Android: implement headphone detection thus enabling pause on unplug (FS#12097).Dominik Riebeling2011-06-04
| | | | | | | | | | | Listen to headphone plug events. There are currently two glitches with this: - Android takes a while until it reports the unplug event, so there will be some delay until playback gets paused. This is an Android limitation. - Rockbox debounces headphone state changes for one second. Therefore playback will shortly be routed to the speaker on unplug until Rockbox does the actual pause. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29956 a1c6a512-1295-4272-9138-f99709370657
* Fix an implicit declaration warning.Dominik Riebeling2011-05-29
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29930 a1c6a512-1295-4272-9138-f99709370657
* Fix a problem where hardware keypresses dont reset the idle poweroff timer ↵Jonathan Gordon2011-05-25
| | | | | | on android git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29924 a1c6a512-1295-4272-9138-f99709370657
* Android: Partly revert r29569 and only call the new getJavaEnvironment() ↵Thomas Martitz2011-03-16
| | | | | | | | | when needed. The environment is fine to share in general, just not across OS threads, so it's only needed for functions which are possibly called from multiple OS threads (only 1 currently). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29601 a1c6a512-1295-4272-9138-f99709370657
* Android: Don't share the JNI environment across threads, but obtain it theMaurus Cuelenaere2011-03-11
| | | | | | correct way git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29569 a1c6a512-1295-4272-9138-f99709370657
* Android:Thomas Martitz2011-02-23
| | | | | | | | | * 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
* Add widgets to android port.Antoine Cellerier2011-01-29
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29170 a1c6a512-1295-4272-9138-f99709370657
* remove an unused variable and #includeJonathan Gordon2010-11-07
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28526 a1c6a512-1295-4272-9138-f99709370657
* Remote android button handling (again). do the press/unpress more like other ↵Jonathan Gordon2010-11-03
| | | | | | | | targets (i.e correctly). The DPAD is special in that the press/unpress happens too quickly, so always post it with the BUTTON_REL. This means all keymaps using the dpad need to remember it will always have a BUTTON_REL (which also means they cant do repeats, which are impossible anyway). Also make the back button go back to the OS home from the rockbox main menu git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28475 a1c6a512-1295-4272-9138-f99709370657
* Add support multimedia keys/buttons to the core, and adapt Rockbox on ↵Thomas Martitz2010-10-31
| | | | | | 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
* Fix android hardware button handling so it actually works.Jonathan Gordon2010-10-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28345 a1c6a512-1295-4272-9138-f99709370657
* Android port: simplify sending touch events from Java->CMaurus Cuelenaere2010-08-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27833 a1c6a512-1295-4272-9138-f99709370657
* Android port: add support for hardware keysMaurus Cuelenaere2010-08-16
| | | | | | | * 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
* Add a few forgotten files, Fix potential startup problem. Fix absolute ↵Thomas Martitz2010-08-04
| | | | | | touchscreen mode. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27693 a1c6a512-1295-4272-9138-f99709370657
* Rockbox as an application: Commit current Android port progress.Thomas Martitz2010-08-02
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