Use public SDK APIs for the InputMethodManager and Vibrator.

main
Brandon Ballinger 2009-08-11 19:22:53 -07:00 committed by Jean-Baptiste Queru
parent 3263841911
commit 71351469e3
1 changed files with 3 additions and 2 deletions

View File

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