(Runnable r)
| 481 | } |
| 482 | |
| 483 | private void runAndWait(Runnable r) { |
| 484 | if (platformSupportsImageLoadingOffEdt()) { |
| 485 | String oldShowEDTWarnings = CN.getProperty("platformHint.showEDTWarnings", "false"); |
| 486 | CN.setProperty("platformHint.showEDTWarnings", "false"); |
| 487 | try { |
| 488 | r.run(); |
| 489 | } finally { |
| 490 | CN.setProperty("platformHint.showEDTWarnings", oldShowEDTWarnings); |
| 491 | } |
| 492 | } else { |
| 493 | CN.callSeriallyAndWait(r); |
| 494 | } |
| 495 | } |
| 496 | |
| 497 | private boolean platformSupportsImageLoadingOffEdt() { |
| 498 | return CN.isSimulator() || !"ios".equals(CN.getPlatformName()); |
no test coverage detected