am f768d24f: Merge change 22030 into eclair

Merge commit 'f768d24f7d9c01d1e01fdbccc3adc75fda3f8d4b'

* commit 'f768d24f7d9c01d1e01fdbccc3adc75fda3f8d4b':
  Potential fix for NPE at startExtractingText.
This commit is contained in:
Amith Yamasani
2009-08-19 18:50:19 -07:00
committed by Android Git Automerger

View File

@@ -1992,8 +1992,9 @@ public class InputMethodService extends AbstractInputMethodService {
req.flags = InputConnection.GET_TEXT_WITH_STYLES;
req.hintMaxLines = 10;
req.hintMaxChars = 10000;
mExtractedText = getCurrentInputConnection().getExtractedText(req,
InputConnection.GET_EXTRACTED_TEXT_MONITOR);
InputConnection ic = getCurrentInputConnection();
mExtractedText = ic == null? null
: ic.getExtractedText(req, InputConnection.GET_EXTRACTED_TEXT_MONITOR);
final EditorInfo ei = getCurrentInputEditorInfo();