Commit graph

174 commits

Author SHA1 Message Date
Frank Gevaerts
d1560e5869 Add the Android/MIPS target
Change-Id: Iec1d2f08c8a43e486ab1696566a718b18598ff95
2012-06-11 22:29:45 +02:00
Thomas Martitz
5f7d5b854b android: Fix FS#12670, regressed back button behavior.
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-05-13 20:20:50 +02:00
Sean Bartell
f40bfc9267 Add codecs to librbcodec.
Change-Id: Id7f4717d51ed02d67cb9f9cb3c0ada4a81843f97
Reviewed-on: http://gerrit.rockbox.org/137
Reviewed-by: Nils Wallménius <nils@rockbox.org>
Tested-by: Nils Wallménius <nils@rockbox.org>
2012-04-25 22:13:20 +02:00
Thomas Martitz
3f4be75024 android: Bring back broken unzip progress dialog.
Change-Id: I7c788f4fcbdf15aa4955f3970db045b47207f8de
2012-04-17 17:19:31 +02:00
Thomas Martitz
0d9367744d android: bump target platform version to 4.0.3 (this time for real).
Change-Id: I616c1de498f2975c8af3e08b51d8fae77869f441
2012-04-17 17:19:31 +02:00
Thomas Martitz
4b56ee048a Refactor and unify objcopy calls in the build system. Also now properly handles DEBUG builds on hosted targets to keep debug symbols if necessary.
Change-Id: I884031b79c6d49479e4d95752f35ced68872dd5d
2012-04-04 21:48:19 +02:00
Thomas Martitz
f269aa0060 build system: unify/simplify library handling a bit.
libs in $ROOT/lib now add to $(CORE_LIBS) and $(EXTRA_LIBS) and are
automatically linked by the core and codecs/plugins respectively.

Change-Id: Iff482c792a8c8142718f6a16a450c6e2f1497c9a
2012-03-26 22:27:40 +02:00
Thomas Martitz
76664d22df android: only output unzip log message when performing the unzip.
Change-Id: I16dda180d51832569097d7dd1866ba7f56cdf876
2012-03-25 23:26:58 +02:00
Thomas Martitz
c8317eb596 android: clean-up and some refactoring in java code.
Change-Id: I78cadb0b71bcb65a55006bf52cfe3e6cda891a38
2012-03-25 22:28:07 +02:00
Thomas Martitz
2e03c2a8b3 android: Remove hack not needed anymore (since 58e097d).
Change-Id: I3396a1245fe5fcbb5d2494bfabf8972c7617e6b1
2012-03-22 23:46:54 +01:00
Thomas Martitz
901521d6de android: lcd_update/_rect() changes
* 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
2012-03-22 23:26:50 +01:00
Frank Gevaerts
0fdbbc3afd Add RBCODEC_LIB to android and ypr0 builds so they link again.
Change-Id: I022c7beba844a9b2cfcb8ec7950a1348e4bf511a
2012-03-18 13:37:49 +01:00
Marcin Bukat
b4eab59951 Arm stack unwinder
Simplified stack unwinder for ARM. This is port of
http://www.mcternan.me.uk/ArmStackUnwinding/
backtrace() is called from UIE() on native targets
and from panicf() on both native and ARM RaaA.

