Debug: add/delete LT word to dictionary

This commit is contained in:
M66B
2022-11-07 17:47:16 +01:00
parent 85ebb43d9d
commit b8bdf1ec8b
3 changed files with 76 additions and 2 deletions

View File

@@ -295,6 +295,13 @@ public class LanguageTool {
}
}
static boolean isPremium(Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
String lt_user = prefs.getString("lt_user", null);
String lt_key = prefs.getString("lt_key", null);
return (!TextUtils.isEmpty(lt_user) && !TextUtils.isEmpty(lt_key));
}
private static void checkStatus(HttpsURLConnection connection) throws IOException {
int status = connection.getResponseCode();
if (status != HttpsURLConnection.HTTP_OK) {