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

Skip to content
Commit fb220a6f authored by Valentin Iftime's avatar Valentin Iftime
Browse files

Remove WeakReference for Toast next view

 This avoids the view being GCed in low memory situations.
 Only the @Deprecated setView API uses mNextViev so this applies to
 a limited usage base.

 In some stress-test situations, there may be false reports of memory leaks (LeakCanary).
 The root-cause is that the NMS reference to ITransientNotification/TN is not cleaned up immediately after
 the binder call enqueueToast returns - in the case where the maximum number of toasts has been queued for a
 package.

 New unit tests for Toast: android.widget.ToastTest

Flag: android.widget.flags.toast_no_weakref
Test: atest android.widget.ToastTest
Test: atest ToastWindowTest ToastPresenterTest ToastUITest ToastTest NotificationManagerServiceTest
Bug: 321732224
Change-Id: I4aea918911731fdd2ba7c46009a518d30b5caa37
parent 7ca67e0f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment