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

Skip to content
Commit aea185f3 authored by Adrian Roos's avatar Adrian Roos
Browse files

AppCompatOverridesService: Remove finalizer and unregistration logic

This has no hope of currently working in production, because
DeviceConfig holds a strong reference to the listener, so the finalizer
never gets called - besides, this is a singleton service in
system_process that shouldn't ever get collected.

During testing, the finalizer is unnecessary for the same reason. The
only way the class can be finalized is if the Context and the
DeviceConfig both are unreachable, but then there's really no need to
unregister anymore.

However, during AppCompatOverridesServiceTest the finalizer invokes
DeviceConfig methods on the finalizer thread concurrently with
non-thread-safe stubbing in TestableDeviceConfig, causing occasional
test flakes (that, due to the combined effect of the bugs at b/399645852
cause every subsequent test in the class to fail).

Bug: 397997489
Test: atest AppCompatOverridesServiceTest
Flag: TEST_ONLY
Change-Id: Ic5ed380286df6cd41c9b1a504e237d320c37080c
parent e01305a7
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