{"action":"created","issue":{"url":"https://api.github.com/repos/baishixian/Share2/issues/5","repository_url":"https://api.github.com/repos/baishixian/Share2","labels_url":"https://api.github.com/repos/baishixian/Share2/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/baishixian/Share2/issues/5/comments","events_url":"https://api.github.com/repos/baishixian/Share2/issues/5/events","html_url":"https://github.com/baishixian/Share2/issues/5","id":390993603,"node_id":"MDU6SXNzdWUzOTA5OTM2MDM=","number":5,"title":"android 4.4 分享导致崩溃问题","user":{"login":"Ericml","id":15928413,"node_id":"MDQ6VXNlcjE1OTI4NDEz","avatar_url":"https://avatars2.githubusercontent.com/u/15928413?v=4","gravatar_id":"","url":"https://api.github.com/users/Ericml","html_url":"https://github.com/Ericml","followers_url":"https://api.github.com/users/Ericml/followers","following_url":"https://api.github.com/users/Ericml/following{/other_user}","gists_url":"https://api.github.com/users/Ericml/gists{/gist_id}","starred_url":"https://api.github.com/users/Ericml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ericml/subscriptions","organizations_url":"https://api.github.com/users/Ericml/orgs","repos_url":"https://api.github.com/users/Ericml/repos","events_url":"https://api.github.com/users/Ericml/events{/privacy}","received_events_url":"https://api.github.com/users/Ericml/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-14T07:17:24Z","updated_at":"2018-12-14T12:02:13Z","closed_at":null,"author_association":"NONE","body":"当我 在android 4.4 分享图片集合时 shareFileUri 是 为空的，但是以下代码会执行，导致空指针异常\r\n`if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT) {\r\n                    List<ResolveInfo> resInfoList = activity.getPackageManager().queryIntentActivities(shareIntent, PackageManager.MATCH_DEFAULT_ONLY);\r\n                    for (ResolveInfo resolveInfo : resInfoList) {\r\n                        String packageName = resolveInfo.activityInfo.packageName;\r\n                            activity.grantUriPermission(packageName, shareFileUri,Intent.FLAG_GRANT_READ_URI_PERMISSION);\r\n                        }\r\n                    }\r\n                }`\r\n\r\n\r\n可修改为如下 可以解决该问题\r\n`if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT) {\r\n                    List<ResolveInfo> resInfoList = activity.getPackageManager().queryIntentActivities(shareIntent, PackageManager.MATCH_DEFAULT_ONLY);\r\n                    for (ResolveInfo resolveInfo : resInfoList) {\r\n                        String packageName = resolveInfo.activityInfo.packageName;\r\n                        if (!shareMulit && shareFileUri != null) {\r\n                            activity.grantUriPermission(packageName, shareFileUri, Intent.FLAG_GRANT_READ_URI_PERMISSION);\r\n                        } else {\r\n                            for (Uri fileUris : shareFileUris) {\r\n                                activity.grantUriPermission(packageName, fileUris, Intent.FLAG_GRANT_READ_URI_PERMISSION);\r\n                            }\r\n                        }\r\n                    }\r\n                }`\r\n"},"comment":{"url":"https://api.github.com/repos/baishixian/Share2/issues/comments/447305038","html_url":"https://github.com/baishixian/Share2/issues/5#issuecomment-447305038","issue_url":"https://api.github.com/repos/baishixian/Share2/issues/5","id":447305038,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NzMwNTAzOA==","user":{"login":"baishixian","id":7071322,"node_id":"MDQ6VXNlcjcwNzEzMjI=","avatar_url":"https://avatars1.githubusercontent.com/u/7071322?v=4","gravatar_id":"","url":"https://api.github.com/users/baishixian","html_url":"https://github.com/baishixian","followers_url":"https://api.github.com/users/baishixian/followers","following_url":"https://api.github.com/users/baishixian/following{/other_user}","gists_url":"https://api.github.com/users/baishixian/gists{/gist_id}","starred_url":"https://api.github.com/users/baishixian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baishixian/subscriptions","organizations_url":"https://api.github.com/users/baishixian/orgs","repos_url":"https://api.github.com/users/baishixian/repos","events_url":"https://api.github.com/users/baishixian/events{/privacy}","received_events_url":"https://api.github.com/users/baishixian/received_events","type":"User","site_admin":false},"created_at":"2018-12-14T12:02:13Z","updated_at":"2018-12-14T12:02:13Z","author_association":"OWNER","body":"感谢提醒，你可以直接 Pull Request 过来，以后也可以一起来维护这个项目"}}
{"actor":{"display_login":"baishixian"}}