Use public SDK APIs for the InputMethodManager and Vibrator.

This commit is contained in:
Brandon Ballinger 2009-08-11 19:22:53 -07:00 committed by Jean-Baptiste Queru
parent 3263841911
commit 71351469e3

View file

@ -1020,7 +1020,7 @@ public class LatinIME extends InputMethodService
return; return;
} }
if (mVibrator == null) { if (mVibrator == null) {
mVibrator = new Vibrator(); mVibrator = (Vibrator) getSystemService(VIBRATOR_SERVICE);
} }
mVibrator.vibrate(mVibrateDuration); mVibrator.vibrate(mVibrateDuration);
} }
@ -1096,7 +1096,8 @@ public class LatinIME extends InputMethodService
launchSettings(); launchSettings();
break; break;
case POS_METHOD: case POS_METHOD:
InputMethodManager.getInstance(LatinIME.this).showInputMethodPicker(); ((InputMethodManager) getSystemService(INPUT_METHOD_SERVICE))
.showInputMethodPicker();
break; break;
} }
} }