{"action":"created","comment":{"url":"https://api.github.com/repos/nextcloud/android/pulls/comments/212673635","pull_request_review_id":149359739,"id":212673635,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjY3MzYzNQ==","diff_hunk":"@@ -0,0 +1,214 @@\n+package com.nextcloud.android.sso;\n+\n+import android.accounts.Account;\n+import android.content.Context;\n+import android.content.SharedPreferences;\n+import android.os.Binder;\n+import android.os.ParcelFileDescriptor;\n+import android.util.Log;\n+\n+import com.nextcloud.android.sso.aidl.IInputStreamService;\n+import com.nextcloud.android.sso.aidl.NextcloudRequest;\n+import com.nextcloud.android.sso.aidl.ParcelFileDescriptorUtil;\n+import com.owncloud.android.authentication.AccountUtils;\n+import com.owncloud.android.db.PreferenceManager;\n+import com.owncloud.android.lib.common.OwnCloudAccount;\n+import com.owncloud.android.lib.common.OwnCloudClient;\n+import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;\n+\n+import org.apache.commons.httpclient.HttpMethodBase;\n+import org.apache.commons.httpclient.NameValuePair;\n+import org.apache.commons.httpclient.methods.DeleteMethod;\n+import org.apache.commons.httpclient.methods.GetMethod;\n+import org.apache.commons.httpclient.methods.PostMethod;\n+import org.apache.commons.httpclient.methods.PutMethod;\n+import org.apache.commons.httpclient.methods.StringRequestEntity;\n+\n+import java.io.ByteArrayInputStream;\n+import java.io.ByteArrayOutputStream;\n+import java.io.IOException;\n+import java.io.InputStream;\n+import java.io.ObjectInputStream;\n+import java.io.ObjectOutputStream;\n+import java.io.Serializable;\n+import java.util.ArrayList;\n+import java.util.Arrays;\n+import java.util.Map;\n+\n+/**\n+ *  Nextcloud SingleSignOn\n+ *\n+ *  @author David Luhmer\n+ *\n+ * This program is free software: you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation, either version 3 of the License, or\n+ * (at your option) any later version.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+ *\n+ *\n+ * More information here: https://github.com/abeluck/android-streams-ipc\n+ *\n+ */\n+\n+\n+public class InputStreamBinder extends IInputStreamService.Stub {\n+\n+    private final static String TAG = \"InputStreamBinder\";\n+    private Context context;\n+    private static final String CONTENT_TYPE_APPLICATION_JSON = \"application/json\";\n+    private static final String CHARSET_UTF8 = \"UTF-8\";\n+\n+    private ArrayList<String> validPackages = new ArrayList<>(Arrays.asList(","path":"src/main/java/com/nextcloud/android/sso/InputStreamBinder.java","position":69,"original_position":69,"commit_id":"cdf3ec2680f56257e29c60ed50314e9445c1b8c3","original_commit_id":"cdf3ec2680f56257e29c60ed50314e9445c1b8c3","user":{"login":"codacy-bot","id":19940114,"node_id":"MDQ6VXNlcjE5OTQwMTE0","avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://app.codacy.com/assets/images/favicon.png) Issue found: [Avoid using implementation types like 'ArrayList'; use the interface instead](https://app.codacy.com/app/Nextcloud/android/pullRequest?prid=729939)","created_at":"2018-08-24T15:51:34Z","updated_at":"2018-08-24T15:51:34Z","html_url":"https://github.com/nextcloud/android/pull/1116#discussion_r212673635","pull_request_url":"https://api.github.com/repos/nextcloud/android/pulls/1116","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/nextcloud/android/pulls/comments/212673635"},"html":{"href":"https://github.com/nextcloud/android/pull/1116#discussion_r212673635"},"pull_request":{"href":"https://api.github.com/repos/nextcloud/android/pulls/1116"}}},"pull_request":{"url":"https://api.github.com/repos/nextcloud/android/pulls/1116","id":127213005,"node_id":"MDExOlB1bGxSZXF1ZXN0MTI3MjEzMDA1","html_url":"https://github.com/nextcloud/android/pull/1116","diff_url":"https://github.com/nextcloud/android/pull/1116.diff","patch_url":"https://github.com/nextcloud/android/pull/1116.patch","issue_url":"https://api.github.com/repos/nextcloud/android/issues/1116","number":1116,"state":"open","locked":false,"title":"Proof of concept for Single Sign On","user":{"login":"tobiasKaminsky","id":5836855,"node_id":"MDQ6VXNlcjU4MzY4NTU=","avatar_url":"https://avatars3.githubusercontent.com/u/5836855?v=4","gravatar_id":"","url":"https://api.github.com/users/tobiasKaminsky","html_url":"https://github.com/tobiasKaminsky","followers_url":"https://api.github.com/users/tobiasKaminsky/followers","following_url":"https://api.github.com/users/tobiasKaminsky/following{/other_user}","gists_url":"https://api.github.com/users/tobiasKaminsky/gists{/gist_id}","starred_url":"https://api.github.com/users/tobiasKaminsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobiasKaminsky/subscriptions","organizations_url":"https://api.github.com/users/tobiasKaminsky/orgs","repos_url":"https://api.github.com/users/tobiasKaminsky/repos","events_url":"https://api.github.com/users/tobiasKaminsky/events{/privacy}","received_events_url":"https://api.github.com/users/tobiasKaminsky/received_events","type":"User","site_admin":false},"body":"by @David-Development \r\nRef: https://github.com/David-Development/ownCloud-Account-Importer/issues/3","created_at":"2017-06-23T13:57:32Z","updated_at":"2018-08-24T15:51:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"de6856113bf6341a83771e8b255e1c1a4713561a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":392413733,"node_id":"MDU6TGFiZWwzOTI0MTM3MzM=","url":"https://api.github.com/repos/nextcloud/android/labels/1.%20developing","name":"1. developing","color":"0052cc","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/nextcloud/android/pulls/1116/commits","review_comments_url":"https://api.github.com/repos/nextcloud/android/pulls/1116/comments","review_comment_url":"https://api.github.com/repos/nextcloud/android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nextcloud/android/issues/1116/comments","statuses_url":"https://api.github.com/repos/nextcloud/android/statuses/cdf3ec2680f56257e29c60ed50314e9445c1b8c3","head":{"label":"nextcloud:sso","ref":"sso","sha":"cdf3ec2680f56257e29c60ed50314e9445c1b8c3","user":{"login":"nextcloud","id":19211038,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MjExMDM4","avatar_url":"https://avatars1.githubusercontent.com/u/19211038?v=4","gravatar_id":"","url":"https://api.github.com/users/nextcloud","html_url":"https://github.com/nextcloud","followers_url":"https://api.github.com/users/nextcloud/followers","following_url":"https://api.github.com/users/nextcloud/following{/other_user}","gists_url":"https://api.github.com/users/nextcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/nextcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nextcloud/subscriptions","organizations_url":"https://api.github.com/users/nextcloud/orgs","repos_url":"https://api.github.com/users/nextcloud/repos","events_url":"https://api.github.com/users/nextcloud/events{/privacy}","received_events_url":"https://api.github.com/users/nextcloud/received_events","type":"Organization","site_admin":false},"repo":{"id":60561834,"node_id":"MDEwOlJlcG9zaXRvcnk2MDU2MTgzNA==","name":"android","full_name":"nextcloud/android","owner":{"login":"nextcloud","id":19211038,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MjExMDM4","avatar_url":"https://avatars1.githubusercontent.com/u/19211038?v=4","gravatar_id":"","url":"https://api.github.com/users/nextcloud","html_url":"https://github.com/nextcloud","followers_url":"https://api.github.com/users/nextcloud/followers","following_url":"https://api.github.com/users/nextcloud/following{/other_user}","gists_url":"https://api.github.com/users/nextcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/nextcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nextcloud/subscriptions","organizations_url":"https://api.github.com/users/nextcloud/orgs","repos_url":"https://api.github.com/users/nextcloud/repos","events_url":"https://api.github.com/users/nextcloud/events{/privacy}","received_events_url":"https://api.github.com/users/nextcloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nextcloud/android","description":"📱 Nextcloud Android app","fork":false,"url":"https://api.github.com/repos/nextcloud/android","forks_url":"https://api.github.com/repos/nextcloud/android/forks","keys_url":"https://api.github.com/repos/nextcloud/android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nextcloud/android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nextcloud/android/teams","hooks_url":"https://api.github.com/repos/nextcloud/android/hooks","issue_events_url":"https://api.github.com/repos/nextcloud/android/issues/events{/number}","events_url":"https://api.github.com/repos/nextcloud/android/events","assignees_url":"https://api.github.com/repos/nextcloud/android/assignees{/user}","branches_url":"https://api.github.com/repos/nextcloud/android/branches{/branch}","tags_url":"https://api.github.com/repos/nextcloud/android/tags","blobs_url":"https://api.github.com/repos/nextcloud/android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nextcloud/android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nextcloud/android/git/refs{/sha}","trees_url":"https://api.github.com/repos/nextcloud/android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nextcloud/android/statuses/{sha}","languages_url":"https://api.github.com/repos/nextcloud/android/languages","stargazers_url":"https://api.github.com/repos/nextcloud/android/stargazers","contributors_url":"https://api.github.com/repos/nextcloud/android/contributors","subscribers_url":"https://api.github.com/repos/nextcloud/android/subscribers","subscription_url":"https://api.github.com/repos/nextcloud/android/subscription","commits_url":"https://api.github.com/repos/nextcloud/android/commits{/sha}","git_commits_url":"https://api.github.com/repos/nextcloud/android/git/commits{/sha}","comments_url":"https://api.github.com/repos/nextcloud/android/comments{/number}","issue_comment_url":"https://api.github.com/repos/nextcloud/android/issues/comments{/number}","contents_url":"https://api.github.com/repos/nextcloud/android/contents/{+path}","compare_url":"https://api.github.com/repos/nextcloud/android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nextcloud/android/merges","archive_url":"https://api.github.com/repos/nextcloud/android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nextcloud/android/downloads","issues_url":"https://api.github.com/repos/nextcloud/android/issues{/number}","pulls_url":"https://api.github.com/repos/nextcloud/android/pulls{/number}","milestones_url":"https://api.github.com/repos/nextcloud/android/milestones{/number}","notifications_url":"https://api.github.com/repos/nextcloud/android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nextcloud/android/labels{/name}","releases_url":"https://api.github.com/repos/nextcloud/android/releases{/id}","deployments_url":"https://api.github.com/repos/nextcloud/android/deployments","created_at":"2016-06-06T21:23:36Z","updated_at":"2018-08-24T15:45:42Z","pushed_at":"2018-08-24T15:47:26Z","git_url":"git://github.com/nextcloud/android.git","ssh_url":"git@github.com:nextcloud/android.git","clone_url":"https://github.com/nextcloud/android.git","svn_url":"https://github.com/nextcloud/android","homepage":"https://play.google.com/store/apps/details?id=com.nextcloud.client","size":100396,"stargazers_count":839,"watchers_count":839,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":470,"mirror_url":null,"archived":false,"open_issues_count":654,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":470,"open_issues":654,"watchers":839,"default_branch":"master"}},"base":{"label":"nextcloud:master","ref":"master","sha":"75e0c21e76cba111d4661d7b66bd19d600037d07","user":{"login":"nextcloud","id":19211038,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MjExMDM4","avatar_url":"https://avatars1.githubusercontent.com/u/19211038?v=4","gravatar_id":"","url":"https://api.github.com/users/nextcloud","html_url":"https://github.com/nextcloud","followers_url":"https://api.github.com/users/nextcloud/followers","following_url":"https://api.github.com/users/nextcloud/following{/other_user}","gists_url":"https://api.github.com/users/nextcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/nextcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nextcloud/subscriptions","organizations_url":"https://api.github.com/users/nextcloud/orgs","repos_url":"https://api.github.com/users/nextcloud/repos","events_url":"https://api.github.com/users/nextcloud/events{/privacy}","received_events_url":"https://api.github.com/users/nextcloud/received_events","type":"Organization","site_admin":false},"repo":{"id":60561834,"node_id":"MDEwOlJlcG9zaXRvcnk2MDU2MTgzNA==","name":"android","full_name":"nextcloud/android","owner":{"login":"nextcloud","id":19211038,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MjExMDM4","avatar_url":"https://avatars1.githubusercontent.com/u/19211038?v=4","gravatar_id":"","url":"https://api.github.com/users/nextcloud","html_url":"https://github.com/nextcloud","followers_url":"https://api.github.com/users/nextcloud/followers","following_url":"https://api.github.com/users/nextcloud/following{/other_user}","gists_url":"https://api.github.com/users/nextcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/nextcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nextcloud/subscriptions","organizations_url":"https://api.github.com/users/nextcloud/orgs","repos_url":"https://api.github.com/users/nextcloud/repos","events_url":"https://api.github.com/users/nextcloud/events{/privacy}","received_events_url":"https://api.github.com/users/nextcloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nextcloud/android","description":"📱 Nextcloud Android app","fork":false,"url":"https://api.github.com/repos/nextcloud/android","forks_url":"https://api.github.com/repos/nextcloud/android/forks","keys_url":"https://api.github.com/repos/nextcloud/android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nextcloud/android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nextcloud/android/teams","hooks_url":"https://api.github.com/repos/nextcloud/android/hooks","issue_events_url":"https://api.github.com/repos/nextcloud/android/issues/events{/number}","events_url":"https://api.github.com/repos/nextcloud/android/events","assignees_url":"https://api.github.com/repos/nextcloud/android/assignees{/user}","branches_url":"https://api.github.com/repos/nextcloud/android/branches{/branch}","tags_url":"https://api.github.com/repos/nextcloud/android/tags","blobs_url":"https://api.github.com/repos/nextcloud/android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nextcloud/android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nextcloud/android/git/refs{/sha}","trees_url":"https://api.github.com/repos/nextcloud/android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nextcloud/android/statuses/{sha}","languages_url":"https://api.github.com/repos/nextcloud/android/languages","stargazers_url":"https://api.github.com/repos/nextcloud/android/stargazers","contributors_url":"https://api.github.com/repos/nextcloud/android/contributors","subscribers_url":"https://api.github.com/repos/nextcloud/android/subscribers","subscription_url":"https://api.github.com/repos/nextcloud/android/subscription","commits_url":"https://api.github.com/repos/nextcloud/android/commits{/sha}","git_commits_url":"https://api.github.com/repos/nextcloud/android/git/commits{/sha}","comments_url":"https://api.github.com/repos/nextcloud/android/comments{/number}","issue_comment_url":"https://api.github.com/repos/nextcloud/android/issues/comments{/number}","contents_url":"https://api.github.com/repos/nextcloud/android/contents/{+path}","compare_url":"https://api.github.com/repos/nextcloud/android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nextcloud/android/merges","archive_url":"https://api.github.com/repos/nextcloud/android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nextcloud/android/downloads","issues_url":"https://api.github.com/repos/nextcloud/android/issues{/number}","pulls_url":"https://api.github.com/repos/nextcloud/android/pulls{/number}","milestones_url":"https://api.github.com/repos/nextcloud/android/milestones{/number}","notifications_url":"https://api.github.com/repos/nextcloud/android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nextcloud/android/labels{/name}","releases_url":"https://api.github.com/repos/nextcloud/android/releases{/id}","deployments_url":"https://api.github.com/repos/nextcloud/android/deployments","created_at":"2016-06-06T21:23:36Z","updated_at":"2018-08-24T15:45:42Z","pushed_at":"2018-08-24T15:47:26Z","git_url":"git://github.com/nextcloud/android.git","ssh_url":"git@github.com:nextcloud/android.git","clone_url":"https://github.com/nextcloud/android.git","svn_url":"https://github.com/nextcloud/android","homepage":"https://play.google.com/store/apps/details?id=com.nextcloud.client","size":100396,"stargazers_count":839,"watchers_count":839,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":470,"mirror_url":null,"archived":false,"open_issues_count":654,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":470,"open_issues":654,"watchers":839,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nextcloud/android/pulls/1116"},"html":{"href":"https://github.com/nextcloud/android/pull/1116"},"issue":{"href":"https://api.github.com/repos/nextcloud/android/issues/1116"},"comments":{"href":"https://api.github.com/repos/nextcloud/android/issues/1116/comments"},"review_comments":{"href":"https://api.github.com/repos/nextcloud/android/pulls/1116/comments"},"review_comment":{"href":"https://api.github.com/repos/nextcloud/android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nextcloud/android/pulls/1116/commits"},"statuses":{"href":"https://api.github.com/repos/nextcloud/android/statuses/cdf3ec2680f56257e29c60ed50314e9445c1b8c3"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"codacy-bot"}}