DroidPluginTeam / DroidPluginTeam/DroidPlugin
Inappropriate plugin service closure (VoiceService in whatsapp)
- Dominant language
- Java
- Stars
- 7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
While trying to wrap **whatsapp** I am having the following problem:
Continuous call to _handleOnStartOne()_ method inside ServcesManager for the same Service
will cause startId to grow each time by one. So when it is time for the service to stop properly (i.e. when calling to _stopServiceToken(..., startId)_), the code that handles the appropriate closure will be skipped:
_handleOnUnbindOne(intent);
handleOnDestroyOne(info);_
So if this Service needs to do some special arrangements when calling stopSelf(), it won't do it.
In the case of **whatsapp** the service name is VoiceService, and this phenomena is happening after trying to perform phone call so that _onStartCommand()_ of this service will be called continuously as long as there is no Answer.
I can solve this specific problem by preventing from startId to grow, but I am afraid to do damage to other scenarios.
Thanks
Ackstein
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.