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

Commit 341bfcd2 authored by Christian Hoffmann's avatar Christian Hoffmann Committed by Nolen Johnson
Browse files

Allow BAL for usb debugging notifications

Needed to have notifications working on ATV.

Change-Id: I7fc937bdad7da176cfc725d07ea0898f0232ce5a
parent 7cd423a5
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package android.debug;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.ActivityOptions;
import android.app.Notification;
import android.app.PendingIntent;
import android.content.Context;
@@ -81,8 +82,13 @@ public final class AdbNotifications {
        PendingIntent pIntent = null;
        if (resolveInfo != null) {
            intent.setPackage(resolveInfo.activityInfo.packageName);
            ActivityOptions activityOptions = ActivityOptions.makeBasic();
            activityOptions.setPendingIntentCreatorBackgroundActivityStartMode(
                    ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED);

            pIntent = PendingIntent.getActivityAsUser(context, 0, intent,
                    PendingIntent.FLAG_IMMUTABLE, null, UserHandle.CURRENT);
                    PendingIntent.FLAG_IMMUTABLE, activityOptions.toBundle(),
                    UserHandle.CURRENT);
        }