Check null before passing to Integer.parseInt

Just after user data is cleared, user preference associated with
PREF_KEYBOARD_LAYOUT is always empty. In such case, we might
want to return the default value immediately, rather than
calling Integer.parseInt(null) and catching NumberFormatException
unnecessarily.

BUG: 13472379
Change-Id: I8dca9a22780d057013c032bd1f56e730dcada3ce
1 file changed
tree: 234ca8cd14132297511352d0a6c3bcce7942f36e
  1. dictionaries/
  2. java/
  3. native/
  4. tests/
  5. tools/
  6. Android.mk
  7. CleanSpec.mk