Closed austinhuang0131 closed 4 years ago
Same behaviour here on Huawei P30 / ELE-L29 / with Android 10, EMUI 10.1
Thanks a lot for the logcat, @austinhuang0131 !!!
As mentioned in #32, could not reproduce the issue, but after checking the log you provided it seems that it could be related with the permission management. May I suggest to reinstall the app, go to app settings, give calendar permissions and then try to place the widget? If that works, will try to find an alternative way of handling the permission that does not get stuck
Gave Calendar perms right after installation. Same issue.
(App does ask for Calendar permission after I revoke it.)
Thanks for trying out. Could you please do the same with a different launcher? I'm just trying to isolate the problem, if it's a launcher issue probably i can install and debug that on my phone
Sorry for late reply... I use the system launcher (com.sonymobile.home
). As we know, it affects EMUI launcher as well since @kboss uses a Huawei. So it shouldn't be a launcher issue. Nevertheless, I got OpenLauncher from F-Droid and the app would crash upon trying to add the widget.
Build version: 0.7.3
Build date: 1979-11-29 19:00:00
Current date: 2020-08-25 23:35:59
Device: Sony H3123
Stack trace:
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=25717, result=-1, data=null} to activity {com.benny.openlauncher/com.benny.openlauncher.activity.HomeActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.os.Bundle android.content.Intent.getExtras()' on a null object reference
at android.app.ActivityThread.deliverResults(ActivityThread.java:4382)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4424)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1814)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:280)
at android.app.ActivityThread.main(ActivityThread.java:6706)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.os.Bundle android.content.Intent.getExtras()' on a null object reference
at com.benny.openlauncher.activity.homeparts.HpDesktopOption.createWidget(HpDesktopOption.java:86)
at com.benny.openlauncher.activity.HomeActivity.onActivityResult(HomeActivity.java:489)
at android.app.Activity.dispatchActivityResult(Activity.java:7463)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4375)
... 11 more
(their crash log)
So finally got my hands on a Huawey and could reproduce the issue, but no traces in the logcat helped.
After playing a bit, it seems that some manufacturers implement differently the callback from the configuration of the widget provider, so reorganising how the read calendar permission is set will fix this issue.
Thanks for your patience, this took some time 😅
Per #32. Sony Xperia XA2 / H3123 / Android 9. v1.4.1 tried both GitHub release and F-droid.