Fix NoClassDefFoundError due to CursorAnchorInfo in K
Check API level before touching CursorAnchorInfo that is only available in L and later. BUG: 17891202 Change-Id: I6e8d2e3f071bd78bed8c1d24ba2b97207dea3044main
parent
3ead4d7f8a
commit
883bfd2c0b
|
@ -32,6 +32,7 @@ import android.content.res.Resources;
|
||||||
import android.inputmethodservice.InputMethodService;
|
import android.inputmethodservice.InputMethodService;
|
||||||
import android.media.AudioManager;
|
import android.media.AudioManager;
|
||||||
import android.net.ConnectivityManager;
|
import android.net.ConnectivityManager;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Debug;
|
import android.os.Debug;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
|
@ -795,6 +796,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
};
|
};
|
||||||
|
|
||||||
private void onExtractTextViewPreDraw() {
|
private void onExtractTextViewPreDraw() {
|
||||||
|
// CursorAnchorInfo is available on L and later.
|
||||||
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.L) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!isFullscreenMode() || mExtractEditText == null) {
|
if (!isFullscreenMode() || mExtractEditText == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue