-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration, WebClient & Lint Fixes #16
Conversation
Web client
Migrate package
fixed a ViewBinding related crash in ScreenSaverView
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty good! For now I've only looked through the code, mentioning some nitpicks and specifically the OKHTTP bump which would break KitKat devices. I wlil be trying on real devices soon just to be sure everything is stable
WallPanelApp/src/main/java/xyz/wallpanel/app/ui/activities/BrowserActivityNative.kt
Outdated
Show resolved
Hide resolved
WallPanelApp/src/main/java/xyz/wallpanel/app/ui/activities/BrowserActivityNative.kt
Outdated
Show resolved
Hide resolved
While testing out I came across a crash loop on one of my Oreo devices where after trying to start up the camera but failing, it then gives a NullPointerException at CrashlyticsDebugTree. Haven't gotten into debugging this yet. Fatal Exception: java.lang.RuntimeException: Unable to create service xyz.wallpanel.app.network.WallPanelService: java.lang.NullPointerException
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3376)
at android.app.ActivityThread.-wrap4()
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1701)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6523)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857) Caused by java.lang.NullPointerException
at xyz.wallpanel.app.utils.CrashlyticsDebugTree.log(CrashlyticsDebugTree.kt:17)
at timber.log.Timber$Tree.prepareLog(Timber.java:532)
at timber.log.Timber$Tree.e(Timber.java:450)
at timber.log.Timber$1.e(Timber.java:306)
at timber.log.Timber.e(Timber.java:83)
at xyz.wallpanel.app.modules.CameraReader.startCamera(CameraReader.kt:132)
at xyz.wallpanel.app.network.WallPanelService.configureCamera(WallPanelService.kt:381)
at xyz.wallpanel.app.network.WallPanelService.onCreate(WallPanelService.kt:177)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3366)
at android.app.ActivityThread.-wrap4()
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1701)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6523)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857) |
Fixed a potential NPE |
I also see camera errors on the Nexus 9 with SlimRom unfortunately, these JNI bugs are difficult to trace |
Ah, sorry about that. I didn't mean the camera issue specifically. I just meant the CrashlyticsDebugTree.kt as I assumed with the new utils file in this PR, it could potentially also crash with NPE on other exceptions. |
Yep, that has been addressed with c0a2f09 |
This looks very good! The only issue left that I have found is that on KitKat, it seems like the WebView does not get bound on the layout properly. There's only a white page unfortunately regardless on what URL I have set. By debugging, I see the pages do load in the background. I assume this has something to do with the new ViewBinding that replaced the deprecated synthetic way. I personally haven't found a solution yet, maybe you have an idea how to solve this 😄 If that could be solved then this would LGTM |
API 25 is Android 7.1.1 Nougat if the device name is correct 😄 |
Thanks, I guess I'll chalk it up on my setup doing something weird in that regard. Thank you very much for this PR and for the work. This definitely helped me quite a lot since quite a lot of things were something I planned to do, but didn't come around yet. I really appreciate the whole cleanup and porting done to modernize the code stack a bit further. |
@TheTimeWalker could you release a new version? |
This is more of a |
ViewBinding
fromKotlin Synthetic
(deprecated)WebClient
to help clean upBrowserActivityNative
Crashlytics
dependencies (my fork has a google-services.json for dev)Happy to huddle if it helps
(please test the app by run the app for a good length of time)