DroidPluginTeam / DroidPluginTeam/DroidPlugin

Inappropriate plugin service closure (VoiceService in whatsapp)

Open
#417 0 comments 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.