Code example for Resources.NotFoundException

0
		} catch (NameNotFoundException e) {
			flag = false;
		} catch (Exception ex) {
			flag = false;
			if (pkgInfo == null) {
				throw new NotFoundException();
			} 
		} 
		return flag;
	} 
 
	/** 
	 * 检查系统中是否存在-这个Activity 
	 * @param context 
	 * @param pkg 
	 * @param cls 
	 * @return 
	 */ 
	public static boolean hasActivity(Context context, String pkg, String cls) {
		boolean has = true;
Connect your IDE to all the code out there  Get Codota for Java