Skip to content

Commit 3e149d8

Browse files
authored
Fix Onyx Boox black screen on wake by not using SurfaceView (koreader#579)
On some Onyx Boox devices (confirmed on Palma 2), the SurfaceView surface is not recreated after the rapid RESUME/PAUSE/STOP activity cycling that the Boox system performs on wake. This leaves android.app.window permanently nil, causing a black screen. The SurfaceView with setZOrderOnTop(true) and PixelFormat.TRANSPARENT was introduced for NGL4/Tolino devices. The Onyx Qualcomm EPD API (View.refreshScreen) does not require a SurfaceView — when needsView is false, einkUpdate() already falls back to the DecorView content view. Setting needsView()=false makes Onyx devices use NativeActivity's default DecorView surface, which follows the standard activity lifecycle and correctly survives the Boox wake sequence.
1 parent 9a25447 commit 3e149d8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/src/main/java/org/koreader/launcher/device/epd/OnyxEPDController.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class OnyxEPDController : QualcommEPDController(), EPDInterface {
4848
}
4949

5050
override fun needsView(): Boolean {
51-
return true
51+
return false
5252
}
5353

5454
override fun setEpdMode(targetView: android.view.View,

0 commit comments

Comments
 (0)