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

Skip to content
Commit b917c9ef authored by Winson Chung's avatar Winson Chung
Browse files

Fix issue with wrong token used for input consumer unregistration

- Calling TIS.onUserUnlocked() will create a new InputConsumerController
  and also call register() on that consumer, which will under the hood
  destroy and create the consumer with WM.  However, if onUserUnlocked()
  is called multiple times (generally not the case), the second call
  will trigger the creation of a new InputConsumerController and try
  to call destroy with the new consumer's token instead of the old
  one, and when it creates a new consumer WM will throw an exception
  complaining that there is already a consumer.

  We should instead use the same input consumer controller instance
  for each registration so that we can destroy with the same token that
  was previously used to create the consumer

Fixes: 313284686
Test: Force trigger onUserUnlocked() multiple times and ensure no crash
Change-Id: I67da9a1ca82568770d470fd94f17378fd50c02f4
parent 8f4e0d0c
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