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

Skip to content
Commit 31662cb0 authored by Nan Wu's avatar Nan Wu
Browse files

Rescind PrintManager BAL privilege

When PrintManager.print is called, it calls PrintMangerService that
creates a PendingIntent to start the print dialog with system uid,
and returns the IntentSender from that PendingIntent. Then PrintManager
starts the returned IntentSender. As a result, any background app
that calls this method could start bring itself to the foreground.
Fix it by passing an ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_DENIED
when PrintManagerService creates the PendingIntent so that its system
privilege is not passed on to any client. Also, the PrintManager adds
MODE_BACKGROUND_ACTIVITY_START_ALLOWED when it calls startIntentSender
so that if the client app is in the foreground, the print dialog will
not be blocked simply because the creator of the PI (system) is in
the background.

Bug: 232799700
Test: Manual test, CTS WorkflowTest and IPrintManagerParametersTest
Change-Id: Iae3f583aae8570e566464f17b8ad7b2024946099
parent 20c31b7b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment