mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-19 07:30:53 +00:00
mark some getText methods as nullable and avoid related issues
fixes one of the crashes in #723
This commit is contained in:
parent
9a893d8e22
commit
da467a6751
3 changed files with 19 additions and 18 deletions
|
@ -2131,7 +2131,8 @@ public final class InputLogic {
|
|||
if (settingsValues.mUrlDetectionEnabled && settingsValues.mSpacingAndPunctuations.containsSometimesWordConnector(mWordComposer.getTypedWord()))
|
||||
return true;
|
||||
// "://" before typed word -> very much looks like URL
|
||||
if (mConnection.getTextBeforeCursor(mWordComposer.getTypedWord().length() + 3, 0).toString().startsWith("://"))
|
||||
final CharSequence textBeforeCursor = mConnection.getTextBeforeCursor(mWordComposer.getTypedWord().length() + 3, 0);
|
||||
if (textBeforeCursor != null && textBeforeCursor.toString().startsWith("://"))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue