centsol / marketlicensing

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

ServiceConnection Leak #26

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Install LVL enabled app onto an Emulator running Android <8 that does not 
have the Android Market app.

What is the expected output? What do you see instead?
If there is an issue connecting to the AndroidMarket service the LVL 
implementation code leaks a ServiceConnection.  I think this is because 
LicenseChecker.java:checkAccess():mContext.bindService fails.  I don't think 
mService is ever set in this case.  Then when onDestroy() is called the 
mService variable is null and the class doesn't unbind and causes a leak.

What version of the product are you using? On what operating system?
Emulator less than Froyo

Please provide any additional information below.

Original issue reported on code.google.com by paul.rashidi@gmail.com on 4 Dec 2010 at 8:43

GoogleCodeExporter commented 8 years ago
Forgot to mention that I fixed by removing if (mService==null) as the try/catch 
seems to already handle an unbind if already unbound.

Original comment by paul.rashidi@gmail.com on 4 Dec 2010 at 8:46