diff options
author | twyen <twyen@google.com> | 2017-09-01 11:24:02 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-09-07 15:48:17 +0000 |
commit | 54bad9a608455c39cf524e8d414c2ca4c903973a (patch) | |
tree | 35e2812af00a4de758e8eb734fef36f11cc01d76 | |
parent | dc6e00fac8ff2e288e42094c77d66a61987b0cd2 (diff) |
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
-rw-r--r-- | java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java | 6 |
1 files changed, 6 insertions, 0 deletions
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()) { |