{"action":"created","comment":{"url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/pulls/comments/38013637","id":38013637,"diff_hunk":"@@ -281,15 +286,20 @@ public void setBatteryLevel(short batteryLevel) {\n         }\n     }\n \n-    /**\n-     * Returns a string representation of the battery state.\n-     */\n-    public String getBatteryState() {\n-        return mBatteryState != null ? mBatteryState : GBApplication.getContext().getString(R.string._unknown_);\n+    public BatteryState getBatteryState() {\n+        return mBatteryState;\n+    }\n+\n+    public void setBatteryState(BatteryState mBatteryState) {\n+        this.mBatteryState = mBatteryState;\n+    }\n+\n+    public short getBatteryThresholdPercent() {\n+        return mBatteryThresholdPercent;\n     }\n \n-    public void setBatteryState(String batteryState) {\n-        mBatteryState = batteryState;\n+    public void setBatteryThresholdPercent(short batteryThresholdPercent) {","path":"app/src/main/java/nodomain/freeyourgadget/gadgetbridge/impl/GBDevice.java","position":78,"original_position":78,"commit_id":"3356a4b066b51867a49ba61ead0df177bbc31b9b","original_commit_id":"3356a4b066b51867a49ba61ead0df177bbc31b9b","user":{"login":"cpfeiffer","id":1457896,"avatar_url":"https://avatars.githubusercontent.com/u/1457896?v=3","gravatar_id":"","url":"https://api.github.com/users/cpfeiffer","html_url":"https://github.com/cpfeiffer","followers_url":"https://api.github.com/users/cpfeiffer/followers","following_url":"https://api.github.com/users/cpfeiffer/following{/other_user}","gists_url":"https://api.github.com/users/cpfeiffer/gists{/gist_id}","starred_url":"https://api.github.com/users/cpfeiffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpfeiffer/subscriptions","organizations_url":"https://api.github.com/users/cpfeiffer/orgs","repos_url":"https://api.github.com/users/cpfeiffer/repos","events_url":"https://api.github.com/users/cpfeiffer/events{/privacy}","received_events_url":"https://api.github.com/users/cpfeiffer/received_events","type":"User","site_admin":false},"body":"This doesn't really belong here (device specific configuration), but I don't know a better place ATM either. DeviceCoordinator would be a logical choice, but that's not available in the service. Let's keep it here for simplicitly, for now.","created_at":"2015-08-26T18:00:20Z","updated_at":"2015-08-26T18:00:20Z","html_url":"https://github.com/Freeyourgadget/Gadgetbridge/pull/101#discussion_r38013637","pull_request_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/pulls/101","_links":{"self":{"href":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/pulls/comments/38013637"},"html":{"href":"https://github.com/Freeyourgadget/Gadgetbridge/pull/101#discussion_r38013637"},"pull_request":{"href":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/pulls/101"}}},"pull_request":{"url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/pulls/101","id":43417194,"html_url":"https://github.com/Freeyourgadget/Gadgetbridge/pull/101","diff_url":"https://github.com/Freeyourgadget/Gadgetbridge/pull/101.diff","patch_url":"https://github.com/Freeyourgadget/Gadgetbridge/pull/101.patch","issue_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/issues/101","number":101,"state":"open","locked":false,"title":"Low battery notification","user":{"login":"danielegobbetti","id":352756,"avatar_url":"https://avatars.githubusercontent.com/u/352756?v=3","gravatar_id":"","url":"https://api.github.com/users/danielegobbetti","html_url":"https://github.com/danielegobbetti","followers_url":"https://api.github.com/users/danielegobbetti/followers","following_url":"https://api.github.com/users/danielegobbetti/following{/other_user}","gists_url":"https://api.github.com/users/danielegobbetti/gists{/gist_id}","starred_url":"https://api.github.com/users/danielegobbetti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielegobbetti/subscriptions","organizations_url":"https://api.github.com/users/danielegobbetti/orgs","repos_url":"https://api.github.com/users/danielegobbetti/repos","events_url":"https://api.github.com/users/danielegobbetti/events{/privacy}","received_events_url":"https://api.github.com/users/danielegobbetti/received_events","type":"User","site_admin":false},"body":"Implements notification to the user when the device battery reaches a defined threshold.\r\nCloses #71","created_at":"2015-08-26T15:40:02Z","updated_at":"2015-08-26T18:00:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9e48fea3c21b342f056385f6f9e27065185da8dc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/pulls/101/commits","review_comments_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/pulls/101/comments","review_comment_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/issues/101/comments","statuses_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/statuses/3356a4b066b51867a49ba61ead0df177bbc31b9b","head":{"label":"Freeyourgadget:low_battery_notification","ref":"low_battery_notification","sha":"3356a4b066b51867a49ba61ead0df177bbc31b9b","user":{"login":"Freeyourgadget","id":10392806,"avatar_url":"https://avatars.githubusercontent.com/u/10392806?v=3","gravatar_id":"","url":"https://api.github.com/users/Freeyourgadget","html_url":"https://github.com/Freeyourgadget","followers_url":"https://api.github.com/users/Freeyourgadget/followers","following_url":"https://api.github.com/users/Freeyourgadget/following{/other_user}","gists_url":"https://api.github.com/users/Freeyourgadget/gists{/gist_id}","starred_url":"https://api.github.com/users/Freeyourgadget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Freeyourgadget/subscriptions","organizations_url":"https://api.github.com/users/Freeyourgadget/orgs","repos_url":"https://api.github.com/users/Freeyourgadget/repos","events_url":"https://api.github.com/users/Freeyourgadget/events{/privacy}","received_events_url":"https://api.github.com/users/Freeyourgadget/received_events","type":"Organization","site_admin":false},"repo":{"id":28836678,"name":"Gadgetbridge","full_name":"Freeyourgadget/Gadgetbridge","owner":{"login":"Freeyourgadget","id":10392806,"avatar_url":"https://avatars.githubusercontent.com/u/10392806?v=3","gravatar_id":"","url":"https://api.github.com/users/Freeyourgadget","html_url":"https://github.com/Freeyourgadget","followers_url":"https://api.github.com/users/Freeyourgadget/followers","following_url":"https://api.github.com/users/Freeyourgadget/following{/other_user}","gists_url":"https://api.github.com/users/Freeyourgadget/gists{/gist_id}","starred_url":"https://api.github.com/users/Freeyourgadget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Freeyourgadget/subscriptions","organizations_url":"https://api.github.com/users/Freeyourgadget/orgs","repos_url":"https://api.github.com/users/Freeyourgadget/repos","events_url":"https://api.github.com/users/Freeyourgadget/events{/privacy}","received_events_url":"https://api.github.com/users/Freeyourgadget/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Freeyourgadget/Gadgetbridge","description":"","fork":false,"url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge","forks_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/forks","keys_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/teams","hooks_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/hooks","issue_events_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/issues/events{/number}","events_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/events","assignees_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/assignees{/user}","branches_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/branches{/branch}","tags_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/tags","blobs_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/git/refs{/sha}","trees_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/statuses/{sha}","languages_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/languages","stargazers_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/stargazers","contributors_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/contributors","subscribers_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/subscribers","subscription_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/subscription","commits_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/commits{/sha}","git_commits_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/git/commits{/sha}","comments_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/comments{/number}","issue_comment_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/issues/comments{/number}","contents_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/contents/{+path}","compare_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/merges","archive_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/downloads","issues_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/issues{/number}","pulls_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/pulls{/number}","milestones_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/milestones{/number}","notifications_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/labels{/name}","releases_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/releases{/id}","created_at":"2015-01-05T23:19:03Z","updated_at":"2015-08-24T13:54:17Z","pushed_at":"2015-08-26T15:40:02Z","git_url":"git://github.com/Freeyourgadget/Gadgetbridge.git","ssh_url":"git@github.com:Freeyourgadget/Gadgetbridge.git","clone_url":"https://github.com/Freeyourgadget/Gadgetbridge.git","svn_url":"https://github.com/Freeyourgadget/Gadgetbridge","homepage":null,"size":2964,"stargazers_count":78,"watchers_count":78,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":31,"forks":9,"open_issues":31,"watchers":78,"default_branch":"master"}},"base":{"label":"Freeyourgadget:master","ref":"master","sha":"d0fbc57cf12b095c304ea2e99d29d72c45034730","user":{"login":"Freeyourgadget","id":10392806,"avatar_url":"https://avatars.githubusercontent.com/u/10392806?v=3","gravatar_id":"","url":"https://api.github.com/users/Freeyourgadget","html_url":"https://github.com/Freeyourgadget","followers_url":"https://api.github.com/users/Freeyourgadget/followers","following_url":"https://api.github.com/users/Freeyourgadget/following{/other_user}","gists_url":"https://api.github.com/users/Freeyourgadget/gists{/gist_id}","starred_url":"https://api.github.com/users/Freeyourgadget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Freeyourgadget/subscriptions","organizations_url":"https://api.github.com/users/Freeyourgadget/orgs","repos_url":"https://api.github.com/users/Freeyourgadget/repos","events_url":"https://api.github.com/users/Freeyourgadget/events{/privacy}","received_events_url":"https://api.github.com/users/Freeyourgadget/received_events","type":"Organization","site_admin":false},"repo":{"id":28836678,"name":"Gadgetbridge","full_name":"Freeyourgadget/Gadgetbridge","owner":{"login":"Freeyourgadget","id":10392806,"avatar_url":"https://avatars.githubusercontent.com/u/10392806?v=3","gravatar_id":"","url":"https://api.github.com/users/Freeyourgadget","html_url":"https://github.com/Freeyourgadget","followers_url":"https://api.github.com/users/Freeyourgadget/followers","following_url":"https://api.github.com/users/Freeyourgadget/following{/other_user}","gists_url":"https://api.github.com/users/Freeyourgadget/gists{/gist_id}","starred_url":"https://api.github.com/users/Freeyourgadget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Freeyourgadget/subscriptions","organizations_url":"https://api.github.com/users/Freeyourgadget/orgs","repos_url":"https://api.github.com/users/Freeyourgadget/repos","events_url":"https://api.github.com/users/Freeyourgadget/events{/privacy}","received_events_url":"https://api.github.com/users/Freeyourgadget/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Freeyourgadget/Gadgetbridge","description":"","fork":false,"url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge","forks_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/forks","keys_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/teams","hooks_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/hooks","issue_events_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/issues/events{/number}","events_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/events","assignees_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/assignees{/user}","branches_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/branches{/branch}","tags_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/tags","blobs_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/git/refs{/sha}","trees_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/statuses/{sha}","languages_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/languages","stargazers_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/stargazers","contributors_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/contributors","subscribers_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/subscribers","subscription_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/subscription","commits_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/commits{/sha}","git_commits_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/git/commits{/sha}","comments_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/comments{/number}","issue_comment_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/issues/comments{/number}","contents_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/contents/{+path}","compare_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/merges","archive_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/downloads","issues_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/issues{/number}","pulls_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/pulls{/number}","milestones_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/milestones{/number}","notifications_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/labels{/name}","releases_url":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/releases{/id}","created_at":"2015-01-05T23:19:03Z","updated_at":"2015-08-24T13:54:17Z","pushed_at":"2015-08-26T15:40:02Z","git_url":"git://github.com/Freeyourgadget/Gadgetbridge.git","ssh_url":"git@github.com:Freeyourgadget/Gadgetbridge.git","clone_url":"https://github.com/Freeyourgadget/Gadgetbridge.git","svn_url":"https://github.com/Freeyourgadget/Gadgetbridge","homepage":null,"size":2964,"stargazers_count":78,"watchers_count":78,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":31,"forks":9,"open_issues":31,"watchers":78,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/pulls/101"},"html":{"href":"https://github.com/Freeyourgadget/Gadgetbridge/pull/101"},"issue":{"href":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/issues/101"},"comments":{"href":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/issues/101/comments"},"review_comments":{"href":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/pulls/101/comments"},"review_comment":{"href":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/pulls/101/commits"},"statuses":{"href":"https://api.github.com/repos/Freeyourgadget/Gadgetbridge/statuses/3356a4b066b51867a49ba61ead0df177bbc31b9b"}}}}