summaryrefslogtreecommitdiff
path: root/libs/androidfw/FileStream.cpp
diff options
context:
space:
mode:
author Nan Wu <wnan@google.com> 2023-05-18 19:31:45 +0000
committer Nan Wu <wnan@google.com> 2023-06-01 12:06:10 +0000
commit31662cb092aa28ae039ec96a8016b0d4db452517 (patch)
tree29cc7b21e47461092bfe6e599e044390a89c7071 /libs/androidfw/FileStream.cpp
parent20c31b7b209a1dde2de42ded6ff866d0798e76a1 (diff)
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
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions