Fix crash when entering chats on devices with odd security enforcement.

This commit is contained in:
Cody Henthorne 2022-02-01 14:47:53 -05:00
parent 1b1001b0e9
commit 7e299157ec

View file

@ -42,7 +42,7 @@ public class SmsCharacterCalculator extends CharacterCalculator {
charactersSpent = messageBody.length();
charactersRemaining = 1000;
} catch (RuntimeException e) {
if (e.getCause() instanceof SecurityException) {
if (e instanceof SecurityException || e.getCause() instanceof SecurityException) {
Log.e(TAG, "Security Exception", e);
messagesSpent = 1;
charactersSpent = messageBody.length();