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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user