Browse Source

Change Reading mode package name to lower case

master
Anthony Restaino 10 years ago
parent
commit
971b0cd022
  1. 2
      src/acr/browser/lightning/Reading/ArticleTextExtractor.java
  2. 2
      src/acr/browser/lightning/Reading/Converter.java
  3. 2
      src/acr/browser/lightning/Reading/HtmlFetcher.java
  4. 2
      src/acr/browser/lightning/Reading/ImageResult.java
  5. 2
      src/acr/browser/lightning/Reading/JResult.java
  6. 7
      src/acr/browser/lightning/Reading/MapEntry.java
  7. 13
      src/acr/browser/lightning/Reading/OutputFormatter.java
  8. 2
      src/acr/browser/lightning/Reading/SCache.java
  9. 2
      src/acr/browser/lightning/Reading/SHelper.java
  10. 6
      src/acr/browser/lightning/ReadingActivity.java

2
src/acr/browser/lightning/Reading/ArticleTextExtractor.java

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
package acr.browser.lightning.Reading;
package acr.browser.lightning.reading;
import java.util.ArrayList;
import java.util.Arrays;

2
src/acr/browser/lightning/Reading/Converter.java

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package acr.browser.lightning.Reading;
package acr.browser.lightning.reading;
import java.io.*;
import java.net.SocketTimeoutException;

2
src/acr/browser/lightning/Reading/HtmlFetcher.java

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package acr.browser.lightning.Reading;
package acr.browser.lightning.reading;
import java.io.BufferedReader;
import java.io.BufferedWriter;

2
src/acr/browser/lightning/Reading/ImageResult.java

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
package acr.browser.lightning.Reading;
package acr.browser.lightning.reading;
import org.jsoup.nodes.Element;

2
src/acr/browser/lightning/Reading/JResult.java

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package acr.browser.lightning.Reading;
package acr.browser.lightning.reading;
import java.io.Serializable;
import java.util.ArrayList;

7
src/acr/browser/lightning/Reading/MapEntry.java

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations under
* the License.
*/
package acr.browser.lightning.Reading;
package acr.browser.lightning.reading;
import java.io.Serializable;
import java.util.Map;
@ -65,9 +65,8 @@ public class MapEntry<K, V> implements Map.Entry<K, V>, Serializable { @@ -65,9 +65,8 @@ public class MapEntry<K, V> implements Map.Entry<K, V>, Serializable {
final MapEntry<K, V> other = (MapEntry<K, V>) obj;
if (this.key != other.key && (this.key == null || !this.key.equals(other.key)))
return false;
if (this.value != other.value && (this.value == null || !this.value.equals(other.value)))
return false;
return true;
return !(this.value != other.value && (this.value == null || !this.value
.equals(other.value)));
}
@Override

13
src/acr/browser/lightning/Reading/OutputFormatter.java

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
package acr.browser.lightning.Reading;
package acr.browser.lightning.reading;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Element;
@ -118,14 +118,13 @@ public class OutputFormatter { @@ -118,14 +118,13 @@ public class OutputFormatter {
}
boolean unlikely(Node e) {
if (e.attr("class") != null && e.attr("class").toLowerCase(Locale.getDefault()).contains("caption"))
if (e.attr("class") != null
&& e.attr("class").toLowerCase(Locale.getDefault()).contains("caption"))
return true;
String style = e.attr("style");
String clazz = e.attr("class");
if (unlikelyPattern.matcher(style).find() || unlikelyPattern.matcher(clazz).find())
return true;
return false;
return unlikelyPattern.matcher(style).find() || unlikelyPattern.matcher(clazz).find();
}
void appendTextSkipHidden(Element e, StringBuilder accum) {
@ -148,9 +147,7 @@ public class OutputFormatter { @@ -148,9 +147,7 @@ public class OutputFormatter {
}
boolean lastCharIsWhitespace(StringBuilder accum) {
if (accum.length() == 0)
return false;
return Character.isWhitespace(accum.charAt(accum.length() - 1));
return (accum.length() != 0) && Character.isWhitespace(accum.charAt(accum.length() - 1));
}
protected String node2TextOld(Element el) {

2
src/acr/browser/lightning/Reading/SCache.java

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package acr.browser.lightning.Reading;
package acr.browser.lightning.reading;
/**
*

2
src/acr/browser/lightning/Reading/SHelper.java

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package acr.browser.lightning.Reading;
package acr.browser.lightning.reading;
import java.io.UnsupportedEncodingException;
import java.net.CookieHandler;

6
src/acr/browser/lightning/ReadingActivity.java

@ -3,8 +3,8 @@ package acr.browser.lightning; @@ -3,8 +3,8 @@ package acr.browser.lightning;
import java.util.ArrayList;
import java.util.List;
import acr.browser.lightning.Reading.HtmlFetcher;
import acr.browser.lightning.Reading.JResult;
import acr.browser.lightning.reading.HtmlFetcher;
import acr.browser.lightning.reading.JResult;
import android.animation.ObjectAnimator;
import android.app.ProgressDialog;
import android.content.Context;
@ -111,7 +111,7 @@ public class ReadingActivity extends ActionBarActivity { @@ -111,7 +111,7 @@ public class ReadingActivity extends ActionBarActivity {
} else {
StringBuilder builder = new StringBuilder();
for (String text : mBodyText) {
builder.append(text + "\n\n");
builder.append(text).append("\n\n");
}
setText(mTitleText, builder.toString());
}

Loading…
Cancel
Save