Code example for PathClassLoader

Methods: loadClasssleep

	private AsyncResult sendRilOemHookMsg(int requestId, byte[] request) {		
		final String QCRILHOOK_CLASS = "com.qualcomm.qcrilhook.QcRilHook";
		AsyncResult ar = null;
		try { 
			PathClassLoader qcRilHookClassLoader = 
				new PathClassLoader("/system/framework/qcrilhook.jar", ClassLoader.getSystemClassLoader());
			Class<?> cl = qcRilHookClassLoader.loadClass(QCRILHOOK_CLASS);
			Constructor c = cl.getConstructor(new Class[] {Context.class});
			//20130729, yeongsu.wu, TD69739, setFlag null pointer due to getIQcrilMsgTunnelService is null 
			Object qcrilObj = c.newInstance(mContext);
			Method mGetService = cl.getMethod("getIQcrilMsgTunnelService");
			Object isServiceAvailable = (Object) mGetService.invoke(qcrilObj);
			if (isServiceAvailable == null) {
				Log.d(TAG, "getIQcrilMsgTunnelService() return null");
				try { 
				} catch (InterruptedException e) {
					Log.e(TAG, "Failed: " + e);
			} else { 
				Log.d(TAG, "getIQcrilMsgTunnelService() return not null");
Stop searching for code, let great code find you!  Add Codota to your java IDE