So I finally tracked down the issue with the help of
@OliverA .
On a onePlus phone with Oxygen14 (SDK34) when you request a partial lock, you are granted the lock. However the implementation that One Plus have used is you get 299,300 ms of time.
OplusWakeLockInfo { binderhash=23079791, flags=1, tag=B4A-Partial,
duration=299300, starttime=413139511, packageName='com.islesystems.criticalmessenger', uid=10299, pid=29923}
When this time expires, your application is terminated beacuse you exceeded the allocated lock time. I have scoured the net and this rule does not appear anywhere. When I removed the partiallock, the application worked as expected.
In the FGS there is timer that tick's every second. From analyzing the logs and events that we send to one of our servers, I noticed that over a 10 minute period the timer lost 28 ticks out of 60(seconds)*10(mins) 600(seconds,10 mins) which is totally acceptable and did not impact the applications funtion.
I dont know if other manufacturers will go down the same route. If a partial lock is really needed, you could PL for 60 seconds, release for 10 seconds and PL again. This is probably a possible solution.
As
@Erel pointed out Partial Locks have absolutly nothing to do with FGS(ForeGroundServices).
Regards
John.
P.S
Delighted to close this issue