package com.example.mountaintravel.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import android.hardware.Camera;

public class PhoneUtil {
	public static boolean isMobileNO(String mobiles) {

		 String telRegex = "[1][358]\\d{9}";//"[1]"代表第1位为数字1，
		
		        
		      return mobiles.matches(telRegex);  
	}
	public static boolean isCameraCanUse() {
		boolean canUse = true;
		Camera mCamera = null;
		try {
			// TODO camera驱动挂掉,处理??
			mCamera = Camera.open();
		} catch (Exception e) {
			canUse = false;
		}
		if (canUse) {
			mCamera.release();
			mCamera = null;
		}

		return canUse;
	}
}
