summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--android/src/org/rockbox/RockboxActivity.java1
-rw-r--r--android/src/org/rockbox/RockboxFramebuffer.java7
2 files changed, 8 insertions, 0 deletions
diff --git a/android/src/org/rockbox/RockboxActivity.java b/android/src/org/rockbox/RockboxActivity.java
index a6604418ed..8004046c1b 100644
--- a/android/src/org/rockbox/RockboxActivity.java
+++ b/android/src/org/rockbox/RockboxActivity.java
@@ -111,6 +111,7 @@ public class RockboxActivity extends Activity
{
super.onResume();
setVisible(true);
+ setServiceActivity(true);
}
/* this is also called when the backlight goes off,
diff --git a/android/src/org/rockbox/RockboxFramebuffer.java b/android/src/org/rockbox/RockboxFramebuffer.java
index 405a771274..9c4c6a5dc3 100644
--- a/android/src/org/rockbox/RockboxFramebuffer.java
+++ b/android/src/org/rockbox/RockboxFramebuffer.java
@@ -61,6 +61,9 @@ public class RockboxFramebuffer extends SurfaceView
{
SurfaceHolder holder = getHolder();
Canvas c = holder.lockCanvas();
+ if (c == null)
+ return;
+
btm.copyPixelsFromBuffer(framebuffer);
synchronized (holder)
{ /* draw */
@@ -73,6 +76,10 @@ public class RockboxFramebuffer extends SurfaceView
{
SurfaceHolder holder = getHolder();
Canvas c = holder.lockCanvas(dirty);
+
+ if (c == null)
+ return;
+
/* can't copy a partial buffer, but it doesn't make a noticeable difference anyway */
btm.copyPixelsFromBuffer(framebuffer);
synchronized (holder)