@@ -64,9+64,9 @@ public enum DictionaryApplication {
// Leave it enabled by default for correctness except
// for my known broken development/performance test device config.
//static public final boolean USE_COLLATOR = !android.os.Build.FINGERPRINT.equals("Samsung/cm_tassve/tassve:4.4.4/KTU84Q/20150211:userdebug/release-keys");
// Leave it enabled by default for correctness except
// for my known broken development/performance test device config.
//static public final boolean USE_COLLATOR = !android.os.Build.FINGERPRINT.equals("Samsung/cm_tassve/tassve:4.4.4/KTU84Q/20150211:userdebug/release-keys");
- static public final boolean USE_COLLATOR = true;
+ public static final boolean USE_COLLATOR = true;
- static public final TransliteratorManager.ThreadSetup threadBackground = new TransliteratorManager.ThreadSetup() {
+ public static final TransliteratorManager.ThreadSetup threadBackground = new TransliteratorManager.ThreadSetup() {
@Override
public void onThreadStart() {
// THREAD_PRIORITY_BACKGROUND seemed like a good idea, but it
@Override
public void onThreadStart() {
// THREAD_PRIORITY_BACKGROUND seemed like a good idea, but it
@@ -157,7+157,7 @@ public enum DictionaryApplication {
}
try {
reader.close();
}
try {
reader.close();
- } catch (IOException e) {}
+ } catch (IOException ignored) {}
}
public synchronized void init(Context c) {
}
public synchronized void init(Context c) {
@@ -256,7+256,7 @@ public enum DictionaryApplication {
File efd = null;
try {
efd = appContext.getExternalFilesDir(null);
File efd = null;
try {
efd = appContext.getExternalFilesDir(null);
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
if (efd != null) {
efd.mkdirs();
}
if (efd != null) {
efd.mkdirs();
@@ -289,13+289,13 @@ public enum DictionaryApplication {
return dictDir;
}
return dictDir;
}
- static public boolean checkFileCreate(File dir) {
+ public static boolean checkFileCreate(File dir) {
boolean res = false;
File testfile = new File(dir, "quickdic_writetest");
try {
testfile.delete();
res = testfile.createNewFile() & testfile.delete();
boolean res = false;
File testfile = new File(dir, "quickdic_writetest");
try {
testfile.delete();
res = testfile.createNewFile() & testfile.delete();
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
return res;
}
}
return res;
}
@@ -311,9+311,15 @@ public enum DictionaryApplication {
public Theme getSelectedTheme() {
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(appContext);
public Theme getSelectedTheme() {
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(appContext);
- final String theme = prefs.getString(appContext.getString(R.string.themeKey), "themeLight");
+ final String theme = prefs.getString(appContext.getString(R.string.themeKey), "themeSystem");
if (theme.equals("themeLight")) {
return Theme.LIGHT;
if (theme.equals("themeLight")) {
return Theme.LIGHT;
+ } else if (theme.equals("themeSystem")) {
+ int mode = (appContext.getResources().getConfiguration().uiMode &