{"action":"created","comment":{"url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/pulls/comments/33077111","id":33077111,"diff_hunk":"@@ -324,22 +346,68 @@ public static void deleteStackTraces(WeakReference<Context> weakContext) {\n           if (weakContext != null) {\n             Log.d(Constants.TAG, \"Delete stacktrace \" + list[index] + \".\");\n             deleteStackTrace(weakContext, list[index]);\n-            \n+\n             context = weakContext.get();\n             if (context != null) {\n-              context.deleteFile(list[index]);              \n+              context.deleteFile(list[index]);\n             }\n           }\n-        } \n+        }\n         catch (Exception e) {\n           e.printStackTrace();\n         }\n       }\n     }\n   }\n-  \n+\n+  /**\n+   Provides an interface to pass user input from a custom alert to a crash report\n+\n+   @param userInput Defines the users action wether to send, always send, or not to send the crash report.\n+   @param userProvidedMetaData The content of this optional BITCrashMetaData instance will be attached to the crash report and allows to ask the user for e.g. additional comments or info.\n+\n+   @return Returns YES if the input is a valid option and successfully triggered further processing of the crash report\n+\n+   @see CrashManagerUserInput\n+   @see CrashMetaData\n+   */\n+  public static boolean handleUserInput(final CrashManagerUserInput userInput,\n+      final CrashMetaData userProvidedMetaData, final CrashManagerListener listener,\n+      final WeakReference<Context> weakContext, final boolean ignoreDefaultHandler) {\n+    switch (userInput) {\n+      case CrashManagerUserInputDontSend:\n+        if (listener != null) {\n+          listener.onUserDeniedCrashes();\n+        }\n+\n+        deleteStackTraces(weakContext);\n+        registerHandler(weakContext, listener, ignoreDefaultHandler);\n+        return true;\n+      case CrashManagerUserInputSend:\n+        Context context = null;\n+        if (weakContext != null) {\n+          context = weakContext.get();\n+        }\n+\n+        if (context == null) {\n+          return false;\n+        }\n+\n+        final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);","path":"src/main/java/net/hockeyapp/android/CrashManager.java","position":129,"original_position":129,"commit_id":"f43e89199df115d557fab70e88230d8c39a0b4b9","original_commit_id":"f43e89199df115d557fab70e88230d8c39a0b4b9","user":{"login":"awBSH","id":10061747,"avatar_url":"https://avatars.githubusercontent.com/u/10061747?v=3","gravatar_id":"","url":"https://api.github.com/users/awBSH","html_url":"https://github.com/awBSH","followers_url":"https://api.github.com/users/awBSH/followers","following_url":"https://api.github.com/users/awBSH/following{/other_user}","gists_url":"https://api.github.com/users/awBSH/gists{/gist_id}","starred_url":"https://api.github.com/users/awBSH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awBSH/subscriptions","organizations_url":"https://api.github.com/users/awBSH/orgs","repos_url":"https://api.github.com/users/awBSH/repos","events_url":"https://api.github.com/users/awBSH/events{/privacy}","received_events_url":"https://api.github.com/users/awBSH/received_events","type":"User","site_admin":false},"body":"You are right.","created_at":"2015-06-23T18:48:50Z","updated_at":"2015-06-23T18:48:50Z","html_url":"https://github.com/bitstadium/HockeySDK-Android/pull/73#discussion_r33077111","pull_request_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/pulls/73","_links":{"self":{"href":"https://api.github.com/repos/bitstadium/HockeySDK-Android/pulls/comments/33077111"},"html":{"href":"https://github.com/bitstadium/HockeySDK-Android/pull/73#discussion_r33077111"},"pull_request":{"href":"https://api.github.com/repos/bitstadium/HockeySDK-Android/pulls/73"}}},"pull_request":{"url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/pulls/73","id":38175993,"html_url":"https://github.com/bitstadium/HockeySDK-Android/pull/73","diff_url":"https://github.com/bitstadium/HockeySDK-Android/pull/73.diff","patch_url":"https://github.com/bitstadium/HockeySDK-Android/pull/73.patch","issue_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/issues/73","number":73,"state":"open","locked":false,"title":"Introduce CrashManagerStatus, CrashManagerUserInput and CrashMetaData…","user":{"login":"awBSH","id":10061747,"avatar_url":"https://avatars.githubusercontent.com/u/10061747?v=3","gravatar_id":"","url":"https://api.github.com/users/awBSH","html_url":"https://github.com/awBSH","followers_url":"https://api.github.com/users/awBSH/followers","following_url":"https://api.github.com/users/awBSH/following{/other_user}","gists_url":"https://api.github.com/users/awBSH/gists{/gist_id}","starred_url":"https://api.github.com/users/awBSH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awBSH/subscriptions","organizations_url":"https://api.github.com/users/awBSH/orgs","repos_url":"https://api.github.com/users/awBSH/repos","events_url":"https://api.github.com/users/awBSH/events{/privacy}","received_events_url":"https://api.github.com/users/awBSH/received_events","type":"User","site_admin":false},"body":"…. Add possibility to implement custom-alert view to add user-info to crash-report.","created_at":"2015-06-20T23:05:12Z","updated_at":"2015-06-23T18:48:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ae4f9d015b39eee9f88719e521fb525dcedc7f2f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/pulls/73/commits","review_comments_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/pulls/73/comments","review_comment_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/issues/73/comments","statuses_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/statuses/f43e89199df115d557fab70e88230d8c39a0b4b9","head":{"label":"awBSH:feature/custom-alert-view","ref":"feature/custom-alert-view","sha":"f43e89199df115d557fab70e88230d8c39a0b4b9","user":{"login":"awBSH","id":10061747,"avatar_url":"https://avatars.githubusercontent.com/u/10061747?v=3","gravatar_id":"","url":"https://api.github.com/users/awBSH","html_url":"https://github.com/awBSH","followers_url":"https://api.github.com/users/awBSH/followers","following_url":"https://api.github.com/users/awBSH/following{/other_user}","gists_url":"https://api.github.com/users/awBSH/gists{/gist_id}","starred_url":"https://api.github.com/users/awBSH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awBSH/subscriptions","organizations_url":"https://api.github.com/users/awBSH/orgs","repos_url":"https://api.github.com/users/awBSH/repos","events_url":"https://api.github.com/users/awBSH/events{/privacy}","received_events_url":"https://api.github.com/users/awBSH/received_events","type":"User","site_admin":false},"repo":{"id":37788033,"name":"HockeySDK-Android","full_name":"awBSH/HockeySDK-Android","owner":{"login":"awBSH","id":10061747,"avatar_url":"https://avatars.githubusercontent.com/u/10061747?v=3","gravatar_id":"","url":"https://api.github.com/users/awBSH","html_url":"https://github.com/awBSH","followers_url":"https://api.github.com/users/awBSH/followers","following_url":"https://api.github.com/users/awBSH/following{/other_user}","gists_url":"https://api.github.com/users/awBSH/gists{/gist_id}","starred_url":"https://api.github.com/users/awBSH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awBSH/subscriptions","organizations_url":"https://api.github.com/users/awBSH/orgs","repos_url":"https://api.github.com/users/awBSH/repos","events_url":"https://api.github.com/users/awBSH/events{/privacy}","received_events_url":"https://api.github.com/users/awBSH/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/awBSH/HockeySDK-Android","description":"The official Android SDK for the HockeyApp service","fork":true,"url":"https://api.github.com/repos/awBSH/HockeySDK-Android","forks_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/forks","keys_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/teams","hooks_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/hooks","issue_events_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/issues/events{/number}","events_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/events","assignees_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/assignees{/user}","branches_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/branches{/branch}","tags_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/tags","blobs_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/git/refs{/sha}","trees_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/statuses/{sha}","languages_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/languages","stargazers_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/stargazers","contributors_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/contributors","subscribers_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/subscribers","subscription_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/subscription","commits_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/commits{/sha}","git_commits_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/git/commits{/sha}","comments_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/comments{/number}","issue_comment_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/issues/comments{/number}","contents_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/contents/{+path}","compare_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/merges","archive_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/downloads","issues_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/issues{/number}","pulls_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/pulls{/number}","milestones_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/milestones{/number}","notifications_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/labels{/name}","releases_url":"https://api.github.com/repos/awBSH/HockeySDK-Android/releases{/id}","created_at":"2015-06-20T22:18:17Z","updated_at":"2015-06-20T22:18:17Z","pushed_at":"2015-06-20T23:03:50Z","git_url":"git://github.com/awBSH/HockeySDK-Android.git","ssh_url":"git@github.com:awBSH/HockeySDK-Android.git","clone_url":"https://github.com/awBSH/HockeySDK-Android.git","svn_url":"https://github.com/awBSH/HockeySDK-Android","homepage":null,"size":2944,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"bitstadium:develop","ref":"develop","sha":"34ea31b60ce9e96b29fa0147090fe73f715e753c","user":{"login":"bitstadium","id":1928136,"avatar_url":"https://avatars.githubusercontent.com/u/1928136?v=3","gravatar_id":"","url":"https://api.github.com/users/bitstadium","html_url":"https://github.com/bitstadium","followers_url":"https://api.github.com/users/bitstadium/followers","following_url":"https://api.github.com/users/bitstadium/following{/other_user}","gists_url":"https://api.github.com/users/bitstadium/gists{/gist_id}","starred_url":"https://api.github.com/users/bitstadium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitstadium/subscriptions","organizations_url":"https://api.github.com/users/bitstadium/orgs","repos_url":"https://api.github.com/users/bitstadium/repos","events_url":"https://api.github.com/users/bitstadium/events{/privacy}","received_events_url":"https://api.github.com/users/bitstadium/received_events","type":"Organization","site_admin":false},"repo":{"id":5495870,"name":"HockeySDK-Android","full_name":"bitstadium/HockeySDK-Android","owner":{"login":"bitstadium","id":1928136,"avatar_url":"https://avatars.githubusercontent.com/u/1928136?v=3","gravatar_id":"","url":"https://api.github.com/users/bitstadium","html_url":"https://github.com/bitstadium","followers_url":"https://api.github.com/users/bitstadium/followers","following_url":"https://api.github.com/users/bitstadium/following{/other_user}","gists_url":"https://api.github.com/users/bitstadium/gists{/gist_id}","starred_url":"https://api.github.com/users/bitstadium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitstadium/subscriptions","organizations_url":"https://api.github.com/users/bitstadium/orgs","repos_url":"https://api.github.com/users/bitstadium/repos","events_url":"https://api.github.com/users/bitstadium/events{/privacy}","received_events_url":"https://api.github.com/users/bitstadium/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bitstadium/HockeySDK-Android","description":"The official Android SDK for the HockeyApp service","fork":false,"url":"https://api.github.com/repos/bitstadium/HockeySDK-Android","forks_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/forks","keys_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/teams","hooks_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/hooks","issue_events_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/issues/events{/number}","events_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/events","assignees_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/assignees{/user}","branches_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/branches{/branch}","tags_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/tags","blobs_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/statuses/{sha}","languages_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/languages","stargazers_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/stargazers","contributors_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/contributors","subscribers_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/subscribers","subscription_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/subscription","commits_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/issues/comments{/number}","contents_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/contents/{+path}","compare_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/merges","archive_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/downloads","issues_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/issues{/number}","pulls_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/pulls{/number}","milestones_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/milestones{/number}","notifications_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/labels{/name}","releases_url":"https://api.github.com/repos/bitstadium/HockeySDK-Android/releases{/id}","created_at":"2012-08-21T14:05:08Z","updated_at":"2015-06-17T09:06:15Z","pushed_at":"2015-06-23T18:24:09Z","git_url":"git://github.com/bitstadium/HockeySDK-Android.git","ssh_url":"git@github.com:bitstadium/HockeySDK-Android.git","clone_url":"https://github.com/bitstadium/HockeySDK-Android.git","svn_url":"https://github.com/bitstadium/HockeySDK-Android","homepage":null,"size":2944,"stargazers_count":84,"watchers_count":84,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":52,"mirror_url":null,"open_issues_count":10,"forks":52,"open_issues":10,"watchers":84,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/bitstadium/HockeySDK-Android/pulls/73"},"html":{"href":"https://github.com/bitstadium/HockeySDK-Android/pull/73"},"issue":{"href":"https://api.github.com/repos/bitstadium/HockeySDK-Android/issues/73"},"comments":{"href":"https://api.github.com/repos/bitstadium/HockeySDK-Android/issues/73/comments"},"review_comments":{"href":"https://api.github.com/repos/bitstadium/HockeySDK-Android/pulls/73/comments"},"review_comment":{"href":"https://api.github.com/repos/bitstadium/HockeySDK-Android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitstadium/HockeySDK-Android/pulls/73/commits"},"statuses":{"href":"https://api.github.com/repos/bitstadium/HockeySDK-Android/statuses/f43e89199df115d557fab70e88230d8c39a0b4b9"}}}}