Closed yparitcher closed 1 year ago
Excellent, nicely done BTW :)
Please test on <= 12
It should work just fine. Unfortunately I don't have my dev machine with me until the weekend. Could you upload the APK somewhere?
works for me on 13
And should work for everybody :partying_face:
Could you test what happens on devices that require a view?
You just need to flip the conditions. IIRC it should work (ie: the NativeSurfaceView's surfaceChanged shouldn't override the activity's surfaceChanged) but I'm not sure anymore :p
Anyhow, none of the devices with NativeSurfaceView have a camera hole, so we're good nevertheless.
I should be able to build/test tomorrow, FWIW ;).
Excellent, nicely done BTW :)
I just followed your instructions :)
Could you test what happens on devices that require a view?
You just need to flip the conditions. IIRC it should work (ie: the NativeSurfaceView's surfaceChanged shouldn't override the activity's surfaceChanged) but I'm not sure anymore :p
Anyhow, none of the devices with NativeSurfaceView have a camera hole, so we're good nevertheless.
sorry, not sure exactly what you want here.
Please also test landscape, to make sure i did not mess that up.
sorry, not sure exactly what you want here.
!
, so it ends like val surfaceKind: String = if (!device.needsView) {
view = NativeSurfaceView(this)
window.takeSurface(null)
view?.holder?.addCallback(this)
setContentView(view)
"SurfaceView"
} else {
"Native Content"
}
so your device ends using "SurfaceView" instead of "Native Content".
Again, not so important as there're no devices that require a view and have a cutout. So totally fine if you want to skip it. I can test it myself when I finally update my tablet to android 13
the cutout on SurfaceView works, however when i try to open the top menu i get an error:
05-10 21:02:04.064 18158 18190 E NativeThread: Failed to run script: ffi/util.lua:693: bad argument #1 to 'pairs' (table expected, got nil)
05-10 21:02:04.109 18158 18158 V NativeGlue: Pause: 0xe7beb0f0
05-10 21:02:04.162 1203 1488 W ActivityManager: setHasOverlayUi called on unknown pid: 18158
aarch64 refuses to build jni/luajit/luajit
aarch64 refuses to build
jni/luajit/luajit
It's a GCC issue on debug builds, a release one should go through just fine (but will crash in fun and interesting ways at runtime ;p).
the cutout on SurfaceView works, however when i try to open the top menu i get an error:
05-10 21:02:04.064 18158 18190 E NativeThread: Failed to run script: ffi/util.lua:693: bad argument #1 to 'pairs' (table expected, got nil) 05-10 21:02:04.109 18158 18158 V NativeGlue: Pause: 0xe7beb0f0 05-10 21:02:04.162 1203 1488 W ActivityManager: setHasOverlayUi called on unknown pid: 18158
Do we get a Lua stacktrace somewhere in these cases?
aarch64 refuses to build
jni/luajit/luajit
It's a GCC issue on debug builds, a release one should go through just fine (but will crash in fun and interesting ways at runtime ;p).
I thought we have a aarch64 build?
the cutout on SurfaceView works, however when i try to open the top menu i get an error:
05-10 21:02:04.064 18158 18190 E NativeThread: Failed to run script: ffi/util.lua:693: bad argument #1 to 'pairs' (table expected, got nil) 05-10 21:02:04.109 18158 18158 V NativeGlue: Pause: 0xe7beb0f0 05-10 21:02:04.162 1203 1488 W ActivityManager: setHasOverlayUi called on unknown pid: 18158
Do we get a Lua stacktrace somewhere in these cases?
That is all i got in the adb logs. The koreader bomb page is empty. This was using surfaceview instead of native context. Native context works fine.
Okay, finally tested on Android 12 ;).
First boot was... wonky on several aspects (some of it unrelated: e.g., the statistics DB migration hung until the next input event), at which point it booted up... with the bottom cutoff ;).
Everything's fine after a restart, and Landscape behaves (as does switching from a Landscape book to the Portrait FM).
The SurfaceView implementation also appears to behave over here... except for that first boot issue where it's also cutoff.
Funnily enough, I couldn't reproduce it the second time around when switching back to the Native Content imp.
(And I got to see the spinner on the splash screen, which I never did before, I think?).
You should generally see a spinner (as in 3 dots) the first time after any upgrade. It's about 2-3 seconds on my Realme 7 Pro with a Snapdragon 720G.
Yeah, I'm not sure I did in the cases where the first boot was buggy (and the spinner is low, but I don't think it's low enough to fall off-screen in case the splash is affected by a similar issue?).
That said, it was late, I hadn't slept much, so it's entirely possible I just missed it (I was mainly looking at the logcat, not the device's screen) ;).
the cutout on SurfaceView works, however when i try to open the top menu i get an error:
sorry, I missed the notification :p
Who knows? My tablet is going to update to lineage20 soon, so I can try to reproduce there. It seems that android 13 introduced quite a bit of changes that mess with some of our hacks. Work for future us :p
Feel free to merge when you want. @yparitcher
works for me on 13
Please test on <= 12
Fixes: koreader/koreader#9446
This change is