summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorBernardo Rufino <brufino@google.com>2021-01-05 12:48:57 +0000
committerBernardo Rufino <brufino@google.com>2021-01-12 10:32:11 +0000
commitd69bd6a271bb32c3f48a0f8352010d144fac7b43 (patch)
treefd8d9d9520b2a36887a869da01d0028ca477be71 /tools/aapt2/java/JavaClassGenerator.cpp
parent8dd46b0ef1a790523f96294077eac9f05abe203a (diff)
[Attempt #2] Restrict {AM,WM}.closeSystemDialogs()
Second attempt at ag/13297639. Recents uses AM.closeSystemDialogs() and I had forgotten to give it the proper permission, so it broke a few tests (b/177228919). Permission is given in ag/13318845. Will only submit this CL with CtsWindowManagerDeviceTestCases passing. -- Original CL description (added "Test:" line) As part of locking down Intent.ACTION_CLOSE_SYSTEM_DIALOGS, we need to protect AM.closeSystemDialogs() too (which ends up calling the broadcast under the system UID). We should also protect WM.closeSystemDialogs(), which is slightly different in that it asks windows/views to close themselves, for the same reasons that we protected the intent and for consistency too. Check go/close-system-dialogs for details on the general effort. To achieve this we move the logic from AM to WM, since we can't call out from WM to AM. Part of the logic was already in WM (the trampoline case), so I mostly moved code from AMS to wm.ATMS. The part I had to wire from AM was the sourceUid of the instrumentation, but that fit nicely since we had to pipe similar information before for BAL too. Bug: 159105552 Test: atest CtsAppTestCases:android.app.cts.CloseSystemDialogsTest Test: Run CtsWindowManagerDeviceTestCases Change-Id: I4c44b11b8e7d4474c0c7ff472dbe63f743d7ff36
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions