{"action":"closed","issue":{"url":"https://api.github.com/repos/federicoiosue/Omni-Notes/issues/444","repository_url":"https://api.github.com/repos/federicoiosue/Omni-Notes","labels_url":"https://api.github.com/repos/federicoiosue/Omni-Notes/issues/444/labels{/name}","comments_url":"https://api.github.com/repos/federicoiosue/Omni-Notes/issues/444/comments","events_url":"https://api.github.com/repos/federicoiosue/Omni-Notes/issues/444/events","html_url":"https://github.com/federicoiosue/Omni-Notes/issues/444","id":303115029,"number":444,"title":"wrong isPasswordAccepted implementation?","user":{"login":"cabagge","id":17234436,"avatar_url":"https://avatars3.githubusercontent.com/u/17234436?v=4","gravatar_id":"","url":"https://api.github.com/users/cabagge","html_url":"https://github.com/cabagge","followers_url":"https://api.github.com/users/cabagge/followers","following_url":"https://api.github.com/users/cabagge/following{/other_user}","gists_url":"https://api.github.com/users/cabagge/gists{/gist_id}","starred_url":"https://api.github.com/users/cabagge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cabagge/subscriptions","organizations_url":"https://api.github.com/users/cabagge/orgs","repos_url":"https://api.github.com/users/cabagge/repos","events_url":"https://api.github.com/users/cabagge/events{/privacy}","received_events_url":"https://api.github.com/users/cabagge/received_events","type":"User","site_admin":false},"labels":[{"id":70226738,"url":"https://api.github.com/repos/federicoiosue/Omni-Notes/labels/Bug","name":"Bug","color":"fc2929","default":false}],"state":"closed","locked":false,"assignee":{"login":"federicoiosue","id":487104,"avatar_url":"https://avatars0.githubusercontent.com/u/487104?v=4","gravatar_id":"","url":"https://api.github.com/users/federicoiosue","html_url":"https://github.com/federicoiosue","followers_url":"https://api.github.com/users/federicoiosue/followers","following_url":"https://api.github.com/users/federicoiosue/following{/other_user}","gists_url":"https://api.github.com/users/federicoiosue/gists{/gist_id}","starred_url":"https://api.github.com/users/federicoiosue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/federicoiosue/subscriptions","organizations_url":"https://api.github.com/users/federicoiosue/orgs","repos_url":"https://api.github.com/users/federicoiosue/repos","events_url":"https://api.github.com/users/federicoiosue/events{/privacy}","received_events_url":"https://api.github.com/users/federicoiosue/received_events","type":"User","site_admin":false},"assignees":[{"login":"federicoiosue","id":487104,"avatar_url":"https://avatars0.githubusercontent.com/u/487104?v=4","gravatar_id":"","url":"https://api.github.com/users/federicoiosue","html_url":"https://github.com/federicoiosue","followers_url":"https://api.github.com/users/federicoiosue/followers","following_url":"https://api.github.com/users/federicoiosue/following{/other_user}","gists_url":"https://api.github.com/users/federicoiosue/gists{/gist_id}","starred_url":"https://api.github.com/users/federicoiosue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/federicoiosue/subscriptions","organizations_url":"https://api.github.com/users/federicoiosue/orgs","repos_url":"https://api.github.com/users/federicoiosue/repos","events_url":"https://api.github.com/users/federicoiosue/events{/privacy}","received_events_url":"https://api.github.com/users/federicoiosue/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/federicoiosue/Omni-Notes/milestones/16","html_url":"https://github.com/federicoiosue/Omni-Notes/milestone/16","labels_url":"https://api.github.com/repos/federicoiosue/Omni-Notes/milestones/16/labels","id":3210797,"number":16,"title":"5.4.5","description":null,"creator":{"login":"federicoiosue","id":487104,"avatar_url":"https://avatars0.githubusercontent.com/u/487104?v=4","gravatar_id":"","url":"https://api.github.com/users/federicoiosue","html_url":"https://github.com/federicoiosue","followers_url":"https://api.github.com/users/federicoiosue/followers","following_url":"https://api.github.com/users/federicoiosue/following{/other_user}","gists_url":"https://api.github.com/users/federicoiosue/gists{/gist_id}","starred_url":"https://api.github.com/users/federicoiosue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/federicoiosue/subscriptions","organizations_url":"https://api.github.com/users/federicoiosue/orgs","repos_url":"https://api.github.com/users/federicoiosue/repos","events_url":"https://api.github.com/users/federicoiosue/events{/privacy}","received_events_url":"https://api.github.com/users/federicoiosue/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":4,"state":"open","created_at":"2018-03-22T23:06:53Z","updated_at":"2018-03-27T22:41:41Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2018-03-07T14:16:29Z","updated_at":"2018-03-27T22:41:40Z","closed_at":"2018-03-27T22:41:40Z","author_association":"NONE","body":"I found, that after app leaving (onBackPressed) app goes to the background.  After second app activation (e.g. tap on icon OmniNotes)  - I don't know why, **isPasswordAccepted** is set to true. \r\n\r\n```\r\nif (!isPasswordAccepted) {\r\n            // This method starts the bootstrap chain.\r\n            checkPassword();\r\n}\r\n```\r\n\r\nBut it means, `init()` is not called at all.\r\nThen app behaviour is then undefined and on exit (onBackPressed) is null pointer `mFragmentManager ` in `finishActionMode()` raised\r\n\r\n```\r\npublic void finishActionMode() {\r\n        ListFragment fragment = (ListFragment) mFragmentManager.findFragmentByTag(FRAGMENT_LIST_TAG);\r\n        if (fragment != null) {\r\n            fragment.finishActionMode();\r\n        }\r\n    }\r\n```\r\n\r\nIt could be fixed in `onStop()` by setting the  **isPasswordAccepted = false**\r\n```\r\n@Override\r\n\tprotected void onStop() {\r\n\t\tsuper.onStop();\r\n                isPasswordAccepted = false;    //  FIX *****\r\n\t\tEventBus.getDefault().unregister(this);\r\n\t}\r\n```\r\nI don't know if you can reproduce it, I have android 4.4.2 ;)"}}
{"actor":{"display_login":"federicoiosue"}}