summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2021-04-28 10:12:09 -0700
committerChristopher Tate <ctate@google.com>2021-05-27 12:57:11 -0700
commit10a3ccad5369da34230933630e6887bb2f946465 (patch)
treedfdd4ece1efadbca6a9997647664dded8866448e /tools/aapt2/java/JavaClassGenerator_test.cpp
parent7e5a53a0e5ea8b006768484b66e60e8a2964cc49 (diff)
Fix various FGS notification deferral issues
A number of scenarios involving both FGS and non-FGS notification operations were not yet working as intended. This CL lands the following behaviors: * notify() to update the notification content during an FGS's notification deferral period now respects the new Notification's deferral policy rather than forcing immediate display. An app can now choose whether to force immediate display, or to have the new content be what eventually appears at the end of the deferral period, by using the same builder API as controls the deferral policy for startForeground(). * If an app posts a notification via notify() then adopts that notification with new content (i.e. uses the same notification ID) in a call to startForeground(), there is now no deferral: the existing notification is always updated immediately, regardless of the notification's or the service's configuration viz deferral policy. * Fixed a latent bug when the app called notify() to update the notification after startForeground(), then the service was killed for memory and relaunched. The notification might have been reposted with stale content. * Adjusted the metrics handling to more accurately express "was display of the notification content for this transition to the FGS mode deferred?" Bug: 178406514 Bug: 185771298 Bug: 187860135 Test: atest CtsAppTestCases:android.app.cts.ServiceTest Test: atest CtsAppTestCases:NotificationManagerTest Change-Id: Ieb62f7195eb619c1769e3c1bd518cb6a7b6e4b7c
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions