Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5e1e59ac authored by Nicolo' Mazzucato's avatar Nicolo' Mazzucato
Browse files

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
parent 362738e6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment