Shadow icon indicating copy to clipboard operation
Shadow copied to clipboard

关于Service解绑时onServiceDisconnected调用的疑问

Open jacobchow opened this issue 2 years ago • 1 comments

https://github.com/Tencent/Shadow/pull/935/files
这笔提交中在正常解绑service时回调了onServiceDisconnected,但是按官方文档说法,此回调只有服务丢失时才会被调用: https://developer.android.com/reference/android/content/ServiceConnection

Called when a connection to the Service has been lost.

这里是否与原生逻辑不同?还是有其他考虑

jacobchow avatar Oct 21 '22 08:10 jacobchow

经过实际测试,原生系统在unbindService时是不会回调onServiceDisconnected的

zhuqichao avatar Mar 17 '23 02:03 zhuqichao