summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormosimchah <mosimchah@gmail.com>2026-01-11 05:13:07 -0500
committermosimchah <mosimchah@gmail.com>2026-01-11 05:13:07 -0500
commitb3e8f0d7457f326834c3548dfeed31365ff64b37 (patch)
treed56d5fc95482107e6ac09876c4b43b5a4e18a9e2
parent30a86340923312cffdd8d263011246e3a5e4be11 (diff)
parent341bfcd24340c72ac44fca0dee544b976ec9b134 (diff)
Merge branch 'lineage-23.1' of https://github.com/LineageOS/android_frameworks_base into HEADw16.1
* 'lineage-23.1' of https://github.com/LineageOS/android_frameworks_base: Allow BAL for usb debugging notifications Change-Id: I4d4464fed84a9c403db1c9adafa9164139e2e42a
-rw-r--r--core/java/android/debug/AdbNotifications.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/java/android/debug/AdbNotifications.java b/core/java/android/debug/AdbNotifications.java
index 59497943b725..7be425375542 100644
--- a/core/java/android/debug/AdbNotifications.java
+++ b/core/java/android/debug/AdbNotifications.java
@@ -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);
}