[FM] FM icon does not display in the notification bar when FM is playing

    FM powered up -> Select "Start Recording" in options menu
    -> Tap "STOP RECORDING" and "save recording" dialog pops up
    -> Tap Home key and check FM icon in the status bar,
    FM icon will not display in the status bar.

    The fix is to update playing notification when the saving
    dialog is shown.

    Bug 19001738

    Review: https://partner-android-review.git.corp.google.com/#/c/193404

    Signed-off-by: Benson Huang <benson.huang@mediatek.com>

Change-Id: I2edd7c548c736cf58b1e8ae13da3c0b4f62ea031
diff --git a/src/com/android/fmradio/FmRecordActivity.java b/src/com/android/fmradio/FmRecordActivity.java
index 4df42ec..06e4a8b 100644
--- a/src/com/android/fmradio/FmRecordActivity.java
+++ b/src/com/android/fmradio/FmRecordActivity.java
@@ -251,6 +251,11 @@
         // If have stopped recording, need not show notification
         if (!isStopRecording()) {
             mHandler.sendEmptyMessage(MSG_UPDATE_NOTIFICATION);
+        } else if (isSaveDialogShown()) {
+            // Only when save dialog is shown and FM radio is back to background,
+            // it is necessary to update playing notification.
+            // Otherwise, FmMainActivity will update playing notification.
+            mService.updatePlayingNotification();
         }
     }