()
| 453 | //this thread autosaves the notes every 60 seconds |
| 454 | new Thread() { |
| 455 | @Override |
| 456 | public void run() { |
| 457 | setPriority(Thread.MIN_PRIORITY); |
| 458 | for (;;) { |
| 459 | try { |
| 460 | sleep(60000L); |
| 461 | synchronized (notes) { |
| 462 | if (notes.isEmpty()) { |
| 463 | return; |
| 464 | } |
| 465 | saveState(); |
| 466 | } |
| 467 | } catch (Throwable t) { |
| 468 | } |
| 469 | } |
| 470 | } |
| 471 | }.start(); |
| 472 | //this thread checks the notes every 1 second to make sure they're still inside the screen (in case the resolution changes) |
| 473 | new Thread() { |
nothing calls this directly
no test coverage detected