summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java8
-rw-r--r--java/com/android/voicemail/VoicemailClient.java6
-rw-r--r--java/com/android/voicemail/impl/sms/LegacyModeSmsHandler.java1
3 files changed, 12 insertions, 3 deletions
diff --git a/java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java b/java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java
index a81d8665a..d681df205 100644
--- a/java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java
+++ b/java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java
@@ -32,6 +32,7 @@ import com.android.dialer.common.Assert;
import com.android.dialer.common.LogUtil;
import com.android.dialer.common.PerAccountSharedPreferences;
import com.android.dialer.util.DialerUtils;
+import com.android.voicemail.VoicemailClient;
import com.android.voicemail.VoicemailComponent;
/**
@@ -105,9 +106,10 @@ public class LegacyVoicemailNotificationReceiver extends BroadcastReceiver {
return;
}
- if (VoicemailComponent.get(context)
- .getVoicemailClient()
- .isActivated(context, phoneAccountHandle)) {
+ if (!intent.getBooleanExtra(VoicemailClient.EXTRA_IS_LEGACY_MODE, false)
+ && VoicemailComponent.get(context)
+ .getVoicemailClient()
+ .isActivated(context, phoneAccountHandle)) {
LogUtil.i(
"LegacyVoicemailNotificationReceiver.onReceive",
"visual voicemail is activated, ignoring notification");
diff --git a/java/com/android/voicemail/VoicemailClient.java b/java/com/android/voicemail/VoicemailClient.java
index 21846a480..d52a67a8e 100644
--- a/java/com/android/voicemail/VoicemailClient.java
+++ b/java/com/android/voicemail/VoicemailClient.java
@@ -55,6 +55,12 @@ public interface VoicemailClient {
"com.android.voicemail.VoicemailClient.ACTION_SHOW_LEGACY_VOICEMAIL";
/**
+ * Boolean extra send with {@link #ACTION_SHOW_LEGACY_VOICEMAIL}, indicating that the notification
+ * is sent by legacy mode and should not be suppressed even when VVM is activated
+ */
+ String EXTRA_IS_LEGACY_MODE = "is_legacy_mode";
+
+ /**
* Secret code to launch the voicemail config activity intended for OEMs and Carriers. {@code
* *#*#VVMCONFIG#*#*}
*/
diff --git a/java/com/android/voicemail/impl/sms/LegacyModeSmsHandler.java b/java/com/android/voicemail/impl/sms/LegacyModeSmsHandler.java
index 5decf6376..e902825c0 100644
--- a/java/com/android/voicemail/impl/sms/LegacyModeSmsHandler.java
+++ b/java/com/android/voicemail/impl/sms/LegacyModeSmsHandler.java
@@ -79,6 +79,7 @@ public class LegacyModeSmsHandler {
VvmLog.i(TAG, "sending voicemail notification");
Intent intent = new Intent(VoicemailClient.ACTION_SHOW_LEGACY_VOICEMAIL);
intent.setPackage(context.getPackageName());
+ intent.putExtra(VoicemailClient.EXTRA_IS_LEGACY_MODE, true);
intent.putExtra(TelephonyManager.EXTRA_PHONE_ACCOUNT_HANDLE, phoneAccountHandle);
// Setting voicemail message count to non-zero will show the telephony voicemail
// notification, and zero will clear it.