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

Commit 860b4f6f authored by Achim Thesmann's avatar Achim Thesmann
Browse files

Allow RemoteViews to start Activities via PI

A remoteview shows an UI rendered by another app and allows starting
that app's Activity. Since that App probably does not possess BAL
permissions the App showing the RemoteView needs to grant its
permissions.

Bug: 269240329
Test: manual testing with feature enabled
Change-Id: Ic2ec605631654cead5cb6cf47c4d0125b0765b7a
(cherry picked from commit cbef1ced)
parent ca9e2463
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -6717,6 +6717,10 @@ public class RemoteViews implements Parcelable, Filter {
                Log.w(LOG_TAG, "getLaunchOptions: view.getDisplay() is null!",
                        new Exception());
            }
            // If the user interacts with a visible element it is safe to assume they consent that
            // something is going to start.
            opts.setPendingIntentBackgroundActivityStartMode(
                    ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED);
            return Pair.create(intent, opts);
        }
    }