bineanzhou / dashclock

Automatically exported from code.google.com/p/dashclock
Apache License 2.0
0 stars 0 forks source link

ServiceConnection leaked #603

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Setup an extension
2.Simulate the system killing the extension process (i.e. adb shell 'am kill 
package'
3.The system will reload (and rebind automatically) the extension service to 
DashClock.
4.Remove the widget and the crash will show in the logcat.

What is the expected output? What do you see instead?
Nothing really expected, just avoid the bug.

What version of the product are you using?
Latest code from here.

Which device and Android version are you experiencing this issue on?
Any, the emulator will do.

Are you using a custom launcher or ROM? If so, which one? Note that custom
launchers and ROMs are not supported.
No.

Please provide any additional information below.

In the ExtensionHost, ServiceConnection.onServiceDisconnected() removes the 
"serviceConnection" from the connections Map but doesn't "unbind" the service 
so android will rebind it automagically.
But as the connection is not in the Map, the Host won't take it into 
consideration for anything, calling again to "bindService" next time it's 
needed.
This causes a new connection leak every time an extension service is killed .

Original issue reported on code.google.com by ander...@gmail.com on 17 Oct 2013 at 5:16

GoogleCodeExporter commented 9 years ago

Original comment by roman.nurik on 17 Oct 2013 at 5:22