FM: Catching exception in call to deleteNotificationChannel
Caught the exception in call to deleteNotificationChannel
during FM turn off
Change-Id: I7c8b2781ef439fa1ba218e82d61944451a8fa746
diff --git a/fmapp2/src/com/caf/fmradio/FMRadioService.java b/fmapp2/src/com/caf/fmradio/FMRadioService.java
index 7e36323..c88fa1a 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadioService.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadioService.java
@@ -1740,7 +1740,11 @@
(NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
if((notificationManager != null)
&& (notificationManager.getNotificationChannel(FMRADIO_NOTIFICATION_CHANNEL) != null)) {
- notificationManager.deleteNotificationChannel(FMRADIO_NOTIFICATION_CHANNEL);
+ try {
+ notificationManager.deleteNotificationChannel(FMRADIO_NOTIFICATION_CHANNEL);
+ } catch (Exception e) {
+ Log.e(LOGTAG,"exception raised from deleteNotificationChannel");
+ }
}
}
}