Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79d6a9aa authored by Wenyi Wang's avatar Wenyi Wang Committed by android-build-merger
Browse files

Create channel if channel is not available

am: 156fc9f6

Change-Id: I270ef04e34ba79c19f21175208d180444b117ac9
parents 039965ca 156fc9f6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -153,6 +153,7 @@ public class SimImportService extends Service {

    @Override
    public int onStartCommand(Intent intent, int flags, final int startId) {
        ContactsNotificationChannelsUtil.createDefaultChannel(this);
        final ImportTask task = createTaskForIntent(intent, startId);
        if (task == null) {
            new StopTask(this, startId).executeOnExecutor(mExecutor);
+4 −0
Original line number Diff line number Diff line
@@ -220,6 +220,7 @@ public class NotificationImportExportListener implements VCardImportExportListen
                .appendQueryParameter(CancelActivity.TYPE, String.valueOf(type)).build();
        intent.setData(uri);

        ContactsNotificationChannelsUtil.createDefaultChannel(context);
        final NotificationCompat.Builder builder = new NotificationCompat.Builder(context);
        builder.setOngoing(true)
                .setChannel(ContactsNotificationChannelsUtil.DEFAULT_CHANNEL)
@@ -247,6 +248,7 @@ public class NotificationImportExportListener implements VCardImportExportListen
     */
    /* package */ static Notification constructCancelNotification(
            Context context, String description) {
        ContactsNotificationChannelsUtil.createDefaultChannel(context);
        return new NotificationCompat.Builder(context)
                .setChannel(ContactsNotificationChannelsUtil.DEFAULT_CHANNEL)
                .setAutoCancel(true)
@@ -278,6 +280,7 @@ public class NotificationImportExportListener implements VCardImportExportListen
     */
    /* package */ static Notification constructFinishNotificationWithFlags(
            Context context, String title, String description, Intent intent, int flags) {
        ContactsNotificationChannelsUtil.createDefaultChannel(context);
        return new NotificationCompat.Builder(context)
                .setChannel(ContactsNotificationChannelsUtil.DEFAULT_CHANNEL)
                .setAutoCancel(true)
@@ -302,6 +305,7 @@ public class NotificationImportExportListener implements VCardImportExportListen
     */
    /* package */ static Notification constructImportFailureNotification(
            Context context, String reason) {
        ContactsNotificationChannelsUtil.createDefaultChannel(context);
        return new NotificationCompat.Builder(context)
                .setChannel(ContactsNotificationChannelsUtil.DEFAULT_CHANNEL)
                .setAutoCancel(true)