{"action":"created","issue":{"url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/762","labels_url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/762/labels{/name}","comments_url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/762/comments","events_url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/762/events","html_url":"https://github.com/ankidroid/Anki-Android/pull/762","id":63305560,"number":762,"title":"Remove dependency on AnkiDroidApp.onCreate","user":{"login":"timrae","id":2818274,"avatar_url":"https://avatars.githubusercontent.com/u/2818274?v=3","gravatar_id":"","url":"https://api.github.com/users/timrae","html_url":"https://github.com/timrae","followers_url":"https://api.github.com/users/timrae/followers","following_url":"https://api.github.com/users/timrae/following{/other_user}","gists_url":"https://api.github.com/users/timrae/gists{/gist_id}","starred_url":"https://api.github.com/users/timrae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timrae/subscriptions","organizations_url":"https://api.github.com/users/timrae/orgs","repos_url":"https://api.github.com/users/timrae/repos","events_url":"https://api.github.com/users/timrae/events{/privacy}","received_events_url":"https://api.github.com/users/timrae/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-20T20:55:06Z","updated_at":"2015-03-22T07:40:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ankidroid/Anki-Android/pulls/762","html_url":"https://github.com/ankidroid/Anki-Android/pull/762","diff_url":"https://github.com/ankidroid/Anki-Android/pull/762.diff","patch_url":"https://github.com/ankidroid/Anki-Android/pull/762.patch"},"body":"Remove the dependency of AnkiDroid on the `AnkiDroidApp.onCreate()` method, as this method is not the first to run when a `ContentProvider` is used, or when test cases are run. I also started to clean up AnkiDroidApp in general, favoring singletons instead, which is the design pattern favored by Google. Some more work could be done cleaning that up, but it's not too urgent.\r\n\r\nThis PR supersedes #759 and #760. \r\n\r\n@flerda would you be able to review this one please, as it's a pretty fundamental design change? \r\nalso @hssm there are a few changes to libanki, as well as the directory initialization that you'll probably be interested in\r\n\r\nIdeally I'd like everyone to check and be \"on board\" with the new `CollectionOpenHelper` class"},"comment":{"url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/comments/84547178","html_url":"https://github.com/ankidroid/Anki-Android/pull/762#issuecomment-84547178","issue_url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/762","id":84547178,"user":{"login":"timrae","id":2818274,"avatar_url":"https://avatars.githubusercontent.com/u/2818274?v=3","gravatar_id":"","url":"https://api.github.com/users/timrae","html_url":"https://github.com/timrae","followers_url":"https://api.github.com/users/timrae/followers","following_url":"https://api.github.com/users/timrae/following{/other_user}","gists_url":"https://api.github.com/users/timrae/gists{/gist_id}","starred_url":"https://api.github.com/users/timrae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timrae/subscriptions","organizations_url":"https://api.github.com/users/timrae/orgs","repos_url":"https://api.github.com/users/timrae/repos","events_url":"https://api.github.com/users/timrae/events{/privacy}","received_events_url":"https://api.github.com/users/timrae/received_events","type":"User","site_admin":false},"created_at":"2015-03-22T07:40:27Z","updated_at":"2015-03-22T07:40:27Z","body":"@flerda our discussion has disappeared in the outdated diffs now, but what do you think about the new commit using the enum singleton pattern?"}}