BillingRequest.runRequest performs a check on mService to see if
onServiceConnected has set its value. If the value is set, the service has
connected and we execute the request immediately, otherwise we queue the
request until the service is connected.
Since the service connects asynchronously it's possible that a BillingRequest
made immediately after starting the service will never be executed. In this
case the request is added to the queue but bad timing can mean it happens after
onServiceConnected has processed its pending queue. This can be resolved by
putting the code that sets mService and the code that checks mService != null
in synchronized blocks. With that in place the first request to the
BillingService is always processed.
Original issue reported on code.google.com by trevorjohns@google.com on 8 May 2012 at 8:18
Original issue reported on code.google.com by
trevorjohns@google.com
on 8 May 2012 at 8:18