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
2 files changed