in the qr activity, the qrShowFragment may be used without being initialized before (QrActivity.qrShowFragment is set on adapter.getItem() - it is unclear if that is called for not visible taps, that may depend on android version - but we are using QrActivity.qrShowFragment when tapping "share" icon from "scan fragment", fix would probably just be to create the fragment unconditionally on activity creation)
we got the following report from gplay console:
Exception java.lang.NullPointerException:
at org.thoughtcrime.securesms.qr.QrActivity.onOptionsItemSelected (QrActivity.java:142)
at android.app.Activity.onMenuItemSelected (Activity.java:4732)
at androidx.activity.ComponentActivity.onMenuItemSelected (ComponentActivity.java:528)
at androidx.fragment.app.FragmentActivity.onMenuItemSelected (FragmentActivity.java:352)
at androidx.appcompat.app.AppCompatActivity.onMenuItemSelected (AppCompatActivity.java:269)
at androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected (WindowCallbackWrapper.java:110)
at androidx.appcompat.app.ToolbarActionBar$2.onMenuItemClick (ToolbarActionBar.java:66)
at androidx.appcompat.widget.Toolbar$1.onMenuItemClick (Toolbar.java:225)
at androidx.appcompat.widget.ActionMenuView$MenuBuilderCallback.onMenuItemSelected (ActionMenuView.java:781)
at androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected (MenuBuilder.java:836)
at androidx.appcompat.view.menu.MenuItemImpl.invoke (MenuItemImpl.java:159)
at androidx.appcompat.view.menu.MenuBuilder.performItemAction (MenuBuilder.java:987)
at androidx.appcompat.view.menu.MenuBuilder.performItemAction (MenuBuilder.java:977)
at androidx.appcompat.widget.ActionMenuView.invokeItem (ActionMenuView.java:625)
at androidx.appcompat.view.menu.ActionMenuItemView.onClick (ActionMenuItemView.java:156)
at android.view.View.performClick (View.java:7799)
at android.view.View.performClickInternal (View.java:7776)
at android.view.View.-$$Nest$mperformClickInternal
at android.view.View$PerformClick.run (View.java:31144)
at android.os.Handler.handleCallback (Handler.java:958)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loopOnce (Looper.java:224)
at android.os.Looper.loop (Looper.java:318)
at android.app.ActivityThread.main (ActivityThread.java:8727)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:561)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1013)
(i could no reproduce the issue, however, it seems obvious that it can happen on some android versions)
in the qr activity, the qrShowFragment may be used without being initialized before (QrActivity.qrShowFragment is set on adapter.getItem() - it is unclear if that is called for not visible taps, that may depend on android version - but we are using QrActivity.qrShowFragment when tapping "share" icon from "scan fragment", fix would probably just be to create the fragment unconditionally on activity creation)
we got the following report from gplay console:
(i could no reproduce the issue, however, it seems obvious that it can happen on some android versions)