[FM] FM icon will disappear after unmounting SD card
Select "Start Recording" in options menu -> Press "Home"
key -> Enter Settings/Storage/Unmount SD card/OK ->Check
the notification bar after unmounting SD card, FM icon will
disappear after unmounting SD card.
The fix is to add the handling of message
FmListener.LISTEN_RECORDSTATE_CHANGED.
Bug 18861474
From: https://partner-android-review.googlesource.com/#/c/192419/1
Change-Id: I39abee765f6eab77865fb1fdb145fb1fb7eb23fe
Signed-off-by: Benson Huang <benson.huang@mediatek.com>
diff --git a/src/com/android/fmradio/FmMainActivity.java b/src/com/android/fmradio/FmMainActivity.java
index ec7baf0..b29761f 100644
--- a/src/com/android/fmradio/FmMainActivity.java
+++ b/src/com/android/fmradio/FmMainActivity.java
@@ -322,6 +322,12 @@
boolean isSpeakerMode = bundle.getBoolean(FmListener.KEY_IS_SPEAKER_MODE);
break;
+ case FmListener.LISTEN_RECORDSTATE_CHANGED:
+ if (mService != null) {
+ mService.updatePlayingNotification();
+ }
+ break;
+
default:
break;
}