List of usage examples for org.apache.cordova.whitelist WhitelistPlugin WhitelistPlugin
public WhitelistPlugin(XmlPullParser xmlParser)
From source file:org.apache.appharness.AppHarnessUI.java
License:Apache License
private CordovaPlugin createWhitelistPlugin(Uri configXmlUri) { InputStream istr = null;/*from www . j a va2s. c o m*/ try { istr = new FileInputStream(configXmlUri.getPath()); XmlPullParserFactory factory = XmlPullParserFactory.newInstance(); factory.setNamespaceAware(false); XmlPullParser parser = factory.newPullParser(); parser.setInput(istr, "UTF-8"); return new WhitelistPlugin(parser); } catch (XmlPullParserException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } finally { if (istr != null) { try { istr.close(); } catch (IOException e) { } } } return null; }