Initialize CoolReader Engine @param fontList is array of .ttf font pathnames to load
(CoolReader activity, BackgroundThread backgroundThread)
| 538 | * is array of .ttf font pathnames to load |
| 539 | */ |
| 540 | public Engine(CoolReader activity, BackgroundThread backgroundThread) { |
| 541 | this.mActivity = activity; |
| 542 | this.mBackgroundThread = backgroundThread; |
| 543 | installLibrary(); |
| 544 | initMountRoots(); |
| 545 | // this.mMainView = mainView; |
| 546 | // |
| 547 | // log.i("Engine() : initializing Engine in UI thread"); |
| 548 | // if (!initialized) { |
| 549 | // installLibrary(); |
| 550 | // } |
| 551 | initializeStarted = true; |
| 552 | log.i("Engine() : scheduling init task"); |
| 553 | BackgroundThread.backgroundExecutor.execute(new Runnable() { |
| 554 | public void run() { |
| 555 | try { |
| 556 | log.i("Engine() : running init() in engine thread"); |
| 557 | init(); |
| 558 | // android.view.ViewRoot.getRunQueue().post(new Runnable() { |
| 559 | // public void run() { |
| 560 | // |
| 561 | // } |
| 562 | // }); |
| 563 | } catch (final Exception e) { |
| 564 | log.e("Exception while initializing Engine", e); |
| 565 | // handler.post(new Runnable() { |
| 566 | // public void run() { |
| 567 | // // TODO: fatal error |
| 568 | // } |
| 569 | // }); |
| 570 | } |
| 571 | } |
| 572 | }); |
| 573 | } |
| 574 | |
| 575 | private native boolean initInternal(String[] fontList); |
| 576 |
nothing calls this directly
no test coverage detected