Change-Id: I8e4b3c02490dd60b30aa372fe842d193b8929ce0
2012-02-22 08:33:26 +01:00
Thomas Martitz
6d19275876 Hosted: Output map files after linking.
Change-Id: I5ac64d781aaa1aa2b3157589f8e689c0d946a39f
2012-01-21 18:39:19 +01:00
Thomas Martitz
3fdb48b3fe android: Add preliminary eclipse support for building the native code, disabled by default.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31549 a1c6a512-1295-4272-9138-f99709370657
2012-01-03 23:44:51 +00:00
Thomas Martitz
e9cb9538c7 android: Update build system for recent SDK versions and target ice cream sandwich.
As a result, the java parts can now be build using ant (in the android dir).
Just issue "ant debug" after "make libs". Building the java parts from eclipse
also still works.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31543 a1c6a512-1295-4272-9138-f99709370657
2012-01-03 21:15:21 +00:00
Thomas Martitz
0bc64a6bb3 Adjust a few makefiles to generate smaller (upto 80%) binaries on RaaA through
stripping.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31541 a1c6a512-1295-4272-9138-f99709370657
2012-01-03 21:15:11 +00:00
Thomas Martitz
7d61376ef8 Android: Ship cpufeatures.[ch] from the sdk to enable the build under the ndk r5 again.
Otherwise we could only build under r6. As r7 is the latest and can't build
rockbox don't break peoples installed ndks.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31369 a1c6a512-1295-4272-9138-f99709370657
2011-12-19 19:58:44 +00:00
Thomas Martitz
8439c2e3e3 Fix left-over hardcoded path (oops).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31365 a1c6a512-1295-4272-9138-f99709370657
2011-12-19 15:46:27 +00:00
Thomas Martitz
287454de2e Hosted/linux: Add process/cpu info screen to the debug menu.
The new menu is very helpful on RaaA, but also shown in the sim. It shows
the process cpu usage, process' time stats (user,sys,real) and the cpu
frequency stats.

