Skip to content
Snippets Groups Projects
  • Jean Chalard's avatar
    7a94cbd2
    Remove useless code (A25) · 7a94cbd2
    Jean Chalard authored
    isWhitelistedOrNotAWord takes an 'ignoreCase' argument. By looking
    at the contents of the wordcomposer here, there is only one case
    where its output will be different : when the word is typed with a
    capital, but the lower case version exists in the dictionary.
    E.g. the user typed "This".
    
    In this case, isWhitelistedOrNotAWord in line 235 will return false
    instead of true, so the test will score a true instead of a false,
    so hasAutoCorrection may be true instead of false in this specific
    case and that's the only case where it's different.
    
    But in this case, allowsToBeAutoCorrected is certain to be false,
    which means the result will not have changed if hasAutoCorrection
    was true in the first place. So in the end this change is sure not
    to change the behavior.
    
    Change-Id: Ic41cf959c20c19165f84d9b8ff006731fa595d84
    7a94cbd2
    History
    Remove useless code (A25)
    Jean Chalard authored
    isWhitelistedOrNotAWord takes an 'ignoreCase' argument. By looking
    at the contents of the wordcomposer here, there is only one case
    where its output will be different : when the word is typed with a
    capital, but the lower case version exists in the dictionary.
    E.g. the user typed "This".
    
    In this case, isWhitelistedOrNotAWord in line 235 will return false
    instead of true, so the test will score a true instead of a false,
    so hasAutoCorrection may be true instead of false in this specific
    case and that's the only case where it's different.
    
    But in this case, allowsToBeAutoCorrected is certain to be false,
    which means the result will not have changed if hasAutoCorrection
    was true in the first place. So in the end this change is sure not
    to change the behavior.
    
    Change-Id: Ic41cf959c20c19165f84d9b8ff006731fa595d84