Skip to content
Commit 15055c70 authored by András Kurucz's avatar András Kurucz
Browse files

Cleanup in ExpandableNotificationRowTest

After adding some new test cases to ExpandableNotificationRowTest we
have noticed an increasing number of leaks of ExpandableNotificationRow.

How did this happen:
 - Mockito was holding onto some ExpandableNotificationRow instances and resetting the inline mocks didn't help to release them
 - NotificationTestHelper has a mock StatusBarStateController
 - NotificationTestHelper creates a real HeadsUpManagerPhone passing in
   the mock StatusBarStateController
 - HeadsUpManagerPhone sets a listener on the mock StatusBarStateController
 - that listener holds onto a NotificationEntry
 - that entry has an ExpandableNotificationRow

This CL:
 - uses a mock HeadsUpManagerPhone
 - removes some unnecessary ExpandableNotificationRow instances from ExpandableNotificationRowTest

Fixes: 265135790
Test: create heap dumps using com.android.systemui.MemoryTrackingTestCase and compare them with go/ahat
Test: atest ExpandableNotificationRowTest
Test: atest SystemUITests

Change-Id: I314a1f6e59f095f8cc6018e3d65bf90bd9cd4a75
Merged-In: I314a1f6e59f095f8cc6018e3d65bf90bd9cd4a75
parent 4677d90f
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