mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 21:58:52 +02:00
Refactoring
This commit is contained in:
@@ -127,15 +127,19 @@ public class TextHelper {
|
||||
}
|
||||
}
|
||||
|
||||
static String transliterate(Context context, String text) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q)
|
||||
return text;
|
||||
|
||||
static String transliterateNotification(Context context, String text) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean notify_transliterate = prefs.getBoolean("notify_transliterate", false);
|
||||
if (!notify_transliterate)
|
||||
return text;
|
||||
|
||||
return transliterate(context, text);
|
||||
}
|
||||
|
||||
static String transliterate(Context context, String text) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q)
|
||||
return text;
|
||||
|
||||
try {
|
||||
// http://userguide.icu-project.org/transforms/general
|
||||
return Transliterator.getInstance(TRANSLITERATOR).transliterate(text);
|
||||
|
||||
Reference in New Issue
Block a user