{"action":"created","comment":{"url":"https://api.github.com/repos/DoanVanToan/fdms.android/pulls/comments/138288307","pull_request_review_id":62061306,"id":138288307,"diff_hunk":"@@ -0,0 +1,95 @@\n+package com.framgia.fdms.screen.deviceselection;\n+\n+import android.app.SearchManager;\n+import android.content.Context;\n+import android.content.Intent;\n+import android.databinding.DataBindingUtil;\n+import android.os.Bundle;\n+import android.support.v7.app.AppCompatActivity;\n+import android.support.v7.widget.SearchView;\n+import android.view.Menu;\n+import android.view.MenuInflater;\n+import android.view.MenuItem;\n+import com.framgia.fdms.R;\n+import com.framgia.fdms.data.model.Device;\n+import com.framgia.fdms.databinding.ActivityDeviceSelectionBinding;\n+import java.util.ArrayList;\n+import java.util.List;\n+\n+import static com.framgia.fdms.utils.Constant.BundleConstant.BUNDLE_DEVICES;\n+\n+/**\n+ * DeviceSelection Screen.\n+ */\n+public class DeviceSelectionActivity extends AppCompatActivity\n+    implements SearchView.OnQueryTextListener {\n+    private DeviceSelectionContract.ViewModel mViewModel;\n+    private List<Device> mDevices;\n+\n+    public static Intent getInstance(Context context, List<Device> devices) {\n+        Intent intent = new Intent(context, DeviceSelectionActivity.class);\n+        Bundle bundle = new Bundle();\n+        bundle.putParcelableArrayList(BUNDLE_DEVICES, (ArrayList<Device>) devices);\n+        intent.putExtras(bundle);\n+        return intent;\n+    }\n+\n+    @Override\n+    protected void onCreate(Bundle savedInstanceState) {\n+        super.onCreate(savedInstanceState);\n+        getDataFromIntent();\n+        mViewModel = new DeviceSelectionViewModel(this, mDevices);\n+        DeviceSelectionContract.Presenter presenter = new DeviceSelectionPresenter(mViewModel);\n+        mViewModel.setPresenter(presenter);\n+        ActivityDeviceSelectionBinding binding =\n+            DataBindingUtil.setContentView(this, R.layout.activity_device_selection);\n+        binding.setViewModel((DeviceSelectionViewModel) mViewModel);\n+    }\n+\n+    private void getDataFromIntent() {\n+        Bundle bundle = getIntent().getExtras();\n+        if (bundle == null) return;\n+        mDevices = bundle.getParcelableArrayList(BUNDLE_DEVICES);","path":"app/src/main/java/com/framgia/fdms/screen/deviceselection/DeviceSelectionActivity.java","position":52,"original_position":52,"commit_id":"2b6777489e3d739c908a822d9d6f52614226f862","original_commit_id":"2b6777489e3d739c908a822d9d6f52614226f862","user":{"login":"DoanVanToan","id":21195010,"avatar_url":"https://avatars3.githubusercontent.com/u/21195010?v=4","gravatar_id":"","url":"https://api.github.com/users/DoanVanToan","html_url":"https://github.com/DoanVanToan","followers_url":"https://api.github.com/users/DoanVanToan/followers","following_url":"https://api.github.com/users/DoanVanToan/following{/other_user}","gists_url":"https://api.github.com/users/DoanVanToan/gists{/gist_id}","starred_url":"https://api.github.com/users/DoanVanToan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoanVanToan/subscriptions","organizations_url":"https://api.github.com/users/DoanVanToan/orgs","repos_url":"https://api.github.com/users/DoanVanToan/repos","events_url":"https://api.github.com/users/DoanVanToan/events{/privacy}","received_events_url":"https://api.github.com/users/DoanVanToan/received_events","type":"User","site_admin":false},"body":"ERROR: [PMD-CPD] 44 lines duplicated.\napp/src/main/java/com/framgia/fdms/screen/selection/StatusSelectionActivity.java","created_at":"2017-09-12T08:53:54Z","updated_at":"2017-09-12T08:53:55Z","html_url":"https://github.com/DoanVanToan/fdms.android/pull/18#discussion_r138288307","pull_request_url":"https://api.github.com/repos/DoanVanToan/fdms.android/pulls/18","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/DoanVanToan/fdms.android/pulls/comments/138288307"},"html":{"href":"https://github.com/DoanVanToan/fdms.android/pull/18#discussion_r138288307"},"pull_request":{"href":"https://api.github.com/repos/DoanVanToan/fdms.android/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/DoanVanToan/fdms.android/pulls/18","id":140520194,"html_url":"https://github.com/DoanVanToan/fdms.android/pull/18","diff_url":"https://github.com/DoanVanToan/fdms.android/pull/18.diff","patch_url":"https://github.com/DoanVanToan/fdms.android/pull/18.patch","issue_url":"https://api.github.com/repos/DoanVanToan/fdms.android/issues/18","number":18,"state":"open","locked":false,"title":"[Task #135588][Sprint 12] Assignment screen - Custom UI again(focus add new device)","user":{"login":"datchiz","id":22463758,"avatar_url":"https://avatars1.githubusercontent.com/u/22463758?v=4","gravatar_id":"","url":"https://api.github.com/users/datchiz","html_url":"https://github.com/datchiz","followers_url":"https://api.github.com/users/datchiz/followers","following_url":"https://api.github.com/users/datchiz/following{/other_user}","gists_url":"https://api.github.com/users/datchiz/gists{/gist_id}","starred_url":"https://api.github.com/users/datchiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datchiz/subscriptions","organizations_url":"https://api.github.com/users/datchiz/orgs","repos_url":"https://api.github.com/users/datchiz/repos","events_url":"https://api.github.com/users/datchiz/events{/privacy}","received_events_url":"https://api.github.com/users/datchiz/received_events","type":"User","site_admin":false},"body":"Link Redmine: https://dev.framgia.com/redmine/issues/135588","created_at":"2017-09-12T08:44:08Z","updated_at":"2017-09-12T08:53:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"60ef33c150746bb30be5364aaa80767227986054","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/DoanVanToan/fdms.android/pulls/18/commits","review_comments_url":"https://api.github.com/repos/DoanVanToan/fdms.android/pulls/18/comments","review_comment_url":"https://api.github.com/repos/DoanVanToan/fdms.android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DoanVanToan/fdms.android/issues/18/comments","statuses_url":"https://api.github.com/repos/DoanVanToan/fdms.android/statuses/2b6777489e3d739c908a822d9d6f52614226f862","head":{"label":"datchiz:assignment_custom_ui","ref":"assignment_custom_ui","sha":"2b6777489e3d739c908a822d9d6f52614226f862","user":{"login":"datchiz","id":22463758,"avatar_url":"https://avatars1.githubusercontent.com/u/22463758?v=4","gravatar_id":"","url":"https://api.github.com/users/datchiz","html_url":"https://github.com/datchiz","followers_url":"https://api.github.com/users/datchiz/followers","following_url":"https://api.github.com/users/datchiz/following{/other_user}","gists_url":"https://api.github.com/users/datchiz/gists{/gist_id}","starred_url":"https://api.github.com/users/datchiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datchiz/subscriptions","organizations_url":"https://api.github.com/users/datchiz/orgs","repos_url":"https://api.github.com/users/datchiz/repos","events_url":"https://api.github.com/users/datchiz/events{/privacy}","received_events_url":"https://api.github.com/users/datchiz/received_events","type":"User","site_admin":false},"repo":{"id":102713176,"name":"fdms.android","full_name":"datchiz/fdms.android","owner":{"login":"datchiz","id":22463758,"avatar_url":"https://avatars1.githubusercontent.com/u/22463758?v=4","gravatar_id":"","url":"https://api.github.com/users/datchiz","html_url":"https://github.com/datchiz","followers_url":"https://api.github.com/users/datchiz/followers","following_url":"https://api.github.com/users/datchiz/following{/other_user}","gists_url":"https://api.github.com/users/datchiz/gists{/gist_id}","starred_url":"https://api.github.com/users/datchiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datchiz/subscriptions","organizations_url":"https://api.github.com/users/datchiz/orgs","repos_url":"https://api.github.com/users/datchiz/repos","events_url":"https://api.github.com/users/datchiz/events{/privacy}","received_events_url":"https://api.github.com/users/datchiz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/datchiz/fdms.android","description":null,"fork":true,"url":"https://api.github.com/repos/datchiz/fdms.android","forks_url":"https://api.github.com/repos/datchiz/fdms.android/forks","keys_url":"https://api.github.com/repos/datchiz/fdms.android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/datchiz/fdms.android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/datchiz/fdms.android/teams","hooks_url":"https://api.github.com/repos/datchiz/fdms.android/hooks","issue_events_url":"https://api.github.com/repos/datchiz/fdms.android/issues/events{/number}","events_url":"https://api.github.com/repos/datchiz/fdms.android/events","assignees_url":"https://api.github.com/repos/datchiz/fdms.android/assignees{/user}","branches_url":"https://api.github.com/repos/datchiz/fdms.android/branches{/branch}","tags_url":"https://api.github.com/repos/datchiz/fdms.android/tags","blobs_url":"https://api.github.com/repos/datchiz/fdms.android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/datchiz/fdms.android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/datchiz/fdms.android/git/refs{/sha}","trees_url":"https://api.github.com/repos/datchiz/fdms.android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/datchiz/fdms.android/statuses/{sha}","languages_url":"https://api.github.com/repos/datchiz/fdms.android/languages","stargazers_url":"https://api.github.com/repos/datchiz/fdms.android/stargazers","contributors_url":"https://api.github.com/repos/datchiz/fdms.android/contributors","subscribers_url":"https://api.github.com/repos/datchiz/fdms.android/subscribers","subscription_url":"https://api.github.com/repos/datchiz/fdms.android/subscription","commits_url":"https://api.github.com/repos/datchiz/fdms.android/commits{/sha}","git_commits_url":"https://api.github.com/repos/datchiz/fdms.android/git/commits{/sha}","comments_url":"https://api.github.com/repos/datchiz/fdms.android/comments{/number}","issue_comment_url":"https://api.github.com/repos/datchiz/fdms.android/issues/comments{/number}","contents_url":"https://api.github.com/repos/datchiz/fdms.android/contents/{+path}","compare_url":"https://api.github.com/repos/datchiz/fdms.android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/datchiz/fdms.android/merges","archive_url":"https://api.github.com/repos/datchiz/fdms.android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/datchiz/fdms.android/downloads","issues_url":"https://api.github.com/repos/datchiz/fdms.android/issues{/number}","pulls_url":"https://api.github.com/repos/datchiz/fdms.android/pulls{/number}","milestones_url":"https://api.github.com/repos/datchiz/fdms.android/milestones{/number}","notifications_url":"https://api.github.com/repos/datchiz/fdms.android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/datchiz/fdms.android/labels{/name}","releases_url":"https://api.github.com/repos/datchiz/fdms.android/releases{/id}","deployments_url":"https://api.github.com/repos/datchiz/fdms.android/deployments","created_at":"2017-09-07T08:41:09Z","updated_at":"2017-09-07T08:39:52Z","pushed_at":"2017-09-12T08:39:34Z","git_url":"git://github.com/datchiz/fdms.android.git","ssh_url":"git@github.com:datchiz/fdms.android.git","clone_url":"https://github.com/datchiz/fdms.android.git","svn_url":"https://github.com/datchiz/fdms.android","homepage":null,"size":17472,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"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":"master"}},"base":{"label":"DoanVanToan:develop","ref":"develop","sha":"0df5bb233e819411c03570023afdef835cb272a8","user":{"login":"DoanVanToan","id":21195010,"avatar_url":"https://avatars3.githubusercontent.com/u/21195010?v=4","gravatar_id":"","url":"https://api.github.com/users/DoanVanToan","html_url":"https://github.com/DoanVanToan","followers_url":"https://api.github.com/users/DoanVanToan/followers","following_url":"https://api.github.com/users/DoanVanToan/following{/other_user}","gists_url":"https://api.github.com/users/DoanVanToan/gists{/gist_id}","starred_url":"https://api.github.com/users/DoanVanToan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoanVanToan/subscriptions","organizations_url":"https://api.github.com/users/DoanVanToan/orgs","repos_url":"https://api.github.com/users/DoanVanToan/repos","events_url":"https://api.github.com/users/DoanVanToan/events{/privacy}","received_events_url":"https://api.github.com/users/DoanVanToan/received_events","type":"User","site_admin":false},"repo":{"id":102713014,"name":"fdms.android","full_name":"DoanVanToan/fdms.android","owner":{"login":"DoanVanToan","id":21195010,"avatar_url":"https://avatars3.githubusercontent.com/u/21195010?v=4","gravatar_id":"","url":"https://api.github.com/users/DoanVanToan","html_url":"https://github.com/DoanVanToan","followers_url":"https://api.github.com/users/DoanVanToan/followers","following_url":"https://api.github.com/users/DoanVanToan/following{/other_user}","gists_url":"https://api.github.com/users/DoanVanToan/gists{/gist_id}","starred_url":"https://api.github.com/users/DoanVanToan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoanVanToan/subscriptions","organizations_url":"https://api.github.com/users/DoanVanToan/orgs","repos_url":"https://api.github.com/users/DoanVanToan/repos","events_url":"https://api.github.com/users/DoanVanToan/events{/privacy}","received_events_url":"https://api.github.com/users/DoanVanToan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DoanVanToan/fdms.android","description":null,"fork":false,"url":"https://api.github.com/repos/DoanVanToan/fdms.android","forks_url":"https://api.github.com/repos/DoanVanToan/fdms.android/forks","keys_url":"https://api.github.com/repos/DoanVanToan/fdms.android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoanVanToan/fdms.android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoanVanToan/fdms.android/teams","hooks_url":"https://api.github.com/repos/DoanVanToan/fdms.android/hooks","issue_events_url":"https://api.github.com/repos/DoanVanToan/fdms.android/issues/events{/number}","events_url":"https://api.github.com/repos/DoanVanToan/fdms.android/events","assignees_url":"https://api.github.com/repos/DoanVanToan/fdms.android/assignees{/user}","branches_url":"https://api.github.com/repos/DoanVanToan/fdms.android/branches{/branch}","tags_url":"https://api.github.com/repos/DoanVanToan/fdms.android/tags","blobs_url":"https://api.github.com/repos/DoanVanToan/fdms.android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoanVanToan/fdms.android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoanVanToan/fdms.android/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoanVanToan/fdms.android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoanVanToan/fdms.android/statuses/{sha}","languages_url":"https://api.github.com/repos/DoanVanToan/fdms.android/languages","stargazers_url":"https://api.github.com/repos/DoanVanToan/fdms.android/stargazers","contributors_url":"https://api.github.com/repos/DoanVanToan/fdms.android/contributors","subscribers_url":"https://api.github.com/repos/DoanVanToan/fdms.android/subscribers","subscription_url":"https://api.github.com/repos/DoanVanToan/fdms.android/subscription","commits_url":"https://api.github.com/repos/DoanVanToan/fdms.android/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoanVanToan/fdms.android/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoanVanToan/fdms.android/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoanVanToan/fdms.android/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoanVanToan/fdms.android/contents/{+path}","compare_url":"https://api.github.com/repos/DoanVanToan/fdms.android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoanVanToan/fdms.android/merges","archive_url":"https://api.github.com/repos/DoanVanToan/fdms.android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoanVanToan/fdms.android/downloads","issues_url":"https://api.github.com/repos/DoanVanToan/fdms.android/issues{/number}","pulls_url":"https://api.github.com/repos/DoanVanToan/fdms.android/pulls{/number}","milestones_url":"https://api.github.com/repos/DoanVanToan/fdms.android/milestones{/number}","notifications_url":"https://api.github.com/repos/DoanVanToan/fdms.android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoanVanToan/fdms.android/labels{/name}","releases_url":"https://api.github.com/repos/DoanVanToan/fdms.android/releases{/id}","deployments_url":"https://api.github.com/repos/DoanVanToan/fdms.android/deployments","created_at":"2017-09-07T08:39:52Z","updated_at":"2017-09-07T08:39:52Z","pushed_at":"2017-09-12T08:48:12Z","git_url":"git://github.com/DoanVanToan/fdms.android.git","ssh_url":"git@github.com:DoanVanToan/fdms.android.git","clone_url":"https://github.com/DoanVanToan/fdms.android.git","svn_url":"https://github.com/DoanVanToan/fdms.android","homepage":null,"size":17589,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DoanVanToan/fdms.android/pulls/18"},"html":{"href":"https://github.com/DoanVanToan/fdms.android/pull/18"},"issue":{"href":"https://api.github.com/repos/DoanVanToan/fdms.android/issues/18"},"comments":{"href":"https://api.github.com/repos/DoanVanToan/fdms.android/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/DoanVanToan/fdms.android/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/DoanVanToan/fdms.android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DoanVanToan/fdms.android/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/DoanVanToan/fdms.android/statuses/2b6777489e3d739c908a822d9d6f52614226f862"}},"author_association":"NONE"}}
{"actor":{"display_login":"DoanVanToan"}}