Fix NPE with the unit test
Change-Id: I0836f8b7191287bcff65cdc8a8ce0ff7484e9f65
This commit is contained in:
parent
2442e77985
commit
52344a0788
1 changed files with 1 additions and 1 deletions
|
@ -140,7 +140,7 @@ public class LatinKeyboard extends Keyboard {
|
||||||
// The threshold is "key width" x 1.25
|
// The threshold is "key width" x 1.25
|
||||||
mSpacebarLanguageSwitchThreshold = (getMostCommonKeyWidth() * 5) / 4;
|
mSpacebarLanguageSwitchThreshold = (getMostCommonKeyWidth() * 5) / 4;
|
||||||
|
|
||||||
if (mSpaceKey != null) {
|
if (mSpaceKey != null && mSpacePreviewIcon != null) {
|
||||||
final int slidingIconWidth = Math.max(mSpaceKey.mWidth,
|
final int slidingIconWidth = Math.max(mSpaceKey.mWidth,
|
||||||
(int)(getMinWidth() * SPACEBAR_POPUP_MIN_RATIO));
|
(int)(getMinWidth() * SPACEBAR_POPUP_MIN_RATIO));
|
||||||
final int spaceKeyheight = mSpacePreviewIcon.getIntrinsicHeight();
|
final int spaceKeyheight = mSpacePreviewIcon.getIntrinsicHeight();
|
||||||
|
|
Loading…
Reference in a new issue