private void syncSetting(WebSettings settings){
  settings.setGeolocationEnabled(enableGeolocation());
  settings.setJavaScriptEnabled(enableJavascript());
  settings.setLightTouchEnabled(enableLightTouch());
  settings.setNavDump(enableNavDump());
  settings.setDefaultTextEncodingName(getDefaultTextEncoding());
  settings.setMinimumFontSize(getMinimumFontSize());
  settings.setMinimumLogicalFontSize(getMinimumFontSize());
  settings.setTextZoom(getTextZoom());
  settings.setLayoutAlgorithm(getLayoutAlgorithm());
  settings.setJavaScriptCanOpenWindowsAutomatically(!blockPopupWindows());
  settings.setLoadsImagesAutomatically(loadImages());
  settings.setLoadWithOverviewMode(loadPageInOverviewMode());
  settings.setSavePassword(rememberPasswords());
  settings.setUseWideViewPort(isWideViewport());
  settings.setDoNotTrack(doNotTrack());
  settings.setNightModeEnabled(isNightModeEnabled());
  settings.setMediaPlaybackRequiresUserGesture(false);
  WebSettings settingsClassic=(WebSettings)settings;
  settingsClassic.setHardwareAccelSkiaEnabled(isSkiaHardwareAccelerated());
  settingsClassic.setShowVisualIndicator(enableVisualIndicator());
  settingsClassic.setForceUserScalable(forceEnableUserScalable());
  settingsClassic.setDoubleTapZoom(getDoubleTapZoom());
  settingsClassic.setAutoFillEnabled(isAutofillEnabled());
  boolean useInverted=useInvertedRendering();
  settingsClassic.setProperty(WebViewProperties.gfxInvertedScreen,useInverted ? "true" : "false");
  if (useInverted) {
    settingsClassic.setProperty(WebViewProperties.gfxInvertedScreenContrast,Float.toString(getInvertedContrast()));
  }
  if (isDebugEnabled()) {
    settingsClassic.setProperty(WebViewProperties.gfxEnableCpuUploadPath,enableCpuUploadPath() ? "true" : "false");
  }
  settingsClassic.setLinkPrefetchEnabled(mLinkPrefetchAllowed);
}

private void syncSetting ( WebSettings settings ) { settings . setGeolocationEnabled ( enableGeolocation ( ) ) ; settings . setJavaScriptEnabled ( enableJavascript ( ) ) ; settings . setLightTouchEnabled ( enableLightTouch ( ) ) ; settings . setNavDump ( enableNavDump ( ) ) ; settings . setDefaultTextEncodingName ( getDefaultTextEncoding ( ) ) ; settings . setMinimumFontSize ( getMinimumFontSize ( ) ) ; settings . setMinimumLogicalFontSize ( getMinimumFontSize ( ) ) ; settings . setTextZoom ( getTextZoom ( ) ) ; settings . setLayoutAlgorithm ( getLayoutAlgorithm ( ) ) ; settings . setJavaScriptCanOpenWindowsAutomatically ( ! blockPopupWindows ( ) ) ; settings . setLoadsImagesAutomatically ( loadImages ( ) ) ; settings . setLoadWithOverviewMode ( loadPageInOverviewMode ( ) ) ; settings . setSavePassword ( rememberPasswords ( ) ) ; settings . setUseWideViewPort ( isWideViewport ( ) ) ; settings . setDoNotTrack ( doNotTrack ( ) ) ; settings . setNightModeEnabled ( isNightModeEnabled ( ) ) ; settings . setMediaPlaybackRequiresUserGesture ( false ) ; WebSettings settingsClassic = ( WebSettings ) settings ; settingsClassic . setHardwareAccelSkiaEnabled ( isSkiaHardwareAccelerated ( ) ) ; settingsClassic . setShowVisualIndicator ( enableVisualIndicator ( ) ) ; settingsClassic . setForceUserScalable ( forceEnableUserScalable ( ) ) ; settingsClassic . setDoubleTapZoom ( getDoubleTapZoom ( ) ) ; settingsClassic . setAutoFillEnabled ( isAutofillEnabled ( ) ) ; boolean useInverted = useInvertedRendering ( ) ; settingsClassic . setProperty ( WebViewProperties . gfxInvertedScreen , useInverted ? "true" : "false" ) ; if ( useInverted ) { settingsClassic . setProperty ( WebViewProperties . gfxInvertedScreenContrast , Float . toString ( getInvertedContrast ( ) ) ) ; } if ( isDebugEnabled ( ) ) { settingsClassic . setProperty ( WebViewProperties . gfxEnableCpuUploadPath , enableCpuUploadPath ( ) ? "true" : "false" ) ; } settingsClassic . setLinkPrefetchEnabled ( mLinkPrefetchAllowed ) ; }
syncs all the settings that have a preference ui
