Skip to content

Commit

Permalink
issue: fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
plateaukao committed Jun 22, 2022
1 parent 1e827f6 commit f2db62f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
24 changes: 12 additions & 12 deletions LimeStudio/app/src/main/java/net/toload/main/hd/LIMEService.java
Original file line number Diff line number Diff line change
Expand Up @@ -2245,12 +2245,12 @@ public void run() {
} catch (RemoteException e) {
e.printStackTrace();
}
try {
sleep(0);
} catch (InterruptedException ignored) {
ignored.printStackTrace();
return; // terminate thread here, since it is interrupted and more recent getMappingByCode will update the suggestions.
}
// try {
// sleep(0);
// } catch (InterruptedException ignored) {
// ignored.printStackTrace();
// return; // terminate thread here, since it is interrupted and more recent getMappingByCode will update the suggestions.
// }
//Jeremy '11,6,19 EZ and ETEN use "`" as IM Keys, and also custom may use "`".
if (list.size() > 0) {
// Setup sel key display if
Expand All @@ -2276,12 +2276,12 @@ public void run() {
else if (selkeyOption == 2) selkey = mixedModeSelkey + " " + selkey;
}

try {
sleep(0);
} catch (InterruptedException ignored) {
ignored.printStackTrace();
return; // terminate thread here, since it is interrupted and more recent getMappingByCode will update the suggestions.
}
// try {
// sleep(0);
// } catch (InterruptedException ignored) {
// ignored.printStackTrace();
// return; // terminate thread here, since it is interrupted and more recent getMappingByCode will update the suggestions.
// }


// Emoji Control
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -658,11 +658,10 @@ public List<Mapping> getMappingByCode(String code, boolean softkeyboard, boolean
}

}
//codeLengthMap is deprecated and replace by exact match stack scheme '15,6,3 jeremy
//codeLengthMap.add(new Pair<>(code.length(), result.size())); //Jeremy 12,6,2 preserve the code length in each loop.
//if (DEBUG) Log.i(TAG, "getMappingByCode() codeLengthMap code length = " + code.length() + ", result size = " + result.size());

code = code.substring(0, code.length() - 1);
if (!code.isEmpty()) {
code = code.substring(0, code.length() - 1);
}
}
if (DEBUG)
Log.i(TAG, "getMappingByCode() code=" + code + " result.size()=" + result.size());
Expand Down

0 comments on commit f2db62f

Please sign in to comment.