From 54bad9a608455c39cf524e8d414c2ca4c903973a Mon Sep 17 00:00:00 2001 From: twyen Date: Fri, 1 Sep 2017 11:24:02 -0700 Subject: Ignore invalid action for LegacyVociemailNotificationReceiver Somehow a null action will be sent to the receiver. Bug: 64934925 Test: LegacyVoicemailNotificationReceiveverTest PiperOrigin-RevId: 167300542 Change-Id: Ifa001d102d265e1dad42806b48f0a1710d05b195 --- .../dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'java/com/android/dialer/app') diff --git a/java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java b/java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java index d681df205..4e43704f1 100644 --- a/java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java +++ b/java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java @@ -55,6 +55,12 @@ public class LegacyVoicemailNotificationReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { + + if (!TelephonyManager.ACTION_SHOW_VOICEMAIL_NOTIFICATION.equals(intent.getAction()) + && !VoicemailClient.ACTION_SHOW_LEGACY_VOICEMAIL.equals(intent.getAction())) { + return; + } + LogUtil.i( "LegacyVoicemailNotificationReceiver.onReceive", "received legacy voicemail notification"); if (!BuildCompat.isAtLeastO()) { -- cgit v1.2.3