summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorAdrian Roos <roosa@google.com>2017-10-26 14:49:56 +0200
committerAdrian Roos <roosa@google.com>2017-10-27 15:46:40 +0200
commitfb92184ebc7da516b8cb59932e1be6421879fa0a (patch)
tree80b6ec7483063e25a7b5019f71ca70ed6268a2c8 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent9b874662672b4fccdcdb82c963bcc0c7028806f8 (diff)
Notification: Fix PendingIntent whitelisting
Fixes several issues with the way PendingIntents are being whitelisted from background check with Notifications. Most visibly, this causes the whitelisting not to work on Notifications that use the DecoratedContentViewStyle, but there are some conditions where the whitelisting breaks for regular notifications too. - After a Notification is rebuilt with Notification.Builder, the set of PendingIntents in the notification was not rebuilt. This broke the whitelisting whenever a PendingIntent is added after the Notification was already sent once. Workaround for broken platform releases: always use a fresh Notification object, or clone before sending. - Fixes PendingIntent.writePendingIntentOrNullToParcel to invoke the OnMarshalListener. This broke whitelisting for any PendingIntents attached to custom RemoteViews. Workaround for broken platform releases: Also attach the PendingIntent to the Notification's extras. - Changes RemoteViews to keep the parcel cookies that were present during unparceling, such that they can be reapplied when it gets cloned. This broke whitelisting for any PendingIntents attached to a DecoratedContentViewStyle *even if added to extras*. Workaround for broken platform releases: none. - Fixes Notification.whitelistToken mistakenly being static. There's an unlikely race condition where the field could be overriden with null by an incoming notification right as another notification is sent out. Workaround for broken platform releases: none. Test: runtest -x core/tests/coretests/src/android/app/NotificationTest.java && runtest -x core/tests/coretests/src/android/widget/RemoteViewsTest.java Bug: 68218899 Change-Id: I02e44040604a1d24422340611ae9e0332a611800
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions