Merge change 22030 into eclair

* changes:
  Potential fix for NPE at startExtractingText.
This commit is contained in:
Android (Google) Code Review
2009-08-19 18:47:37 -07:00

View File

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