package com.sometrik.framework;

import com.android.vending.billing.IInAppBillingService;

import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.IBinder;

public class PurchaseHelper {
	
	IInAppBillingService mService;
	private static PurchaseHelper instance = null;

	public static PurchaseHelper getInstance() {
		if (instance == null) {
			instance = new PurchaseHelper();
		}
		return instance;
	}

	ServiceConnection mServiceConn = new ServiceConnection() {
		@Override
		public void onServiceDisconnected(ComponentName name) {
			mService = null;
		}

		@Override
		public void onServiceConnected(ComponentName name, IBinder service) {
			mService = IInAppBillingService.Stub.asInterface(service);
		}
	};

	protected PurchaseHelper() {
	}

	public void createConnection(Activity activity) {
		Intent serviceIntent = new Intent("com.android.vending.billing.InAppBillingService.BIND");
		serviceIntent.setPackage("com.android.vending");
		activity.bindService(serviceIntent, mServiceConn, Context.BIND_AUTO_CREATE);
	}

}

@@ -411,16 +411,47 @@
  null;%0D%0A
+%09protected PurchaseHelper() %7B %7D
 %0D%0A%09publi
@@ -914,35 +914,127 @@
 %0D%0A%09p
-rotected PurchaseHelper() %7B
+ublic void disconnect(FrameWork framework) %7B%0D%0A%09%09if (mService != null) %7B%0D%0A%09%09%09framework.unbindService(mServiceConn);%0D%0A%09%09%7D
 %0D%0A%09%7D
@@ -1071,25 +1071,27 @@
 ion(
-Activity activity
+FrameWork framework
 ) %7B%0D
@@ -1243,16 +1243,17 @@
 %0D%0A%09%09
-activity
+framework
 .bin

Add disconnect function