Fix MWI missing on blocked VVM3 SIM am: 41fb43ee2e
am: 1960d2996c
Change-Id: I53a86bd1c6a3ab3e479196aebf759419855a7e10
diff --git a/src/com/android/phone/NotificationMgr.java b/src/com/android/phone/NotificationMgr.java
index 0932cce..9504f34 100644
--- a/src/com/android/phone/NotificationMgr.java
+++ b/src/com/android/phone/NotificationMgr.java
@@ -47,13 +47,11 @@
import android.util.ArrayMap;
import android.util.Log;
import android.widget.Toast;
-
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.TelephonyCapabilities;
+import com.android.phone.settings.VoicemailNotificationSettingsUtil;
import com.android.phone.settings.VoicemailSettingsActivity;
import com.android.phone.vvm.omtp.sync.VoicemailStatusQueryHelper;
-import com.android.phone.settings.VoicemailNotificationSettingsUtil;
-
import java.util.Iterator;
import java.util.List;
import java.util.Set;
@@ -231,8 +229,13 @@
if (visible && phone != null) {
VoicemailStatusQueryHelper queryHelper = new VoicemailStatusQueryHelper(mContext);
PhoneAccountHandle phoneAccount = PhoneUtils.makePstnPhoneAccountHandle(phone);
- if (queryHelper.isNotificationsChannelActive(phoneAccount)) {
- Log.v(LOG_TAG, "Notifications channel active for visual voicemail, hiding mwi.");
+ if (queryHelper.isVoicemailSourceConfigured(phoneAccount)) {
+ Log.v(LOG_TAG, "Source configured for visual voicemail, hiding mwi.");
+ // MWI may not be suppressed if the PIN is not set on VVM3 because it is also a
+ // "Not OK" configuration state. But VVM3 never send a MWI after the service is
+ // activated so this should be fine.
+ // TODO(twyen): once unbundled the client should be able to set a flag to suppress
+ // MWI, instead of letting the NotificationMgr try to interpret the states.
visible = false;
}
}