package="com.hughes.android.dictionary"
- android:versionCode="15"
- android:versionName="3.0.1"
+ android:versionCode="16"
+ android:versionName="3.1"
android:installLocation="preferExternal">
<uses-sdk android:minSdkVersion="4" />
<string name="deleteDictionary">Wörterbuch entfernen</string>
<string name="indexInfo">%1$s: %2$,d Wörter</string>
- <string name="thanksForUpdatingVersion">3.1_a</string>
+ <string name="thanksForUpdatingVersion">3.1_de_a</string>
<!-- DictionaryActivity -->
<string name="searchText">Suchtext</string>
<string name="deleteDictionary">Delete dictionary</string>
<string name="indexInfo">%1$s: %2$,d words</string>
- <string name="thanksForUpdatingVersion">3.1_a</string>
+ <string name="thanksForUpdatingVersion">3.1_en_a</string>
<!-- DictionaryActivity -->
<string name="searchText">Search Text</string>
if (dictRaf == null) {\r
return;\r
}\r
- \r
+\r
+ final SearchOperation searchOperation = currentSearchOperation;\r
+ currentSearchOperation = null;\r
+\r
// Before we close the RAF, we have to wind the current search down.\r
- if (currentSearchOperation != null) {\r
+ if (searchOperation != null) {\r
Log.d(LOG, "Interrupting search to shut down.");\r
- final SearchOperation searchOperation = currentSearchOperation;\r
currentSearchOperation = null;\r
searchOperation.interrupted.set(true);\r
- synchronized (searchOperation) {\r
- while (!searchOperation.done) {\r
- try {\r
- searchOperation.wait();\r
- } catch (InterruptedException e) {\r
- Log.d(LOG, "Interrupted.", e);\r
- }\r
- }\r
- }\r
}\r
\r
try {\r
// --------------------------------------------------------------------------\r
\r
private void onClearSearchTextButton(final Button clearSearchTextButton) {\r
- clearSearchTextButton.requestFocus();\r
- searchText.setText("");\r
- searchText.requestFocus();\r
+ setSearchText("", true);\r
Log.d(LOG, "Trying to show soft keyboard.");\r
final InputMethodManager manager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\r
manager.showSoftInput(searchText, InputMethodManager.SHOW_IMPLICIT);\r
}\r
});\r
}\r
+ } catch (Exception e) {\r
+ Log.e(LOG, "Failure during search (can happen during Activity close.");\r
} finally {\r
synchronized (this) {\r
done = true;\r
}\r
\r
public synchronized Collator getCollator() {\r
- if (collator == null) {\r
+ // Don't think this is thread-safe...\r
+// if (collator == null) {\r
this.collator = Collator.getInstance(locale);\r
this.collator.setStrength(Collator.IDENTICAL);\r
- }\r
+// }\r
return collator;\r
}\r
\r