package jp.agentec.abook.abv.cl.util;

import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.cl.environment.DeviceInfo;
import android.content.Context;

/**
 * @author tauchi
 *
 */
public class StorageUtil {
	public static boolean isFreeSpaceEnough(Context context) {
		// 空き容量をバイトからMバイトに変換
		long freeSpacebyte = DeviceInfo.getFreeStorageSpace();
		int freeSpaceMbyte =  (int)(freeSpacebyte / 1024 / 1024);
		
		return freeSpaceMbyte >= ABVEnvironment.MinFreeStorageSpaceMbyte;
	}
}
