Closed mergen3107 closed 8 months ago
Do not merge yet please, needs testing.
(P.S. I am trying now to put these file changes to a branch so you can see better)
Thanks. Way easier for me :)
Abort message: 'JNI DETECTED ERROR IN APPLICATION: JNI CallBooleanMethod called with pending exception java.lang.NoSuchMethodError: no non-static method "Lorg/koreader/launcher/MainActivity;.hasStandaloneWarmth()Z"
What am I doing wrong?
Nothing wrong, my comment wasn't exhaustive. You'll need to add the method to https://github.com/koreader/android-luajit-launcher/blob/master/app/src/main/java/org/koreader/launcher/LuaInterface.kt and override it in https://github.com/koreader/android-luajit-launcher/blob/master/app/src/main/java/org/koreader/launcher/MainActivity.kt
It (mainactivity) will look like:
override fun hasStandaloneWarmth(): Boolean {
return device.lights.hasStandaloneWarmth()
}
Thank you @pazos ! KOReader was able to open with these changes. I am able to turn off the frontlight (cold and warm) via a gesture.
However, when I turn it back on, only cold light turns on. I am trying to investigate this.
However, when I turn it back on, only cold light turns on. I am trying to investigate this.
https://github.com/koreader/koreader/pull/11275
android-luajit
side of things (this PR) is correct.
The mentioned PR is in discussion.
@pazos Please review this PR. It should be generalized enough so that we don't need to add devices one by one to make these changes apply - as long as they properly refer to this OnyxWarmthController.
Thank you for all your help!
Please review this PR. It should be generalized enough so that we don't need to add devices one by one to make these changes apply.
That's the entire point of the device abstraction ;)
PR is fine by me, please address specific comments.
Thank you! While adding my newlines, I noticed some methods didn't have them, so I added those newlines too, for consistency.
@pazos These are the changes I did (https://github.com/koreader/koreader/pull/8120#issuecomment-1636970460)
This change is