diff options
author | Thomas Martitz <kugel@rockbox.org> | 2011-03-16 14:33:55 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2011-03-16 14:33:55 +0000 |
commit | 046cec3aa7fd58a9519cad8d693b47a2400e1742 (patch) | |
tree | cb0ba0773a3e8b3cef5d7690e2822f03d1425ddb /firmware/target/hosted/android/lcd-android.c | |
parent | efa9f13500d1672d0b631520e92e08f3ff61e45c (diff) | |
download | rockbox-046cec3aa7fd58a9519cad8d693b47a2400e1742.tar.gz rockbox-046cec3aa7fd58a9519cad8d693b47a2400e1742.zip |
Android: Partly revert r29569 and only call the new getJavaEnvironment() 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
Diffstat (limited to 'firmware/target/hosted/android/lcd-android.c')
-rw-r--r-- | firmware/target/hosted/android/lcd-android.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/firmware/target/hosted/android/lcd-android.c b/firmware/target/hosted/android/lcd-android.c index 19f077010f..abde72155d 100644 --- a/firmware/target/hosted/android/lcd-android.c +++ b/firmware/target/hosted/android/lcd-android.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include "lcd.h" | 28 | #include "lcd.h" |
29 | #include "button.h" | 29 | #include "button.h" |
30 | 30 | ||
31 | extern JNIEnv *env_ptr; | ||
31 | extern jobject RockboxService_instance; | 32 | extern jobject RockboxService_instance; |
32 | 33 | ||
33 | static jobject RockboxFramebuffer_instance; | 34 | static jobject RockboxFramebuffer_instance; |
@@ -90,8 +91,6 @@ void lcd_init_device(void) | |||
90 | 91 | ||
91 | void lcd_update(void) | 92 | void lcd_update(void) |
92 | { | 93 | { |
93 | JNIEnv *env_ptr = getJavaEnvironment(); | ||
94 | |||
95 | if (display_on) | 94 | if (display_on) |
96 | (*env_ptr)->CallVoidMethod(env_ptr, RockboxFramebuffer_instance, | 95 | (*env_ptr)->CallVoidMethod(env_ptr, RockboxFramebuffer_instance, |
97 | java_lcd_update); | 96 | java_lcd_update); |
@@ -99,8 +98,6 @@ void lcd_update(void) | |||
99 | 98 | ||
100 | void lcd_update_rect(int x, int y, int width, int height) | 99 | void lcd_update_rect(int x, int y, int width, int height) |
101 | { | 100 | { |
102 | JNIEnv *env_ptr = getJavaEnvironment(); | ||
103 | |||
104 | if (display_on) | 101 | if (display_on) |
105 | (*env_ptr)->CallVoidMethod(env_ptr, RockboxFramebuffer_instance, | 102 | (*env_ptr)->CallVoidMethod(env_ptr, RockboxFramebuffer_instance, |
106 | java_lcd_update_rect, x, y, width, height); | 103 | java_lcd_update_rect, x, y, width, height); |