{"action":"created","issue":{"url":"https://api.github.com/repos/literacyapp-org/literacyapp-android/issues/308","repository_url":"https://api.github.com/repos/literacyapp-org/literacyapp-android","labels_url":"https://api.github.com/repos/literacyapp-org/literacyapp-android/issues/308/labels{/name}","comments_url":"https://api.github.com/repos/literacyapp-org/literacyapp-android/issues/308/comments","events_url":"https://api.github.com/repos/literacyapp-org/literacyapp-android/issues/308/events","html_url":"https://github.com/literacyapp-org/literacyapp-android/issues/308","id":198177305,"number":308,"title":"AuthenticationActivity crashes if it starts while the screen is turned off and then turned on","user":{"login":"sladomic","id":556222,"avatar_url":"https://avatars.githubusercontent.com/u/556222?v=3","gravatar_id":"","url":"https://api.github.com/users/sladomic","html_url":"https://github.com/sladomic","followers_url":"https://api.github.com/users/sladomic/followers","following_url":"https://api.github.com/users/sladomic/following{/other_user}","gists_url":"https://api.github.com/users/sladomic/gists{/gist_id}","starred_url":"https://api.github.com/users/sladomic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sladomic/subscriptions","organizations_url":"https://api.github.com/users/sladomic/orgs","repos_url":"https://api.github.com/users/sladomic/repos","events_url":"https://api.github.com/users/sladomic/events{/privacy}","received_events_url":"https://api.github.com/users/sladomic/received_events","type":"User","site_admin":false},"labels":[{"id":306076472,"url":"https://api.github.com/repos/literacyapp-org/literacyapp-android/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"sladomic","id":556222,"avatar_url":"https://avatars.githubusercontent.com/u/556222?v=3","gravatar_id":"","url":"https://api.github.com/users/sladomic","html_url":"https://github.com/sladomic","followers_url":"https://api.github.com/users/sladomic/followers","following_url":"https://api.github.com/users/sladomic/following{/other_user}","gists_url":"https://api.github.com/users/sladomic/gists{/gist_id}","starred_url":"https://api.github.com/users/sladomic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sladomic/subscriptions","organizations_url":"https://api.github.com/users/sladomic/orgs","repos_url":"https://api.github.com/users/sladomic/repos","events_url":"https://api.github.com/users/sladomic/events{/privacy}","received_events_url":"https://api.github.com/users/sladomic/received_events","type":"User","site_admin":false},"assignees":[{"login":"sladomic","id":556222,"avatar_url":"https://avatars.githubusercontent.com/u/556222?v=3","gravatar_id":"","url":"https://api.github.com/users/sladomic","html_url":"https://github.com/sladomic","followers_url":"https://api.github.com/users/sladomic/followers","following_url":"https://api.github.com/users/sladomic/following{/other_user}","gists_url":"https://api.github.com/users/sladomic/gists{/gist_id}","starred_url":"https://api.github.com/users/sladomic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sladomic/subscriptions","organizations_url":"https://api.github.com/users/sladomic/orgs","repos_url":"https://api.github.com/users/sladomic/repos","events_url":"https://api.github.com/users/sladomic/events{/privacy}","received_events_url":"https://api.github.com/users/sladomic/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-12-30T18:04:33Z","updated_at":"2016-12-31T08:33:29Z","closed_at":null,"body":"Description:\r\n- Turn the screen off and wait for the AuthenticationActivity to start\r\n\r\nExpected Result:\r\n- The AuthenticationActivity starts but pauses until the screen is turned on (or maybe we shouldn't even start it?)\r\n\r\nActual Result:\r\n- The app crashes (see log)\r\n\r\nLog:\r\n```java\r\n12-30 20:59:57.700 20030-20030/org.literacyapp E/AndroidRuntime: FATAL EXCEPTION: main\r\n                                                                 Process: org.literacyapp, PID: 20030\r\n                                                                 Theme: themes:{}\r\n                                                                 java.lang.RuntimeException: Unable to resume activity {org.literacyapp/org.literacyapp.authentication.AuthenticationActivity}: java.lang.IllegalThreadStateException: Thread already started\r\n                                                                     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3137)\r\n                                                                     at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3168)\r\n                                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1407)\r\n                                                                     at android.os.Handler.dispatchMessage(Handler.java:102)\r\n                                                                     at android.os.Looper.loop(Looper.java:148)\r\n                                                                     at android.app.ActivityThread.main(ActivityThread.java:5461)\r\n                                                                     at java.lang.reflect.Method.invoke(Native Method)\r\n                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)\r\n                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)\r\n                                                                  Caused by: java.lang.IllegalThreadStateException: Thread already started\r\n                                                                     at java.lang.Thread.checkNotStarted(Thread.java:849)\r\n                                                                     at java.lang.Thread.start(Thread.java:1059)\r\n                                                                     at org.literacyapp.authentication.AuthenticationActivity.onResume(AuthenticationActivity.java:209)\r\n                                                                     at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1259)\r\n                                                                     at android.app.Activity.performResume(Activity.java:6327)\r\n                                                                     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3126)\r\n                                                                     at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3168) \r\n                                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1407) \r\n                                                                     at android.os.Handler.dispatchMessage(Handler.java:102) \r\n                                                                     at android.os.Looper.loop(Looper.java:148) \r\n                                                                     at android.app.ActivityThread.main(ActivityThread.java:5461) \r\n                                                                     at java.lang.reflect.Method.invoke(Native Method) \r\n                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) \r\n                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) \r\n```"},"comment":{"url":"https://api.github.com/repos/literacyapp-org/literacyapp-android/issues/comments/269855688","html_url":"https://github.com/literacyapp-org/literacyapp-android/issues/308#issuecomment-269855688","issue_url":"https://api.github.com/repos/literacyapp-org/literacyapp-android/issues/308","id":269855688,"user":{"login":"jogrimst","id":1451036,"avatar_url":"https://avatars.githubusercontent.com/u/1451036?v=3","gravatar_id":"","url":"https://api.github.com/users/jogrimst","html_url":"https://github.com/jogrimst","followers_url":"https://api.github.com/users/jogrimst/followers","following_url":"https://api.github.com/users/jogrimst/following{/other_user}","gists_url":"https://api.github.com/users/jogrimst/gists{/gist_id}","starred_url":"https://api.github.com/users/jogrimst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jogrimst/subscriptions","organizations_url":"https://api.github.com/users/jogrimst/orgs","repos_url":"https://api.github.com/users/jogrimst/repos","events_url":"https://api.github.com/users/jogrimst/events{/privacy}","received_events_url":"https://api.github.com/users/jogrimst/received_events","type":"User","site_admin":false},"created_at":"2016-12-31T08:33:29Z","updated_at":"2016-12-31T08:33:29Z","body":"```\r\n// Detect if screen is active\r\n        DisplayManager displayManager = (DisplayManager) context.getSystemService(Context.DISPLAY_SERVICE);\r\n        for (Display display : displayManager.getDisplays()) {\r\n            if (display.getState() != Display.STATE_ON) {\r\n                // Skip authentication\r\n            }\r\n        }\r\n```"}}
{"actor":{"display_login":"jogrimst"}}