String getText() {
   String text = "";
   try {
     InputConnection conn = getCurrentInputConnection();
     ExtractedTextRequest req = new ExtractedTextRequest();
     req.hintMaxChars = 1000000;
     req.hintMaxLines = 10000;
     req.flags = 0;
     req.token = 1;
     text = conn.getExtractedText(req, 0).text.toString();
   } catch (Throwable t) {
   }
   return text;
 }
 {
   req.hintMaxChars = 100000;
   req.hintMaxLines = 10000;
 }