summaryrefslogtreecommitdiff
path: root/android/src
AgeCommit message (Collapse)Author
2014-05-21Fix android black screen crashJonathan Gordon
Change-Id: I7a0eb121ff151b8b6e8f824ee8dbab8d99b73499
2014-05-15Fix android SDK version and the yes/no screen titleJonathan Gordon
Change-Id: I84a067adcc83291de5131c88483f400d38bea15b
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
2013-04-01android: Rewrite PCM playback without OnPlaybackPositionUpdateListener.Thomas Martitz
The old way actually mis-used the API (I misunderstood the docs) because it specified the marker position as a "low buffer watermark" but instead of a future playback head position. The replacement is a simple thread that writes the data regardless of the filling level of the buffer (write() will just block) and polls the playback state periodically. Change-Id: If29237cee4ce78dc42f5a8320878bab0cafe78f7 Reviewed-on: http://gerrit.rockbox.org/422 Tested-by: Dominik Riebeling <Dominik.Riebeling@gmail.com> Reviewed-by: Thomas Martitz <kugel@rockbox.org>
2013-01-18android: Hopefully fix a rare hang of the UI.Thomas Martitz
Sometimes (and perhaps only on some devices) Android's YesNo dialog loses focus and is put to the background. Since the native code waits on the result (which is then impossible to happen) it would become impossible to further control Rockbox. This is an attempt to fix as I cannot reproduce the problem on my device(s). Change-Id: Iff849ff4be5e8f41922fb7d36491d860486c6441
2013-01-09android: Update to SDK r16 and ndk r8d.Thomas Martitz
SDK r17 is out, however there it only ships a x86 system image for r16 so it's preferable. Change-Id: Idc4d375debf407a36c2dc6421420bdbd74ab25ca
2012-05-13android: Fix FS#12670, regressed back button behavior.Thomas Martitz
3f4be75 introduced this regression where the back button stopped working as intended. Explicitely request the focus on the RockboxFramebuffer object to fix. Change-Id: Ibc67e3d02e076674a086d43c5967370c4524fd14
2012-04-17android: Bring back broken unzip progress dialog.Thomas Martitz
Change-Id: I7c788f4fcbdf15aa4955f3970db045b47207f8de
2012-03-25android: only output unzip log message when performing the unzip.Thomas Martitz
Change-Id: I16dda180d51832569097d7dd1866ba7f56cdf876
2012-03-25android: clean-up and some refactoring in java code.Thomas Martitz
Change-Id: I78cadb0b71bcb65a55006bf52cfe3e6cda891a38
2012-03-22android: Remove hack not needed anymore (since 58e097d).Thomas Martitz
Change-Id: I3396a1245fe5fcbb5d2494bfabf8972c7617e6b1
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-10-22Android: Work around an android bug.Thomas Martitz
BitmapFactory.decodeFile() fails when called outside the main thread. Work around by running the code on the main thread. This also has the advantage of off-loading from the Rockbox thread which should improve track skipping delays. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30825 a1c6a512-1295-4272-9138-f99709370657
2011-10-01Android: show Album Art in notification area.Dominik Riebeling
Instead of showing the small Rockbox clef logo show the Album Art if available. If no Album Art is available show the clef logo about the same size as the Album Art. - The notification area process doesn't have permissions to access the SD card. Therefore the image needs to be read and set as Bitmap instead of simply setting the Uri to it as done in the widget. - Passing a full sized image to the Notification Manager can cause issues (Rockbox UI hanging, notification not updating anymore, force closes). Scale down the image to the same size the launcher icon has to avoid this. This also makes the logo shown when no Album Art is available have the same size which looks nicer than having different sizes. Album Art images are allowed to be wider since there is enough room. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30629 a1c6a512-1295-4272-9138-f99709370657
2011-09-30Disable android status bar again, until we have a generic theme solution.Björn Stenberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30620 a1c6a512-1295-4272-9138-f99709370657
2011-09-28Enable Android status bar.Björn Stenberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30617 a1c6a512-1295-4272-9138-f99709370657
2011-09-04Android: store resources on SD card.Dominik Riebeling
On the first start Rockbox extracts libmisc.so which in fact is a zip file holding resource files like theme bitmaps. Those can requires quite a bit of memory. As extended version of FS#12063 resources will now be extracted to SD card if the file /sdcard/rockbox/rockbox-info.txt is found. This file is part of the extracted resources and can therefore safely be used for checking. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30430 a1c6a512-1295-4272-9138-f99709370657
2011-08-14Android: Fix a few java warnings. Upgrade ndk platform to 2.0 (don't support ↵Thomas Martitz
1.6 anymore). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30293 a1c6a512-1295-4272-9138-f99709370657
2011-07-19Android: Change headphone detection to call into native.Thomas Martitz
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
2011-07-18Android: Rework RunForegroundManager (again)Thomas Martitz
Restore pre-r29562 way of doing compatibility and adapt it to what MediaButtonReceiver looks like. I.e. assume the new API is there, and fall back to the old API if an exception is raised because the API isn't there. The old API still needs to be discovered through reflection because it's removed entirely from Honeycomb. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30165 a1c6a512-1295-4272-9138-f99709370657
2011-07-18Android: Fix long unnoticed typo in function call, leading to the wrong ↵Thomas Martitz
function being called. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30163 a1c6a512-1295-4272-9138-f99709370657
2011-07-18Forgot to add new class file in r30161.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30162 a1c6a512-1295-4272-9138-f99709370657
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-07-18Android: Refactor some of the glue code.Thomas Martitz
* 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
2011-07-18Android: Fix sporadic force closes.Thomas Martitz
Android restarts services that are killed during memory pressure. The intent parameter is null then. This caused a null pointer exception. Now replace this null intent with one saying we've been restarted. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30156 a1c6a512-1295-4272-9138-f99709370657
2011-06-05Android: Greatly simplify the pcm callback mechanism on both, the Java and ↵Thomas Martitz
the C side. Should be more reliable now (if the old wasn't already). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29963 a1c6a512-1295-4272-9138-f99709370657
2011-06-04Hopefully FS#12064 - Android: Possible fix for audio stopping on high CPU load.Thomas Martitz
It's not enterly clear what fixed it but it seems to be a combination of increasing the buffer size and reducing the amount of code run in the callback. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29961 a1c6a512-1295-4272-9138-f99709370657
2011-06-04Android: listen to ACTION_AUDIO_BECOMING_NOISY for headphone (FS#12097).Dominik Riebeling
This event is sent before the audio is routed back to the speaker so we get the information about the unplugged headphone notably earlier. Decrease the debouncing of the headphone status from 1s to 0.5s to work around audio still getting played back via the speaker due to the pause delay by debouncing. On Android we shouldn't need the debouncing at all. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29957 a1c6a512-1295-4272-9138-f99709370657
2011-06-04Android: implement headphone detection thus enabling pause on unplug (FS#12097).Dominik Riebeling
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
2011-05-13Rework MediaButtonReceiver a bit:Thomas Martitz
* Get rid of reflection since the lack of methods can be detected via exceptions * Use requestAudioFocus/abandonAudioFocus APIs on 2.2+ to play nice with other music apps. * Don't unregister the receiver on exit so we can receive media button presses (and startup the service) after idle poweroff (hopefully it's ok if mMediaButtonReceiver is garbage collected) This should fix that Android calls the standard music app sometimes when those buttons are pressed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29865 a1c6a512-1295-4272-9138-f99709370657
2011-04-14Fix some whitespace errors.Dominik Riebeling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29712 a1c6a512-1295-4272-9138-f99709370657
2011-03-31Only set volume on SYS_VOLUME_CHANGED the first time. Workaround for FS#12034.Björn Stenberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29663 a1c6a512-1295-4272-9138-f99709370657
2011-03-16Android: Implement app shutdown and thus, sleep timer.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29602 a1c6a512-1295-4272-9138-f99709370657
2011-03-16Android: Fix widget albumart display on pre-2.2 devices.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29600 a1c6a512-1295-4272-9138-f99709370657
2011-03-14Listen to and follow external Android volume changes. (Based on FS#11914 by ↵Björn Stenberg
Maurus Cuelenaere) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29586 a1c6a512-1295-4272-9138-f99709370657
2011-03-11Use the pcm volume to add finer steps between every android stream volume step.Björn Stenberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29573 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-03-11Android: future-proof the RunForegroundManager code to HoneycombMaurus Cuelenaere
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29562 a1c6a512-1295-4272-9138-f99709370657
2011-03-11Android port: generate initial config when none is present with dynamicallyMaurus Cuelenaere
generated values depending on your environment. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29560 a1c6a512-1295-4272-9138-f99709370657
2011-03-09Ask for track information to be resent after creating a new widget.Antoine Cellerier
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29553 a1c6a512-1295-4272-9138-f99709370657
2011-03-09Looks like Android 2.3 is more strict when enforcing permissions. Explicitly ↵Antoine Cellerier
declare allowed intents under the Service tag in AndroidManifest.xml. Remove useless rockbox intent class. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29552 a1c6a512-1295-4272-9138-f99709370657
2011-02-27Android: Show cover art in the widget (including option to hide it).Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29437 a1c6a512-1295-4272-9138-f99709370657
2011-02-26Android: Add a 3x3 sized widget.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29409 a1c6a512-1295-4272-9138-f99709370657
2011-02-26Android: Remove notification item on pausing too.Thomas Martitz
Technically, the difference between stop and pause isn't important enough to keep it when no music is playing. This is how other media apps also act. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29405 a1c6a512-1295-4272-9138-f99709370657
2011-02-26Android: Simplify media button intent generation in the widget and cleanup ↵Thomas Martitz
RockboxService accordingly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29404 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: Fix some race conditions and crashes on startup.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29341 a1c6a512-1295-4272-9138-f99709370657
2011-02-19Android: Re-attach the media button receiver when entering Rockbox.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29335 a1c6a512-1295-4272-9138-f99709370657
2011-02-19Correct setServiceActivity implementationThomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29334 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