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
Loading
Please register or sign in to comment