// Path: src/com/hellodev/lightme/FlashApp.java
// public class FlashApp extends Application {
// 	private static Context mContext ;
// 	@Override
// 	public void onCreate() {
// 		super.onCreate();
// 		mContext = getApplicationContext();
// 	}
// 	
// 	public static Context getContext() {
// 		return mContext;
// 	}
// }


import java.util.Calendar;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.res.Resources;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;
import com.hellodev.lightme.FlashApp;
import com.hellodev.lightme.R;
import com.meizu.mstore.license.ILicensingService;
import com.meizu.mstore.license.LicenseCheckHelper;
import com.meizu.mstore.license.LicenseResult;
package com.hellodev.lightme.util;




public class MLisenseMangaer {
	private final static String TAG = "MLisenseMangaer";

	public final static int STATE_UNKNOWN = 0;
	public final static int STATE_PURCHASED = 1;
	public final static int STATE_TRYING = 2;
	public final static int STATE_EXPIRED = 3;

	public final static int EXPIRE_DAYS = 3;
	public final static String APK_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCB4xYVRA7w13J6dBWA+oERVDRnefb8J5N7zeD3e6JfExk76F59YRDbmDVPL+ztwwboy+R3RSQKIHM/DYymqAHnbq4m/tKXCS6BcL9MeH6Cc2xas2dNNfzOjDrb/5oqvzHI+0TPX3gU2ZML3Udsw4Q+QT+jYOgLbMYfbps3OZne5QIDAQAB/wJQnyPGfR72CNv5zR+qA4qjxSMBUSQh55awBgR4Jrwd3G+6/yH540pB/oP+GsTp0Sof/dEFaR85968aEhBGRcnpEl9OITISZRwMp654/LD6kzdsjMBjfPXiYRSLjygcbG//gOVxZbnmU2Nz5pnuFvav8wIDAQAB";

	private Context mContext;
	// 服务的实例对象
	private ILicensingService mLicensingService = null;
	private OnLisenseStateChangeListener mListener;

	public MLisenseMangaer() {
		// for local check
		this(null);
	}

	public MLisenseMangaer(OnLisenseStateChangeListener listener) {
		mListener = listener;
// Path: src/com/hellodev/lightme/FlashApp.java
// public class FlashApp extends Application {
// 	private static Context mContext ;
// 	@Override
// 	public void onCreate() {
// 		super.onCreate();
// 		mContext = getApplicationContext();
// 	}
// 	
// 	public static Context getContext() {
// 		return mContext;
// 	}
// }


// Path: src/com/hellodev/lightme/util/MLisenseMangaer.java
import java.util.Calendar;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.res.Resources;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;
import com.hellodev.lightme.FlashApp;
import com.hellodev.lightme.R;
import com.meizu.mstore.license.ILicensingService;
import com.meizu.mstore.license.LicenseCheckHelper;
import com.meizu.mstore.license.LicenseResult;

package com.hellodev.lightme.util;




public class MLisenseMangaer {
	private final static String TAG = "MLisenseMangaer";

	public final static int STATE_UNKNOWN = 0;
	public final static int STATE_PURCHASED = 1;
	public final static int STATE_TRYING = 2;
	public final static int STATE_EXPIRED = 3;

	public final static int EXPIRE_DAYS = 3;
	public final static String APK_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCB4xYVRA7w13J6dBWA+oERVDRnefb8J5N7zeD3e6JfExk76F59YRDbmDVPL+ztwwboy+R3RSQKIHM/DYymqAHnbq4m/tKXCS6BcL9MeH6Cc2xas2dNNfzOjDrb/5oqvzHI+0TPX3gU2ZML3Udsw4Q+QT+jYOgLbMYfbps3OZne5QIDAQAB/wJQnyPGfR72CNv5zR+qA4qjxSMBUSQh55awBgR4Jrwd3G+6/yH540pB/oP+GsTp0Sof/dEFaR85968aEhBGRcnpEl9OITISZRwMp654/LD6kzdsjMBjfPXiYRSLjygcbG//gOVxZbnmU2Nz5pnuFvav8wIDAQAB";

	private Context mContext;
	// 服务的实例对象
	private ILicensingService mLicensingService = null;
	private OnLisenseStateChangeListener mListener;

	public MLisenseMangaer() {
		// for local check
		this(null);
	}

	public MLisenseMangaer(OnLisenseStateChangeListener listener) {
		mListener = listener;
		mContext = FlashApp.getContext();