package cn.net.handsetlib.common;

import android.os.Build;

public class HandsetConstant {
	public static final String HHWKey = "H941";
	public static final int HHWKeyCode_131 = 131;
	public static final int HHWKeyCode_132 = 132;
	public static final int HHWKeyCode_133 = 133;
	public static final int HHWKeyCode_134 = 134;
	public static final int HHWKeyCode_135 = 135;
	public static final int HHWKey_UP_Code_220 = 220;
	public static final int HHWKey_UP_Code_221 = 221;
	

	public static boolean isHHW() {
		String model = Build.MODEL.toUpperCase();
		return model.contains(HandsetConstant.HHWKey);
	}
	public static boolean isHHWKeyCode(int keyCode) {
		return isHHW()
				&& (keyCode == HHWKeyCode_131 || keyCode == HHWKeyCode_132 || keyCode == HHWKeyCode_133
						|| keyCode == HHWKeyCode_134 || keyCode == HHWKeyCode_135);
	}
	/**
	 * 检测是否是需要监测 keyUp事件的按键
	 * @param keyCode
	 * @return
	 */
	public static boolean isHHWUpKeyCode(int keyCode) {
		return (keyCode == HHWKey_UP_Code_220 || keyCode == HHWKey_UP_Code_221) ? true : false;
	}
	public static boolean isFLYKeyCode(int keyCode) {
		return (keyCode == 211 | keyCode == 212 | keyCode == 220);
	}

}
