diff options
| author | 2022-03-07 14:22:38 +0800 | |
|---|---|---|
| committer | 2022-03-22 17:32:07 +0800 | |
| commit | cfab8e00310a3810933b0f73cbe7bab31daf5f25 (patch) | |
| tree | 5eee744654c572f4f045d0085aa5244228e33b5d /api/api.go | |
| parent | 4ab6dfe71a18e3f1a4c01a244361e932c708f269 (diff) | |
Fix WMS instance leakage of WmTests
It may be common to register a non-static inner class object
to DeviceConfig.addOnPropertiesChangedListener:
WindowManagerConstants
HighRefreshRateDenylist
SplashScreenExceptionList
WindowOrientationListener.OrientationSensorJudge
That may hold reference chain to WindowManagerService.
It may be annoying to add test-only code to dispose them
once a new path is added, so hook the registration to
make sure that all listeners can be released after a test
method is finished.
For test using FakeDeviceConfig, it only registers to
the local fake instance, so it doesn't need to dispose.
Bug: 219640050
Test: atest SystemServicesTestRuleTest
Change-Id: Ic06d85978886caaea3a9eb123a7a59712b58bb92
Merged-In: Ic06d85978886caaea3a9eb123a7a59712b58bb92
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions