Skip to content
Snippets Groups Projects
  • Jean Chalard's avatar
    3b4c1d30
    Change a heuristic and add a log. · 3b4c1d30
    Jean Chalard authored
    The heuristic in RichInputConnection makes little sense
    when textLength > mExpectedSelStart but we have
    more than 1024 characters of text. If there are that many,
    it's about 100% sure that 1024 is not the correct cursor
    position. With no good guess, we'll just continue trusting
    the app, even though we know it's lying : at least it will
    make the problem visible to the app author.
    
    Also, there have been a lot of confusion about initialSelStart
    and initialSelEnd. The keyboard should log them so that
    it helps us and editor authors debug more easily these
    common problems.
    
    Issue #65170 in AOSP and
    Bug: 12772035
    Change-Id: I6665a16c9f2832d33ee323f033bb38bcc092a3b4
    3b4c1d30
    History
    Change a heuristic and add a log.
    Jean Chalard authored
    The heuristic in RichInputConnection makes little sense
    when textLength > mExpectedSelStart but we have
    more than 1024 characters of text. If there are that many,
    it's about 100% sure that 1024 is not the correct cursor
    position. With no good guess, we'll just continue trusting
    the app, even though we know it's lying : at least it will
    make the problem visible to the app author.
    
    Also, there have been a lot of confusion about initialSelStart
    and initialSelEnd. The keyboard should log them so that
    it helps us and editor authors debug more easily these
    common problems.
    
    Issue #65170 in AOSP and
    Bug: 12772035
    Change-Id: I6665a16c9f2832d33ee323f033bb38bcc092a3b4
RichInputConnection.java 42.53 KiB