Allow RemoteViews to use BAL privileges
Remoteviews' interaction handler already grants regular BAL privileges
as any interaction with a RemoteViews originates from a user
interaction. It should normally be implied that for an user to interact
with a RemoteViews the view needs to be visible. This does not hold true
for the -1 screen (where it is still visible, but the system does not
track it as visible).
Bug: 296080239
Test: manual test
Change-Id: Iac47e200770fe53a7fb89be15211dd627dbe9558
diff --git a/core/java/android/widget/RemoteViews.java b/core/java/android/widget/RemoteViews.java
index b0e5f777..44ac31a 100644
--- a/core/java/android/widget/RemoteViews.java
+++ b/core/java/android/widget/RemoteViews.java
@@ -6948,6 +6948,7 @@
// something is going to start.
opts.setPendingIntentBackgroundActivityStartMode(
ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED);
+ opts.setPendingIntentBackgroundActivityLaunchAllowedByPermission(true);
return Pair.create(intent, opts);
}
}