{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1807","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1807/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1807/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1807/events","html_url":"https://github.com/mapbox/mapbox-gl-native/pull/1807","id":92225503,"number":1807,"title":"makes sure STATE_IS_GPS_ON is correctly saved as state","user":{"login":"zugaldia","id":6964,"avatar_url":"https://avatars.githubusercontent.com/u/6964?v=3","gravatar_id":"","url":"https://api.github.com/users/zugaldia","html_url":"https://github.com/zugaldia","followers_url":"https://api.github.com/users/zugaldia/followers","following_url":"https://api.github.com/users/zugaldia/following{/other_user}","gists_url":"https://api.github.com/users/zugaldia/gists{/gist_id}","starred_url":"https://api.github.com/users/zugaldia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zugaldia/subscriptions","organizations_url":"https://api.github.com/users/zugaldia/orgs","repos_url":"https://api.github.com/users/zugaldia/repos","events_url":"https://api.github.com/users/zugaldia/events{/privacy}","received_events_url":"https://api.github.com/users/zugaldia/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/labels/Android","name":"Android","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-30T23:38:41Z","updated_at":"2015-07-01T13:02:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/pulls/1807","html_url":"https://github.com/mapbox/mapbox-gl-native/pull/1807","diff_url":"https://github.com/mapbox/mapbox-gl-native/pull/1807.diff","patch_url":"https://github.com/mapbox/mapbox-gl-native/pull/1807.patch"},"body":"Because `onSaveInstanceState()` was called after the value of `mIsGpsOn` was already changed by `toggleGps()` its state wasn't correctly saved. I've added an extra `mIsGpsOnState` to track the actual state value.\r\n\r\nI've also added a check in `onResume()` to make sure its value is respected when the app is resumed (for example, after a device rotation)."},"comment":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/comments/117654315","html_url":"https://github.com/mapbox/mapbox-gl-native/pull/1807#issuecomment-117654315","issue_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1807","id":117654315,"user":{"login":"kkaefer","id":52399,"avatar_url":"https://avatars.githubusercontent.com/u/52399?v=3","gravatar_id":"","url":"https://api.github.com/users/kkaefer","html_url":"https://github.com/kkaefer","followers_url":"https://api.github.com/users/kkaefer/followers","following_url":"https://api.github.com/users/kkaefer/following{/other_user}","gists_url":"https://api.github.com/users/kkaefer/gists{/gist_id}","starred_url":"https://api.github.com/users/kkaefer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkaefer/subscriptions","organizations_url":"https://api.github.com/users/kkaefer/orgs","repos_url":"https://api.github.com/users/kkaefer/repos","events_url":"https://api.github.com/users/kkaefer/events{/privacy}","received_events_url":"https://api.github.com/users/kkaefer/received_events","type":"User","site_admin":false},"created_at":"2015-07-01T13:02:12Z","updated_at":"2015-07-01T13:02:12Z","body":"I still don't understand the difference. In what circumstances would they ever be different?"}}