Don't allow null intents in billing service

pull/14/head
Sam Bosley 12 years ago
parent 0e3a71451e
commit e6a25ce0b7

@ -68,9 +68,26 @@ public class BillingActivity extends Activity {
}
};
}
@Override
protected void onStart() {
super.onStart();
ResponseHandler.register(purchaseObserver);
}
@Override
protected void onStop() {
super.onStop();
ResponseHandler.unregister(purchaseObserver);
}
@Override
protected void onDestroy() {
super.onDestroy();
billingService.unbind();
}
@Override
protected void onResume() {
super.onResume();

@ -403,6 +403,8 @@ public class BillingService extends Service implements ServiceConnection {
* @param startId an identifier for the invocation instance of this service
*/
public void handleCommand(Intent intent, int startId) {
if (intent == null)
return;
String action = intent.getAction();
if (Constants.DEBUG) {
Log.i(TAG, "handleCommand() action: " + action);

Loading…
Cancel
Save