summaryrefslogtreecommitdiffstats
path: root/java/com/android/dialer/app/voicemail
diff options
context:
space:
mode:
authortwyen <twyen@google.com>2017-09-01 11:24:02 -0700
committerEric Erfanian <erfanian@google.com>2017-09-07 15:48:17 +0000
commit54bad9a608455c39cf524e8d414c2ca4c903973a (patch)
tree35e2812af00a4de758e8eb734fef36f11cc01d76 /java/com/android/dialer/app/voicemail
parentdc6e00fac8ff2e288e42094c77d66a61987b0cd2 (diff)
downloadandroid_packages_apps_Dialer-54bad9a608455c39cf524e8d414c2ca4c903973a.tar.gz
android_packages_apps_Dialer-54bad9a608455c39cf524e8d414c2ca4c903973a.tar.bz2
android_packages_apps_Dialer-54bad9a608455c39cf524e8d414c2ca4c903973a.zip
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
Diffstat (limited to 'java/com/android/dialer/app/voicemail')
-rw-r--r--java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java6
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()) {