mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
am bdbefac0: am 263749f2: am 37deb112: Fix IndexOutOfBoundsException
* commit 'bdbefac0b471e8a70c5d4958b8d1a345777d6bdb': Fix IndexOutOfBoundsException
This commit is contained in:
commit
8d828fc449
@ -349,8 +349,10 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View view) {
|
public boolean onLongClick(View view) {
|
||||||
int index = (Integer) view.getTag();
|
final int index = (Integer) view.getTag();
|
||||||
CharSequence word = mSuggestions.getWord(index);
|
if (index >= mSuggestions.size())
|
||||||
|
return true;
|
||||||
|
final CharSequence word = mSuggestions.getWord(index);
|
||||||
if (word.length() < 2)
|
if (word.length() < 2)
|
||||||
return false;
|
return false;
|
||||||
addToDictionary(word);
|
addToDictionary(word);
|
||||||
@ -359,8 +361,10 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
int index = (Integer) view.getTag();
|
final int index = (Integer) view.getTag();
|
||||||
CharSequence word = mSuggestions.getWord(index);
|
if (index >= mSuggestions.size())
|
||||||
|
return;
|
||||||
|
final CharSequence word = mSuggestions.getWord(index);
|
||||||
if (mShowingAddToDictionary && index == 0) {
|
if (mShowingAddToDictionary && index == 0) {
|
||||||
addToDictionary(word);
|
addToDictionary(word);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user