am bfaf349c: Load the native lib eagerly

* commit 'bfaf349c3554e11af8227a5f0807a74107a93069':
  Load the native lib eagerly
main
Ken Wakasa 2013-06-24 02:16:04 -07:00 committed by Android Git Automerger
commit 292c5cc1d2
1 changed files with 7 additions and 0 deletions

View File

@ -83,6 +83,7 @@ import com.android.inputmethod.latin.utils.CollectionUtils;
import com.android.inputmethod.latin.utils.CompletionInfoUtils; import com.android.inputmethod.latin.utils.CompletionInfoUtils;
import com.android.inputmethod.latin.utils.InputTypeUtils; import com.android.inputmethod.latin.utils.InputTypeUtils;
import com.android.inputmethod.latin.utils.IntentUtils; 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.PositionalInfoForUserDictPendingAddition;
import com.android.inputmethod.latin.utils.RecapitalizeStatus; import com.android.inputmethod.latin.utils.RecapitalizeStatus;
import com.android.inputmethod.latin.utils.StaticInnerHandlerWrapper; 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() { public LatinIME() {
super(); super();
mSettings = Settings.getInstance(); mSettings = Settings.getInstance();