{"action":"created","issue":{"url":"https://api.github.com/repos/opendatakit/collect/issues/3214","repository_url":"https://api.github.com/repos/opendatakit/collect","labels_url":"https://api.github.com/repos/opendatakit/collect/issues/3214/labels{/name}","comments_url":"https://api.github.com/repos/opendatakit/collect/issues/3214/comments","events_url":"https://api.github.com/repos/opendatakit/collect/issues/3214/events","html_url":"https://github.com/opendatakit/collect/pull/3214","id":468987406,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjk4MzA2MjE2","number":3214,"title":"Register provider change receiver after loading form","user":{"login":"lognaturel","id":967540,"node_id":"MDQ6VXNlcjk2NzU0MA==","avatar_url":"https://avatars3.githubusercontent.com/u/967540?v=4","gravatar_id":"","url":"https://api.github.com/users/lognaturel","html_url":"https://github.com/lognaturel","followers_url":"https://api.github.com/users/lognaturel/followers","following_url":"https://api.github.com/users/lognaturel/following{/other_user}","gists_url":"https://api.github.com/users/lognaturel/gists{/gist_id}","starred_url":"https://api.github.com/users/lognaturel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lognaturel/subscriptions","organizations_url":"https://api.github.com/users/lognaturel/orgs","repos_url":"https://api.github.com/users/lognaturel/repos","events_url":"https://api.github.com/users/lognaturel/events{/privacy}","received_events_url":"https://api.github.com/users/lognaturel/received_events","type":"User","site_admin":false},"labels":[{"id":631529059,"node_id":"MDU6TGFiZWw2MzE1MjkwNTk=","url":"https://api.github.com/repos/opendatakit/collect/labels/needs%20testing","name":"needs testing","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/opendatakit/collect/milestones/15","html_url":"https://github.com/opendatakit/collect/milestone/15","labels_url":"https://api.github.com/repos/opendatakit/collect/milestones/15/labels","id":4335205,"node_id":"MDk6TWlsZXN0b25lNDMzNTIwNQ==","number":15,"title":"v1.23","description":"","creator":{"login":"yanokwa","id":32369,"node_id":"MDQ6VXNlcjMyMzY5","avatar_url":"https://avatars3.githubusercontent.com/u/32369?v=4","gravatar_id":"","url":"https://api.github.com/users/yanokwa","html_url":"https://github.com/yanokwa","followers_url":"https://api.github.com/users/yanokwa/followers","following_url":"https://api.github.com/users/yanokwa/following{/other_user}","gists_url":"https://api.github.com/users/yanokwa/gists{/gist_id}","starred_url":"https://api.github.com/users/yanokwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanokwa/subscriptions","organizations_url":"https://api.github.com/users/yanokwa/orgs","repos_url":"https://api.github.com/users/yanokwa/repos","events_url":"https://api.github.com/users/yanokwa/events{/privacy}","received_events_url":"https://api.github.com/users/yanokwa/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":12,"state":"open","created_at":"2019-05-21T14:41:01Z","updated_at":"2019-07-19T17:17:39Z","due_on":"2019-07-24T07:00:00Z","closed_at":null},"comments":1,"created_at":"2019-07-17T05:04:06Z","updated_at":"2019-07-23T09:39:05Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/opendatakit/collect/pulls/3214","html_url":"https://github.com/opendatakit/collect/pull/3214","diff_url":"https://github.com/opendatakit/collect/pull/3214.diff","patch_url":"https://github.com/opendatakit/collect/pull/3214.patch"},"body":"Closes #3210\r\n\r\n#### What has been done to verify that this works as intended?\r\nStarted filling out [AuditTest.xml.txt](https://github.com/opendatakit/collect/files/3400247/AuditTest.xml.txt), switched to settings, turned off location tracking, kept filling out the form and then turned location tracking back on. Verified that both changes to location settings were written to the audit log.\r\n\r\n#### Why is this the best possible solution? Were any other approaches considered?\r\nThere were two problems: registering the receiver in `onStart` only meant that it wouldn't actually be registered after form load because `onStart` generally runs before the form controller is set. Because it was unregistered in `onStop`, it wouldn't be running when the user was looking at the Settings app.\r\n\r\nGiven those issues, I believe this is the simplest approach.\r\n\r\n#### How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?\r\nThis should be a narrow fix that only fixes the bug at #3210. The only real risk is that it's not a complete fix.\r\n\r\n#### Do we need any specific form for testing your changes? If so, please attach one.\r\n[AuditTest.xml.txt](https://github.com/opendatakit/collect/files/3400249/AuditTest.xml.txt)\r\n\r\n#### Does this change require updates to documentation? If so, please file an issue [here]( https://github.com/opendatakit/docs/issues/new) and include the link below.\r\nNo\r\n\r\n#### Before submitting this PR, please make sure you have:\r\n- [x] run `./gradlew checkAll` and confirmed all checks still pass OR confirm CircleCI build passes and run `./gradlew connectedDebugAndroidTest` locally.\r\n- [x] verified that any code or assets from external sources are properly credited in comments and/or in the [about file](https://github.com/opendatakit/collect/blob/master/collect_app/src/main/assets/open_source_licenses.html).\r\n- [x] verified that any new UI elements use theme colors. [UI Components Style guidelines](https://github.com/opendatakit/collect/blob/master/CONTRIBUTING.md#ui-components-style-guidelines)"},"comment":{"url":"https://api.github.com/repos/opendatakit/collect/issues/comments/514134613","html_url":"https://github.com/opendatakit/collect/pull/3214#issuecomment-514134613","issue_url":"https://api.github.com/repos/opendatakit/collect/issues/3214","id":514134613,"node_id":"MDEyOklzc3VlQ29tbWVudDUxNDEzNDYxMw==","user":{"login":"kkrawczyk123","id":33342488,"node_id":"MDQ6VXNlcjMzMzQyNDg4","avatar_url":"https://avatars0.githubusercontent.com/u/33342488?v=4","gravatar_id":"","url":"https://api.github.com/users/kkrawczyk123","html_url":"https://github.com/kkrawczyk123","followers_url":"https://api.github.com/users/kkrawczyk123/followers","following_url":"https://api.github.com/users/kkrawczyk123/following{/other_user}","gists_url":"https://api.github.com/users/kkrawczyk123/gists{/gist_id}","starred_url":"https://api.github.com/users/kkrawczyk123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkrawczyk123/subscriptions","organizations_url":"https://api.github.com/users/kkrawczyk123/orgs","repos_url":"https://api.github.com/users/kkrawczyk123/repos","events_url":"https://api.github.com/users/kkrawczyk123/events{/privacy}","received_events_url":"https://api.github.com/users/kkrawczyk123/received_events","type":"User","site_admin":false},"created_at":"2019-07-23T09:39:05Z","updated_at":"2019-07-23T09:39:05Z","author_association":"CONTRIBUTOR","body":"@lognaturel I have a problem with building the apk. This is the content of my output:\r\n```\r\nStarting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details\r\n\r\n> Configure project :collect_app\r\nCould not find google-services.json while looking in [src/nullnull/odkCollectRelease, src/odkCollectRelease/nullnull, src/nullnull, src/odkCollectRelease, src/nullnullOdkCollectRelease]\r\nregisterResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)\r\nregisterResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)\r\nregisterResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)\r\n\r\n> Task :collect_app:processDebugGoogleServices\r\nParsing json file: /home/kasia/projekty/collect2/collect/collect_app/src/debug/google-services.json\r\n\r\n> Task :collect_app:compileDebugJavaWithJavac\r\nGradle may disable incremental compilation as the following annotation processors are not incremental: dagger-compiler-2.16.jar (com.google.dagger:dagger-compiler:2.16), dagger-android-processor-2.16.jar (com.google.dagger:dagger-android-processor:2.16), butterknife-compiler-10.0.0.jar (com.jakewharton:butterknife-compiler:10.0.0).\r\nConsider setting the experimental feature flag android.enableSeparateAnnotationProcessing=true in the gradle.properties file to run annotation processing in a separate task and make compilation incremental.\r\n/home/kasia/projekty/collect2/collect/collect_app/src/main/java/org/odk/collect/android/logic/FormController.java:29: error: package org.javarosa.core.model.actions.setlocation does not exist\r\nimport org.javarosa.core.model.actions.setlocation.SetLocationActionHandler;\r\n                                                  ^\r\n/home/kasia/projekty/collect2/collect/collect_app/src/main/java/org/odk/collect/android/logic/actions/setlocation/CollectSetLocationAction.java:23: error: package org.javarosa.core.model.actions.setlocation does not exist\r\nimport org.javarosa.core.model.actions.setlocation.SetLocationAction;\r\n                                                  ^\r\n/home/kasia/projekty/collect2/collect/collect_app/src/main/java/org/odk/collect/android/logic/actions/setlocation/CollectSetLocationAction.java:52: error: cannot find symbol\r\npublic class CollectSetLocationAction extends SetLocationAction implements LocationListener {\r\n                                              ^\r\n  symbol: class SetLocationAction\r\n/home/kasia/projekty/collect2/collect/collect_app/src/main/java/org/odk/collect/android/logic/actions/setlocation/CollectSetLocationActionHandler.java:19: error: package org.javarosa.core.model.actions.setlocation does not exist\r\nimport org.javarosa.core.model.actions.setlocation.SetLocationAction;\r\n                                                  ^\r\n/home/kasia/projekty/collect2/collect/collect_app/src/main/java/org/odk/collect/android/logic/actions/setlocation/CollectSetLocationActionHandler.java:20: error: package org.javarosa.core.model.actions.setlocation does not exist\r\nimport org.javarosa.core.model.actions.setlocation.SetLocationActionHandler;\r\n                                                  ^\r\n/home/kasia/projekty/collect2/collect/collect_app/src/main/java/org/odk/collect/android/logic/actions/setlocation/CollectSetLocationActionHandler.java:25: error: cannot find symbol\r\npublic class CollectSetLocationActionHandler extends SetLocationActionHandler {\r\n                                                     ^\r\n  symbol: class SetLocationActionHandler\r\n/home/kasia/projekty/collect2/collect/collect_app/src/main/java/org/odk/collect/android/logic/actions/setlocation/CollectSetLocationActionHandler.java:26: error: cannot find symbol\r\n    public SetLocationAction getSetLocationAction() {\r\n           ^\r\n  symbol:   class SetLocationAction\r\n  location: class CollectSetLocationActionHandler\r\nNote: Some input files use or override a deprecated API.\r\nNote: Recompile with -Xlint:deprecation for details.\r\n7 errors\r\n\r\n> Task :collect_app:compileDebugJavaWithJavac FAILED\r\n\r\nFAILURE: Build failed with an exception.\r\n\r\n* What went wrong:\r\nExecution failed for task ':collect_app:compileDebugJavaWithJavac'.\r\n> Compilation failed; see the compiler error output for details.\r\n\r\n```"}}
{"actor":{"display_login":"kkrawczyk123"}}