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

Skip to content
Commit 83bc4f75 authored by Nicolo' Mazzucato's avatar Nicolo' Mazzucato
Browse files

Fix leak in RotationHelper registration to DeviceStateManager

It seems RotationHelper#enable was being called several times, and each "enable" was not matched by a "disabled". This resulted in DeviceStateManager#FoldStateListener having a huge number of callbacks, and eventually it took 500ms for DeviceStateManager to deliver the event to SystemUI.

This avoids creating a new listener every time: the DSM#registerCallback will not register a callback twice.

Flag: None
Fixes: 310584951
Test: checked listeners count after unfolds and rotations
Change-Id: I7e938794031203828bad26a4ee114a9a3b147668
parent 6ed42ea1
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