diff --git a/LimeStudio/app/src/main/java/net/toload/main/hd/LIMEService.java b/LimeStudio/app/src/main/java/net/toload/main/hd/LIMEService.java index 8c2f482..deccaba 100644 --- a/LimeStudio/app/src/main/java/net/toload/main/hd/LIMEService.java +++ b/LimeStudio/app/src/main/java/net/toload/main/hd/LIMEService.java @@ -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 @@ -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 diff --git a/LimeStudio/app/src/main/java/net/toload/main/hd/SearchServer.java b/LimeStudio/app/src/main/java/net/toload/main/hd/SearchServer.java index 84ca6cf..3670926 100644 --- a/LimeStudio/app/src/main/java/net/toload/main/hd/SearchServer.java +++ b/LimeStudio/app/src/main/java/net/toload/main/hd/SearchServer.java @@ -658,11 +658,10 @@ public List 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());