mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-08 01:45:32 +00:00
Merge pull request #7676 from keymanapp/chore/android/less-toast-on-stable
chore(android/engine): Don't show Toast errors on stable tier
This commit is contained in:
commit
aa2efd9fb2
1 changed files with 8 additions and 2 deletions
|
|
@ -8,6 +8,8 @@ import android.util.Log;
|
|||
import android.widget.Toast;
|
||||
|
||||
import com.tavultesoft.kmea.BaseActivity;
|
||||
import com.tavultesoft.kmea.BuildConfig;
|
||||
import com.tavultesoft.kmea.KMManager;
|
||||
|
||||
import io.sentry.Sentry;
|
||||
import io.sentry.SentryLevel;
|
||||
|
|
@ -39,7 +41,9 @@ public final class KMLog {
|
|||
if (msg != null && !msg.isEmpty()) {
|
||||
Log.e(tag, msg);
|
||||
|
||||
BaseActivity.makeToast(null, msg, Toast.LENGTH_LONG);
|
||||
if (KMManager.getTier(BuildConfig.KEYMAN_ENGINE_VERSION_NAME) != KMManager.Tier.STABLE) {
|
||||
BaseActivity.makeToast(null, msg, Toast.LENGTH_LONG);
|
||||
}
|
||||
|
||||
if (Sentry.isEnabled()) {
|
||||
Sentry.captureMessage(msg, SentryLevel.ERROR);
|
||||
|
|
@ -62,7 +66,9 @@ public final class KMLog {
|
|||
}
|
||||
Log.e(tag, errorMsg, e);
|
||||
|
||||
BaseActivity.makeToast(null, errorMsg, Toast.LENGTH_LONG);
|
||||
if (KMManager.getTier(BuildConfig.KEYMAN_ENGINE_VERSION_NAME) != KMManager.Tier.STABLE) {
|
||||
BaseActivity.makeToast(null, errorMsg, Toast.LENGTH_LONG);
|
||||
}
|
||||
|
||||
if (Sentry.isEnabled()) {
|
||||
Sentry.addBreadcrumb(errorMsg);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue