diff --git a/src/com/android/documentsui/services/FileOperationService.java b/src/com/android/documentsui/services/FileOperationService.java index ca6166a7c31af4cc5fe10176106040c2492265e4..c5981af8f16d8cc24bc00328fddd1e0285627f6e 100644 --- a/src/com/android/documentsui/services/FileOperationService.java +++ b/src/com/android/documentsui/services/FileOperationService.java @@ -95,7 +95,7 @@ public class FileOperationService extends Service implements Job.Listener { // TODO: Move it to a shared file when more operations are implemented. public static final int FAILURE_COPY = 1; - static final String NOTIFICATION_CHANNEL_ID = "channel_id"; + static final String NOTIFICATION_CHANNEL_ID = "file_service_channel_id"; private static final int POOL_SIZE = 2; // "pool size", not *max* "pool size". @@ -170,12 +170,16 @@ public class FileOperationService extends Service implements Job.Listener { } private void setUpNotificationChannel() { - if (features.isNotificationChannelEnabled()) { - NotificationChannel channel = new NotificationChannel( - NOTIFICATION_CHANNEL_ID, - getString(R.string.app_label), - NotificationManager.IMPORTANCE_LOW); - notificationManager.createNotificationChannel(channel); + try{ + if (features.isNotificationChannelEnabled()) { + NotificationChannel channel = new NotificationChannel( + NOTIFICATION_CHANNEL_ID, + getString(R.string.app_label), + NotificationManager.IMPORTANCE_LOW); + notificationManager.createNotificationChannel(channel); + } + }catch (Exception ex){ + Log.w(TAG, "Notification exception : ", ex); } }