guardianproject / haven

Haven is for people who need a way to protect their personal spaces and possessions without compromising their own privacy, through an Android app and on-device sensors
https://guardianproject.github.io/haven/
GNU General Public License v3.0
6.62k stars 728 forks source link

Fix crash on camera resume #321 #326

Closed lukeswitz closed 6 years ago

lukeswitz commented 6 years ago

As @zhanglihow suggested, this fix works. Tested 5.1-6.0

lukeswitz commented 6 years ago

Reason for explicit call: ensure the fragment is on the main thread to avoid conflict/confusion with the bind handler.

“when code is running inside onCreate(), onStartCommand(), or onDestroy(), it’s treated as if it was in foreground even if it’s not.”

lukeswitz commented 6 years ago

Looking into the further ramifications of this; closing as it’s no one-line fix.