Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bfaf349c authored by Ken Wakasa's avatar Ken Wakasa
Browse files

Load the native lib eagerly

in the hope of avoiding UnsatisfiedLinkError. This is definitely not a
confident fix as we still don't know the root cause of the issue.

bug: 9325110
Change-Id: I1abf8031b98509f63fce6a2d069d497895ea712c
parent bc181318
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ import com.android.inputmethod.latin.utils.CollectionUtils;
import com.android.inputmethod.latin.utils.CompletionInfoUtils;
import com.android.inputmethod.latin.utils.InputTypeUtils;
import com.android.inputmethod.latin.utils.IntentUtils;
import com.android.inputmethod.latin.utils.JniUtils;
import com.android.inputmethod.latin.utils.PositionalInfoForUserDictPendingAddition;
import com.android.inputmethod.latin.utils.RecapitalizeStatus;
import com.android.inputmethod.latin.utils.StaticInnerHandlerWrapper;
@@ -439,6 +440,12 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
        }
    }

    // Loading the native library eagerly to avoid unexpected UnsatisfiedLinkError at the initial
    // JNI call as much as possible.
    static {
        JniUtils.loadNativeLibrary();
    }

    public LatinIME() {
        super();
        mSettings = Settings.getInstance();