X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;ds=sidebyside;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Factivities%2FViewSourceActivity.java;h=62c704de7728db11a0d78f9a4a2b13a61b94fc24;hb=33bd447a83bd3d763ee26bbb3a3f4adb074776ed;hp=db9bf7974f6a52aa58d0256c2d407cc8d0aa6042;hpb=6a85cc5ca039054a24c4601de785e0bc1a234722;p=PrivacyBrowserAndroid.git diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/ViewSourceActivity.java b/app/src/main/java/com/stoutner/privacybrowser/activities/ViewSourceActivity.java index db9bf797..62c704de 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/ViewSourceActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/ViewSourceActivity.java @@ -1,5 +1,5 @@ /* - * Copyright © 2017-2018 Soren Stoutner . + * Copyright © 2017-2019 Soren Stoutner . * * This file is part of Privacy Browser . * @@ -181,7 +181,7 @@ public class ViewSourceActivity extends AppCompatActivity { // Get the URL. String url = urlEditText.getText().toString(); - // Get new source data for the URL if it begins with `http`/ + // Get new source data for the URL if it begins with `http`. if (url.startsWith("http")) { new GetSource(this).execute(url); } else { @@ -206,7 +206,7 @@ public class ViewSourceActivity extends AppCompatActivity { @Override public boolean onCreateOptionsMenu(Menu menu) { - // Inflate the menu; this adds items to the action bar if it is present. + // Inflate the menu. This adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.view_source_options_menu, menu); // Display the menu. @@ -291,7 +291,7 @@ public class ViewSourceActivity extends AppCompatActivity { } } - // `String` declares the parameters. `Void` does not declare progress units. `String[]` contains the results. + // `String` declares the parameters. `Void` does not declare progress units. `SpannableStringBuilder[]` contains the results. private static class GetSource extends AsyncTask { // Create a weak reference to the calling activity. private WeakReference activityWeakReference; @@ -308,7 +308,7 @@ public class ViewSourceActivity extends AppCompatActivity { Activity viewSourceActivity = activityWeakReference.get(); // Abort if the activity is gone. - if ((viewSourceActivity == null) || (viewSourceActivity.isFinishing())) { + if ((viewSourceActivity == null) || viewSourceActivity.isFinishing()) { return; } @@ -334,7 +334,7 @@ public class ViewSourceActivity extends AppCompatActivity { Activity activity = activityWeakReference.get(); // Abort if the activity is gone. - if ((activity == null) || (activity.isFinishing())) { + if ((activity == null) || activity.isFinishing()) { return new SpannableStringBuilder[] {requestHeadersBuilder, responseMessageBuilder, responseHeadersBuilder, responseBodyBuilder}; } @@ -663,11 +663,11 @@ public class ViewSourceActivity extends AppCompatActivity { // `onPostExecute()` operates on the UI thread. @Override protected void onPostExecute(SpannableStringBuilder[] viewSourceStringArray){ - // Get a handle the activity. + // Get a handle for the activity. Activity activity = activityWeakReference.get(); // Abort if the activity is gone. - if ((activity == null) || (activity.isFinishing())) { + if ((activity == null) || activity.isFinishing()) { return; }