Commit graph

107 commits

Author SHA1 Message Date
Thomas Martitz
e6ae867206 Android: Remove notification item on pausing too.
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-26 20:27:00 +00:00
Thomas Martitz
eb01664804 Android: Simplify media button intent generation in the widget and cleanup RockboxService accordingly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29404 a1c6a512-1295-4272-9138-f99709370657
2011-02-26 19:54:03 +00:00
Thomas Martitz
95e24dd7a5 Android:
* 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-23 01:10:54 +00:00
Thomas Martitz
d6ce7fe3d4 Android: Fix some race conditions and crashes on startup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29341 a1c6a512-1295-4272-9138-f99709370657
2011-02-19 16:42:44 +00:00
Thomas Martitz
36af29f4d8 Android: Re-attach the media button receiver when entering Rockbox.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29335 a1c6a512-1295-4272-9138-f99709370657
2011-02-19 01:31:45 +00:00
Thomas Martitz
c9c28200c0 Correct setServiceActivity implementation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29334 a1c6a512-1295-4272-9138-f99709370657
2011-02-19 01:26:45 +00:00
Thomas Martitz
144df92bfb Android: Rewrite lcd subsystem to use the SurfaceView API.
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-02-19 01:13:38 +00:00
Dave Chapman
82140061a6 Update Android README in line with configure changes from r29286
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29296 a1c6a512-1295-4272-9138-f99709370657
2011-02-13 13:26:16 +00:00
Frank Gevaerts
38084784ad Make $(DIRS) an order-only dependency, to avoid needless rebuilding of some files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29197 a1c6a512-1295-4272-9138-f99709370657
2011-02-02 23:10:51 +00:00
Frank Gevaerts
276321e6d8 Change the way java files are compiled (do them all at once) in order to speed up builds. There is now an intermediate jar file to help (although that's not strictly necessary), so for rebuilds of single java files this may be a bit slower
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29196 a1c6a512-1295-4272-9138-f99709370657
2011-02-02 22:13:51 +00:00
Thomas Martitz
0f4dfc4e9d Android/Java: Disable implicit compilation of dependecies to make the life easier for make.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29187 a1c6a512-1295-4272-9138-f99709370657
2011-02-02 13:57:01 +00:00
Jonathan Gordon
b5562a10c8 update the toolchains install script to grab the latest and greatest
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29173 a1c6a512-1295-4272-9138-f99709370657
2011-01-30 02:33:47 +00:00
Antoine Cellerier
c0c769c5a8 Add widgets to android port.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29170 a1c6a512-1295-4272-9138-f99709370657
2011-01-29 20:47:32 +00:00
Antoine Cellerier
f716e4fded Oops, this line wasn't supposed to make it into svn.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29133 a1c6a512-1295-4272-9138-f99709370657
2011-01-24 17:27:54 +00:00
Antoine Cellerier
ef980355c8 Move android notification display format logic to java code (no functional change, this is used by FS #11902).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29132 a1c6a512-1295-4272-9138-f99709370657
2011-01-24 17:10:56 +00:00
Antoine Cellerier
a448d8bac7 Android build tweaks.
Add make install target for android builds.
Remove standard install targets as they don't apply.
Add java compilation dependancy on generated resource class(es?) to prevent weird runtime issues.
Update installApk.sh script to use correct tool location in recent sdks.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29131 a1c6a512-1295-4272-9138-f99709370657
2011-01-24 17:06:04 +00:00
Michael Stummvoll
9ef9904fa5 corrected the export-commands on the output. It should be "export ANDROID..." and not "export $ANDROID..."
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29034 a1c6a512-1295-4272-9138-f99709370657
2011-01-12 12:36:52 +00:00
Thomas Martitz
02d45a1318 Restore correct launcher.png for mdpi that got accidentally overwritten.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28787 a1c6a512-1295-4272-9138-f99709370657
2010-12-10 19:22:54 +00:00
Thomas Martitz
f5a461d182 Android: Rework notification and change icon sizes to better meet the systems' standard.
The notification now announces the new track on track change, and the the area in the scrolled down notification area shows track infos (title, artist, album).

Someone should check if it looks good on hdpi and ldpi screens as I can't verify it right now (emulator crashes).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28785 a1c6a512-1295-4272-9138-f99709370657
2010-12-10 18:41:09 +00:00
Thomas Martitz
c47d813451 Android: Replace the java based tick timer implemented with a not as bloated and more accurate linux hrtimer based one. Further reduces idle cpu usage (0% on my phone but still 1-2% on a Samsung Galaxy S).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28784 a1c6a512-1295-4272-9138-f99709370657
2010-12-10 15:14:18 +00:00
Jonathan Gordon
f51d6e6507 more than just a number changed, retry that last commit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28765 a1c6a512-1295-4272-9138-f99709370657
2010-12-08 05:05:43 +00:00
Jonathan Gordon
97d9c1eb37 download the r5 NDK to go along with the configure change in r28755
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28764 a1c6a512-1295-4272-9138-f99709370657
2010-12-08 04:57:55 +00:00
Thomas Martitz
ed61439b9c Fix extracting libmisc.so
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28754 a1c6a512-1295-4272-9138-f99709370657
2010-12-06 22:28:18 +00:00
Thomas Martitz
55b58a3f30 Android: Make lcd updates synchronous, doesn't make it faster but smoother (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-12-02 23:50:50 +00:00
Thomas Martitz
efe41e91c4 Android: When the backlight goes off, the RockboxFramebuffer/View isn't made invisible. Force that in order to disable screen updates while backlight is off.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28569 a1c6a512-1295-4272-9138-f99709370657
2010-11-12 22:09:27 +00:00
Thomas Martitz
f7c83ff969 Android: Use adb install -r to reinstall the app, as it doesn't remove icons from the homescreen.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28568 a1c6a512-1295-4272-9138-f99709370657
2010-11-12 22:00:36 +00:00
Thomas Martitz
28774873cf Android: Fix small error in install&run script.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28565 a1c6a512-1295-4272-9138-f99709370657
2010-11-12 21:21:12 +00:00
Thomas Martitz
0cf2cc1607 Android: Change how detecting call state (introduced in r27746) works, from polling to event based.
* For some reason, the polling methid is much more inefficient than I thought. According to htop it caused up to 15% CPU load on some phones (e.g. Galaxy S).
The event based causes no CPU load.
Rockbox' idle CPU load is now back to 0%, while it was previously dominated by polling the call state.

* Also stop on outgoing calls (no need to explicitely pause for making a call anymore).
* Factor out the detection mechanism to separate files.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28564 a1c6a512-1295-4272-9138-f99709370657
2010-11-12 21:04:13 +00:00
Thomas Martitz
33af0dec28 Touchscreen: Improved scroll threshold
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-10 15:25:15 +00:00
Jonathan Gordon
eab843f2c3 android: don't crash if the user presses HOME while the loading screen is showing, this shuld also be made canceleable later
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28530 a1c6a512-1295-4272-9138-f99709370657
2010-11-07 21:10:17 +00:00
Maurus Cuelenaere
ab9caead92 Android: add a script which allows headless installation of the Android tools required for compilation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28525 a1c6a512-1295-4272-9138-f99709370657
2010-11-06 17:32:52 +00:00
Maurus Cuelenaere
f20582442f Android: replace hardcoded strings with Android strings, allowing translations
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28518 a1c6a512-1295-4272-9138-f99709370657
2010-11-06 02:02:58 +00:00
Maurus Cuelenaere
13f7dffb09 Android: make R.java depend on android/res dir
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28517 a1c6a512-1295-4272-9138-f99709370657
2010-11-06 02:02:54 +00:00
Thomas Martitz
739d76cfda Android: Use our translations for the yes/no/ok/cancel buttons in the yesno and keyboard dialog.
Second part of FS#11708.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28515 a1c6a512-1295-4272-9138-f99709370657
2010-11-06 01:40:24 +00:00
Maurus Cuelenaere
93640fc228 Android: only display progress dialog when extraction happens
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28514 a1c6a512-1295-4272-9138-f99709370657
2010-11-06 01:27:01 +00:00
Maurus Cuelenaere
c31a2f3bbb Android: greatly simplify Android YesNo and KeyboardInput widgets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28513 a1c6a512-1295-4272-9138-f99709370657
2010-11-06 01:18:32 +00:00
Thomas Martitz
988bdc1cc4 Android: Use wakeup objects instead of polling for the dialog results in the keyboard and yesno dialog, allowing a lot of code to be removed.
First part of FS#11708

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28512 a1c6a512-1295-4272-9138-f99709370657
2010-11-06 01:01:01 +00:00
Maurus Cuelenaere
be51be6a99 Android: prevent NullPointerException in RockboxService
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28511 a1c6a512-1295-4272-9138-f99709370657
2010-11-05 23:55:20 +00:00
Maurus Cuelenaere
1b477de3cb Android: don't display the loading screen etc. when the library is already loaded
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28510 a1c6a512-1295-4272-9138-f99709370657
2010-11-05 23:52:26 +00:00
Maurus Cuelenaere
fe2be33318 Android: clean up extracting a bit + add user-visible error-reporting
Also put ResultReceiver on the RockboxActivity UI thread.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28509 a1c6a512-1295-4272-9138-f99709370657
2010-11-05 23:40:17 +00:00
Maurus Cuelenaere
4f747c1aaa Android: prevent loading the library twice
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28508 a1c6a512-1295-4272-9138-f99709370657
2010-11-05 23:40:05 +00:00
Maurus Cuelenaere
5e8863073e Android: add uninstall option to installApk.sh script
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28507 a1c6a512-1295-4272-9138-f99709370657
2010-11-05 23:40:00 +00:00
Maurus Cuelenaere
7ccc78d084 Android port: replace waiting hack in AndroidActivity with a ResultReceiver, added bonus is unzip progress feedback
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28506 a1c6a512-1295-4272-9138-f99709370657
2010-11-05 23:39:56 +00:00
Maurus Cuelenaere
a83043274b Android port:
* 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-11-05 23:39:53 +00:00
Thomas Martitz
540dd9c2d0 A bit of indentation/whitespace changes in the xml files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28504 a1c6a512-1295-4272-9138-f99709370657
2010-11-05 23:31:27 +00:00
Thomas Martitz
a2a243b34e Fix a small dependency issue, the directories need to be created first.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28503 a1c6a512-1295-4272-9138-f99709370657
2010-11-05 23:12:18 +00:00
Thomas Martitz
1c5f4d73f9 Android: Show the Rockbox in the background in the keyboard/yesno dialogs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28502 a1c6a512-1295-4272-9138-f99709370657
2010-11-05 23:12:13 +00:00
Maurus Cuelenaere
34fb311638 Android port: add a CLI APK install+launch script, useful for quick installation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28491 a1c6a512-1295-4272-9138-f99709370657
2010-11-05 16:17:25 +00:00
Maurus Cuelenaere
58f3549fb5 Android port: remove obsoleted build.sh shell script
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28490 a1c6a512-1295-4272-9138-f99709370657
2010-11-05 15:34:09 +00:00
Maurus Cuelenaere
181f6b1aae Android port: $(TEMP_APK) depends on $(AP_), so add it to its dependencies
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28489 a1c6a512-1295-4272-9138-f99709370657
2010-11-05 14:58:11 +00:00