Fix issue of hearing ring sound twice.

For subscription where no change in MWI status, keep isRefresh to true
so that no alert sound is heard again, if its already visible.

Bug: 34871334
Change-Id: Ib7e85f83309d9db966dee7a3ad6fe41a8d53b2e6
diff --git a/src/com/android/phone/NotificationMgr.java b/src/com/android/phone/NotificationMgr.java
index da97582..fbb6dc5 100644
--- a/src/com/android/phone/NotificationMgr.java
+++ b/src/com/android/phone/NotificationMgr.java
@@ -453,9 +453,19 @@
     /**
      * Updates the message call forwarding indicator notification.
      *
-     * @param visible true if there are messages waiting
+     * @param visible true if call forwarding enabled
      */
-    /* package */ void updateCfi(int subId, boolean visible) {
+
+     /* package */ void updateCfi(int subId, boolean visible) {
+        updateCfi(subId, visible, false /* isRefresh */);
+    }
+
+    /**
+     * Updates the message call forwarding indicator notification.
+     *
+     * @param visible true if call forwarding enabled
+     */
+    /* package */ void updateCfi(int subId, boolean visible, boolean isRefresh) {
         logi("updateCfi: subId= " + subId + ", visible=" + (visible ? "Y" : "N"));
         if (visible) {
             // If Unconditional Call Forwarding (forward all calls) for VOICE
@@ -493,7 +503,8 @@
                     .setContentText(mContext.getString(R.string.sum_cfu_enabled_indicator))
                     .setShowWhen(false)
                     .setOngoing(true)
-                    .setChannel(NotificationChannelController.CHANNEL_ID_CALL_FORWARD);
+                    .setChannel(NotificationChannelController.CHANNEL_ID_CALL_FORWARD)
+                    .setOnlyAlertOnce(isRefresh);
 
             Intent intent = new Intent(Intent.ACTION_MAIN);
             intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);