helicopterChen / marketbilling

Automatically exported from code.google.com/p/marketbilling
0 stars 0 forks source link

Billing activity window leak #10

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
While making an in-app purchase on a newly configured test phone:

E/WindowManager(16621): Activity 
com.android.vending.billing.InAppBuyPageActivity has leaked window com.androi
d.internal.policy.impl.PhoneWindow$DecorView@48342980 that was originally added 
here
E/WindowManager(16621): android.view.WindowLeaked: Activity 
com.android.vending.billing.InAppBuyPageActivity h
as leaked window 
com.android.internal.policy.impl.PhoneWindow$DecorView@48342980 that was 
originally added her
e
E/WindowManager(16621):         at 
android.view.ViewRoot.<init>(ViewRoot.java:247)
E/WindowManager(16621):         at 
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
E/WindowManager(16621):         at 
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
E/WindowManager(16621):         at 
android.view.Window$LocalWindowManager.addView(Window.java:424)
E/WindowManager(16621):         at android.app.Dialog.show(Dialog.java:241)
E/WindowManager(16621):         at 
com.android.vending.billing.InAppBuyPageActivity.initDialogViews(InAppBuyPa
geActivity.java:457)
E/WindowManager(16621):         at 
com.android.vending.billing.InAppBuyPageActivity.onRestart(InAppBuyPageActi
vity.java:282)
E/WindowManager(16621):         at 
android.app.Instrumentation.callActivityOnRestart(Instrumentation.java:1139
)
E/WindowManager(16621):         at 
android.app.Activity.performRestart(Activity.java:3805)
E/WindowManager(16621):         at 
android.app.Activity.performResume(Activity.java:3816)
E/WindowManager(16621):         at 
android.app.ActivityThread.performResumeActivity(ActivityThread.java:3118)
E/WindowManager(16621):         at 
android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3143)
E/WindowManager(16621):         at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2059)
E/WindowManager(16621):         at 
android.os.Handler.dispatchMessage(Handler.java:99)
E/WindowManager(16621):         at android.os.Looper.loop(Looper.java:123)
E/WindowManager(16621):         at 
android.app.ActivityThread.main(ActivityThread.java:4627)
E/WindowManager(16621):         at java.lang.reflect.Method.invokeNative(Native 
Method)
E/WindowManager(16621):         at 
java.lang.reflect.Method.invoke(Method.java:521)
E/WindowManager(16621):         at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:
871)
E/WindowManager(16621):         at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
E/WindowManager(16621):         at dalvik.system.NativeStart.main(Native Method)

Since this was a new test device, I left the main billing popup window to look 
at terms of use and for entering a credit card. Without those extra steps, on 
other phones, I don't see the leak.

The device is a Samsung Galaxy S, running 2.2.

Original issue reported on code.google.com by kmans...@gmail.com on 11 Apr 2011 at 1:15

GoogleCodeExporter commented 8 years ago
Same issue with a LG GT540 running 2.1u1

Original comment by codemonk...@gmail.com on 16 May 2011 at 7:14

GoogleCodeExporter commented 8 years ago
I too am getting this error. I receive a response from the market that a 
purchase was made successfully. So I set the activity result and then call 
finishActivity(0). This cause the application to go back to the calling 
activity and get set up correctly. However, the billing service responds one 
more time with the same data. Thus, causing my application to go back to the 
previous activity. 

On return to previous activity, I call an async task to save data to server. 
The second call back causes the server to do the same again, causing a data 
leak.

Original comment by cren.ren...@gmail.com on 10 Oct 2011 at 9:11