Commit 9a4b0c5
authored
chore(ui): drain Handler thread queue when activity is destroyed (#99)
Currently, we don't have any tasks that could execute after the Activity
is destroyed and lead to crashes or unexpected behaviors. So, it's
better to drain this static Handler thread's queue upon Activity
destruction to prevent quite realistic, well-known bugs tied to Android
lifecycle that we might face in the future if making any changes.1 parent 52cb098 commit 9a4b0c5
File tree
2 files changed
+14
-0
lines changed- src/com/github/iusmac/sevensim/ui
- scheduler
- sim
2 files changed
+14
-0
lines changedLines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
163 | 170 | | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
148 | 155 | | |
149 | 156 | | |
150 | 157 | | |
| |||
0 commit comments