diff options
| author | 2025-01-09 23:28:57 +0000 | |
|---|---|---|
| committer | 2025-01-13 10:44:29 +0000 | |
| commit | 5e1e59acb5f855eaa69172e1350ac049077c7634 (patch) | |
| tree | 80e129bee69073166823f58ca0d76f12548d241d /libs/androidfw/FileStream.cpp | |
| parent | 362738e68394545cd0fed701a9e808afe202e015 (diff) | |
Fix Notification inflation on secondary displays
RemoteViews from notifications are inflated using an application context (see NotificationRowContentBinderImpl#doInBackgroundInternal).
On the notification side, StatusBarNotification.getPackageContext caches the context until StatusBarNotification.clearPackageContext is called. While this is reasonable in the case of a single display, it breaks notifications moving across displays, as if the first call was done with the default display (e.g. from StatusbarIconView.getIcon), and the second from the shade (e.g. NotificationRowContentBinderImpl#doInBackgroundInternal), this would result in notifications being inflated with the first cached context (which is wrong, as it might have the wrong density).
In StatusBarNotification we will have a per display id cache of application context.
Everything new is under the flag.
Bug: 362719719
Bug: 388886443
Test: StatusBarNotificationTest
Flag: com.android.window.flags.enable_per_display_package_context_cache_in_statusbar_notif
Change-Id: Ife87ad95bb6cf4199b06d5a58a5fb4713e44b835
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions