From 71351469e3af45a2ee89b017089f9e850e973a19 Mon Sep 17 00:00:00 2001 From: Brandon Ballinger Date: Tue, 11 Aug 2009 19:22:53 -0700 Subject: [PATCH] Use public SDK APIs for the InputMethodManager and Vibrator. --- src/com/android/inputmethod/latin/LatinIME.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/android/inputmethod/latin/LatinIME.java b/src/com/android/inputmethod/latin/LatinIME.java index 3aa67a0d1..1c0efe327 100644 --- a/src/com/android/inputmethod/latin/LatinIME.java +++ b/src/com/android/inputmethod/latin/LatinIME.java @@ -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; } }