diff options
author | Bernardo Rufino <brufino@google.com> | 2020-12-03 14:23:54 +0000 |
---|---|---|
committer | Bernardo Rufino <brufino@google.com> | 2021-01-05 22:34:27 +0000 |
commit | 515e88cbc33b28bf1006e427f61b883ff234c9ed (patch) | |
tree | 3dd9240a4676194a1b136fc6904b4969f3f46bb7 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java | |
parent | 7b14bd63326b336f2bd471b15586c907d9aa7eae (diff) |
Allow Intent.ACSD for notification action trampolines for targetSdk < S
This is the major use-case for Intent.ACTION_CLOSE_SYSTEM_DIALOGS
internally. That is, since the notification shade is not automatically
closed when the user taps a notification action whose pending intent
(PI) is not an activity PI, the app sends Intent.ACSD before starting
the activity in the trampoline. This is a legit use-case with a lot of
usages internally (and even externally if we use Stack Overflow as a
proxy), so we will allow this case for apps targeting SDK level < S.
For targetSdk S+, trampolines are blocked, so there is no valid use for
sending Intent.ACSD.
In the implementation we piggy-back on the trampoline callback, but in
this case since we're *allowing* instead of *blocking*, we allow the app
to close system dialogs when any of the tokens that allow activity
starts is the notification token, meaning that if we consider that the
app is processing a notification broadcast receiver or service, we allow
it to send Intent.ACSD assuming trampolines are not blocked (ie. that
the app targets SDK level < S).
Bug: 159105552
Test: atest CtsAppTestCases:android.app.cts.CloseSystemDialogsTest
Change-Id: Id29991ad8c7f2c6c3dca0d2d689b903de8b0ec81
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions