@Config(reportSdk = VERSION_CODES.JELLY_BEAN_MR2) @Test public void atLeastJellybeanMr2_shouldPass() throws Exception { subject = new BaseWebView(context); subject.enablePlugins(true); }
protected void enablePlugins(final boolean enabled) { if (VersionCode.currentApiLevel().isAtLeast(VersionCode.JELLY_BEAN_MR2)) { return; } if (enabled) { getSettings().setPluginState(WebSettings.PluginState.ON); } else { getSettings().setPluginState(WebSettings.PluginState.OFF); } }
BaseWebView extends WebView { protected void enablePlugins(final boolean enabled) { if (VersionCode.currentApiLevel().isAtLeast(VersionCode.JELLY_BEAN_MR2)) { return; } if (enabled) { getSettings().setPluginState(WebSettings.PluginState.ON); } else { getSettings().setPluginState(WebSettings.PluginState.OFF); } } }
BaseWebView extends WebView { protected void enablePlugins(final boolean enabled) { if (VersionCode.currentApiLevel().isAtLeast(VersionCode.JELLY_BEAN_MR2)) { return; } if (enabled) { getSettings().setPluginState(WebSettings.PluginState.ON); } else { getSettings().setPluginState(WebSettings.PluginState.OFF); } } BaseWebView(Context context); }
BaseWebView extends WebView { protected void enablePlugins(final boolean enabled) { if (VersionCode.currentApiLevel().isAtLeast(VersionCode.JELLY_BEAN_MR2)) { return; } if (enabled) { getSettings().setPluginState(WebSettings.PluginState.ON); } else { getSettings().setPluginState(WebSettings.PluginState.OFF); } } BaseWebView(Context context); @Override void destroy(); }
BaseWebView extends WebView { protected void enablePlugins(final boolean enabled) { if (VersionCode.currentApiLevel().isAtLeast(VersionCode.JELLY_BEAN_MR2)) { return; } if (enabled) { getSettings().setPluginState(WebSettings.PluginState.ON); } else { getSettings().setPluginState(WebSettings.PluginState.OFF); } } BaseWebView(Context context); @Override void destroy();  }