summaryrefslogtreecommitdiff
path: root/java/com/android/voicemail
diff options
context:
space:
mode:
authortwyen <twyen@google.com>2017-06-21 13:50:47 -0700
committerEric Erfanian <erfanian@google.com>2017-06-21 15:59:10 -0700
commitf352f34e17401a5ab27d14aab2d939b3a12004df (patch)
treeca7937229dc785cd21012cf3cded3d96bd42208d /java/com/android/voicemail
parent64ba7ccfacc75e0733de64c4df2be9f25aa811cb (diff)
Fix assert when OmtpMessageSender received an invalid VVM config
b/62666193 is one of the top crashers, the assert that the VVM config is valid has failed. This is likely caused by the PhoneAccountHandle being invalid. While the PhoneAccountHandle must be valid when the broadcast is made, the SIM might have been removed and invalidated the PhoneAccountHandle when the broadcast is still in flight. In this CL the validity is checked first. PiperOrigin-RevId: 159737846 Change-Id: Iae5a65978879fd1bfdf726008e8b6463499c99e8
Diffstat (limited to 'java/com/android/voicemail')
-rw-r--r--java/com/android/voicemail/impl/sms/OmtpMessageReceiver.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/java/com/android/voicemail/impl/sms/OmtpMessageReceiver.java b/java/com/android/voicemail/impl/sms/OmtpMessageReceiver.java
index ef0bf10e9..1cf37370c 100644
--- a/java/com/android/voicemail/impl/sms/OmtpMessageReceiver.java
+++ b/java/com/android/voicemail/impl/sms/OmtpMessageReceiver.java
@@ -71,6 +71,10 @@ public class OmtpMessageReceiver extends BroadcastReceiver {
}
OmtpVvmCarrierConfigHelper helper = new OmtpVvmCarrierConfigHelper(mContext, phone);
+ if (!helper.isValid()) {
+ VvmLog.e(TAG, "vvm config no longer valid");
+ return;
+ }
if (!VisualVoicemailSettingsUtil.isEnabled(mContext, phone)) {
if (helper.isLegacyModeEnabled()) {
LegacyModeSmsHandler.handle(context, sms);