onepf / OpenIAB

Open In-App Billing for Google Play, SlideMe, Amazon Store, Nokia Store, Samsung Apps, Yandex.Store, Appland, Aptoide, AppMall and Fortumo.
http://onepf.org/openiab/
Apache License 2.0
473 stars 172 forks source link

issue_with_blocking_iab_setup #524

Closed schemon closed 8 years ago

schemon commented 8 years ago

IabHelper.startSetup no longer block on the calling (main) thread. The javadoc stated falsely that it was safe to call from the UI Thread but, though it was asynchrounous, it explicitly switched back to the calling thread and performed heavy work.

This was solved by moving all heavy work to a background thread that was previously performed in the onServiceConnected callback inside IabHelper.startSetup. Please look at the IabHelper.startSetupIabAsync and where it's called for reference.

Due to encoding issue the diff will show changes to the whole file (IabHelper.java).