It uses a thread to sample the data, however the thread is not created
until the menu is visited for the first time.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31364 a1c6a512-1295-4272-9138-f99709370657
2011-12-19 15:42:04 +00:00
Thomas Martitz
4d2ab32339 Android: Work around an android bug.
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-22 15:28:09 +00:00
Dominik Riebeling
ed15d53919 Android: show Album Art in notification area.
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-10-01 20:07:57 +00:00
Björn Stenberg
27a6d519f0 Disable android status bar again, until we have a generic theme solution.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30620 a1c6a512-1295-4272-9138-f99709370657
2011-09-30 06:30:10 +00:00
Björn Stenberg
d20328609d Enable Android status bar.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30617 a1c6a512-1295-4272-9138-f99709370657
2011-09-28 19:02:30 +00:00
Dominik Riebeling
385af791f1 Fix toolchain installation.
The filter for platform-tools is platform-tool, in contrast to the folder it
installs.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30483 a1c6a512-1295-4272-9138-f99709370657
2011-09-08 17:37:01 +00:00
Bryan Childs
11e1f71612 Added 'platform-tools' to the features installed by installToolChain.sh for the android build
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30431 a1c6a512-1295-4272-9138-f99709370657
2011-09-05 08:48:29 +00:00
Dominik Riebeling
1b70a7079e Android: store resources on SD card.
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-09-04 19:07:14 +00:00
Maurus Cuelenaere
82fa47dd06 Android tools: Allow discovery of download URLs
Automatically discover the latest and greatest version of the Android SDK and
NDK by fetching it from the index.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30334 a1c6a512-1295-4272-9138-f99709370657
2011-08-20 11:11:49 +00:00
Thomas Martitz
2d0e63e136 Android: Undo r30293 partly as it prevents installation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30299 a1c6a512-1295-4272-9138-f99709370657
2011-08-14 13:23:46 +00:00
Thomas Martitz
c6ca81329a Android: Fix a few java warnings. Upgrade ndk platform to 2.0 (don't support 1.6 anymore).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30293 a1c6a512-1295-4272-9138-f99709370657
2011-08-14 08:55:16 +00:00
Thomas Martitz
b2f52477df Android: Change headphone detection to call into native.
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-19 23:44:56 +00:00
Thomas Martitz
64b5f1c625 Android: Rework RunForegroundManager (again)
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-18 22:04:08 +00:00
Thomas Martitz
a5e7354b20 Android: Fix long unnoticed typo in function call, leading to the wrong function being called.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30163 a1c6a512-1295-4272-9138-f99709370657
2011-07-18 21:30:06 +00:00
Thomas Martitz
5721d4cfbf Forgot to add new class file in r30161.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30162 a1c6a512-1295-4272-9138-f99709370657
2011-07-18 21:28:02 +00:00
Thomas Martitz
02b2b285d6 Android: Slightly rework logging to logcat by offloading duplicated code to a new helper class.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30161 a1c6a512-1295-4272-9138-f99709370657
2011-07-18 21:26:03 +00:00
Thomas Martitz
33de9cdaef Android: Refactor some of the glue code.
* 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-18 21:02:47 +00:00
Thomas Martitz
76b6db375a Android: Fix sporadic force closes.
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-07-18 18:56:29 +00:00
Björn Stenberg
35cd408196 Added NODEPS define to skip recompilation for zip and apk builds. Usage: make zip NODEPS=1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30050 a1c6a512-1295-4272-9138-f99709370657
2011-06-22 14:14:49 +00:00
Dominik Riebeling
a3ed2c1552 Support installing the Android toolchain on Cygwin and OS X.
Update the download URLs to the most recent versions of SDK and NDK, the
previously used r09 of the SDK isn't available at that location anymore, and
differentiate between host platforms.

Note: while the script now can install the toolchain on Cygwin building for
Android on Cygwin does not work.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29993 a1c6a512-1295-4272-9138-f99709370657
2011-06-11 20:22:14 +00:00
Thomas Martitz
dace72166e Android: Greatly simplify the pcm callback mechanism on both, the Java and 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-05 09:44:57 +00:00
Thomas Martitz
b9747ca206 Hopefully FS#12064 - Android: Possible fix for audio stopping on high CPU load.
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-04 20:39:56 +00:00
Dominik Riebeling
d25a61f01c Android: listen to ACTION_AUDIO_BECOMING_NOISY for headphone (FS#12097).
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-04 19:17:51 +00:00
Dominik Riebeling
6c22be4a3d Android: implement headphone detection thus enabling pause on unplug (FS#12097).
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-06-04 19:17:47 +00:00
Dominik Riebeling
26a92fa9e1 Android: adjust screen orientation based on LCD size.
If the screen size specified is wider than higher specify the orientation as
landscape in AndroidManifest.xml. This usually applies to tablets where Rockbox
in portrait mode feels unnatural.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29951 a1c6a512-1295-4272-9138-f99709370657
2011-06-04 10:36:34 +00:00
Dominik Riebeling
70b81e65cc Android: install codecs as native libs instead of extracting them (FS#12134).
Codec files are loaded as dynamic libraries. Instead of extracting them from
the packaged libmisc.so and therefore having them present twice on the device
put them into the apk as native libraries. Decreases the size of the installed
Rockbox by the compressed size of the codecs. Also, the extraction on first
Rockbox startup gets notably faster since it's less data to extract.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29940 a1c6a512-1295-4272-9138-f99709370657
2011-05-31 21:26:18 +00:00
Dominik Riebeling
fc68a0d3b0 Android: rework r29929 AndroidManifest.xml version handling.
Put the generated AndroidManifest.xml into the bin subfolder and remove it from
clean list. Avoids problems with cleaning if you're building in the android/
folder. Thanks to kugel for pointing out that people are actually doing that.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29931 a1c6a512-1295-4272-9138-f99709370657
2011-05-29 18:44:42 +00:00
Dominik Riebeling
bc3f9c1b71 Add source tree version into AndroidManifest.xml
Use the source tree version as versionName string. As result the Android
Settings menu will now show that version instead of a rather unhelpful "1.0".

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29929 a1c6a512-1295-4272-9138-f99709370657
2011-05-29 17:23:52 +00:00
Thomas Martitz
94dacca559 Rework MediaButtonReceiver a bit:
* 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-05-13 11:26:18 +00:00
Thomas Martitz
c77b014283 Use mkdir -p in the previous commit. Thanks sideral for spotting.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29754 a1c6a512-1295-4272-9138-f99709370657
2011-04-21 09:35:35 +00:00
Thomas Martitz
f29c9d2289 Android: Fix creation of debug key if ~/.android doesn't exist.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29753 a1c6a512-1295-4272-9138-f99709370657
2011-04-21 09:04:04 +00:00