1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-03-01 09:16:00 +00:00

Experiment

This commit is contained in:
M66B 2024-08-07 22:13:05 +02:00
parent 7a4fe34d94
commit 5cde7e7216

View file

@ -70,6 +70,8 @@ import android.text.TextUtils;
import android.view.Display;
import android.view.ViewConfiguration;
import android.view.WindowManager;
import android.view.textservice.SpellCheckerInfo;
import android.view.textservice.TextServicesManager;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
@ -317,6 +319,17 @@ public class DebugHelper {
sb.append(String.format("System: %s\r\n", ll.get(i)));
}
if (BuildConfig.DEBUG && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
try {
TextServicesManager tsm = (TextServicesManager) context.getSystemService(Context.TEXT_SERVICES_MANAGER_SERVICE);
SpellCheckerInfo sci = (tsm == null ? null : tsm.getCurrentSpellCheckerInfo());
if (sci != null)
for (int i = 0; i < sci.getSubtypeCount(); i++)
sb.append(String.format("Spell: %s\r\n", sci.getSubtypeAt(i).getLocale()));
} catch (Throwable ex) {
sb.append(ex).append("\r\n");
}
sb.append("\r\n");
String osVersion = null;