diff options
author | Ben Murdoch <benm@google.com> | 2014-02-28 14:33:03 +0000 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2014-02-28 14:33:03 +0000 |
commit | 7609f0f74a1b93ae5964d1d31a51fd25cca5d72b (patch) | |
tree | 08526af234efc223d319afe89c37ab9b5ef46e0e /src/com/android/htmlviewer/HTMLViewerActivity.java | |
parent | 0b5cff8d692cd47c8b08b288b58dc95d9a16f158 (diff) | |
download | android_packages_apps_HTMLViewer-7609f0f74a1b93ae5964d1d31a51fd25cca5d72b.tar.gz android_packages_apps_HTMLViewer-7609f0f74a1b93ae5964d1d31a51fd25cca5d72b.tar.bz2 android_packages_apps_HTMLViewer-7609f0f74a1b93ae5964d1d31a51fd25cca5d72b.zip |
Clean up whitespace.
Change-Id: Ib1b38186027244c1218fab0d1c81400b9ad570a3
Diffstat (limited to 'src/com/android/htmlviewer/HTMLViewerActivity.java')
-rw-r--r-- | src/com/android/htmlviewer/HTMLViewerActivity.java | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/com/android/htmlviewer/HTMLViewerActivity.java b/src/com/android/htmlviewer/HTMLViewerActivity.java index 2e46e49..e51e7a1 100644 --- a/src/com/android/htmlviewer/HTMLViewerActivity.java +++ b/src/com/android/htmlviewer/HTMLViewerActivity.java @@ -34,51 +34,51 @@ import java.io.IOException; import java.io.InputStream; /** - * Wraps a WebView widget within an Activity. When launched, it uses the - * URI from the intent as the URL to load into the WebView. + * Wraps a WebView widget within an Activity. When launched, it uses the + * URI from the intent as the URL to load into the WebView. * It supports all URLs schemes that a standard WebView supports, as well as * loading the top level markup using the file scheme. - * The WebView default settings are used with the exception of normal layout + * The WebView default settings are used with the exception of normal layout * is set. * This activity shows a loading progress bar in the window title and sets * the window title to the title of the content. * */ public class HTMLViewerActivity extends Activity { - + /* * The WebView that is placed in this Activity */ private WebView mWebView; - + /* - * As the file content is loaded completely into RAM first, set + * As the file content is loaded completely into RAM first, set * a limitation on the file size so we don't use too much RAM. If someone * wants to load content that is larger than this, then a content * provider should be used. */ static final int MAXFILESIZE = 8096; - + static final String LOGTAG = "HTMLViewerActivity"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - // Call createInstance() explicitly. createInstance() is called in - // BrowserFrame by WebView. As it is called in WebCore thread, it can + // Call createInstance() explicitly. createInstance() is called in + // BrowserFrame by WebView. As it is called in WebCore thread, it can // happen after onResume() is called. To use getInstance() in onResume, // createInstance() needs to be called first. CookieSyncManager.createInstance(this); requestWindowFeature(Window.FEATURE_PROGRESS); - + mWebView = new WebView(this); setContentView(mWebView); - + // Setup callback support for title and progress bar mWebView.setWebChromeClient( new WebChrome() ); - + // Configure the webview WebSettings s = mWebView.getSettings(); s.setUseWideViewPort(true); @@ -87,11 +87,11 @@ public class HTMLViewerActivity extends Activity { s.setSavePassword(false); s.setSaveFormData(false); s.setBlockNetworkLoads(true); - - // Javascript is purposely disabled, so that nothing can be + + // Javascript is purposely disabled, so that nothing can be // automatically run. s.setJavaScriptEnabled(false); - + // Restore a webview if we are meant to restore if (savedInstanceState != null) { mWebView.restoreState(savedInstanceState); @@ -107,19 +107,19 @@ public class HTMLViewerActivity extends Activity { } } } - + @Override protected void onResume() { super.onResume(); - CookieSyncManager.getInstance().startSync(); + CookieSyncManager.getInstance().startSync(); } - + @Override protected void onSaveInstanceState(Bundle outState) { // the default implementation requires each view to have an id. As the // browser handles the state itself and it doesn't use id for the views, // don't call the default implementation. Otherwise it will trigger the - // warning like this, "couldn't save which view has focus because the + // warning like this, "couldn't save which view has focus because the // focused view XXX has no id". mWebView.saveState(outState); } @@ -127,23 +127,23 @@ public class HTMLViewerActivity extends Activity { @Override protected void onStop() { super.onStop(); - - CookieSyncManager.getInstance().stopSync(); + + CookieSyncManager.getInstance().stopSync(); } - + @Override protected void onDestroy() { super.onDestroy(); mWebView.destroy(); } - + class WebChrome extends WebChromeClient { - + @Override public void onReceivedTitle(WebView view, String title) { HTMLViewerActivity.this.setTitle(title); } - + @Override public void onProgressChanged(WebView view, int newProgress) { getWindow().setFeatureInt( @@ -153,5 +153,5 @@ public class HTMLViewerActivity extends Activity { } } } - + } |