MCPcopy Create free account
hub / github.com/buggins/coolreader / Engine

Method Engine

android/src/org/coolreader/crengine/Engine.java:540–573  ·  view source on GitHub ↗

Initialize CoolReader Engine @param fontList is array of .ttf font pathnames to load

(CoolReader activity, BackgroundThread backgroundThread)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

installLibraryMethod · 0.95
initMountRootsMethod · 0.95
iMethod · 0.65
executeMethod · 0.45

Tested by

no test coverage detected