Anthony Restaino 9 years ago
parent
commit
79b8253b21
  1. 2
      app/src/main/java/acr/browser/lightning/constant/BookmarkPage.java
  2. 2
      app/src/main/java/acr/browser/lightning/fragment/GeneralSettingsFragment.java
  3. 2
      app/src/main/java/acr/browser/lightning/object/SearchAdapter.java
  4. 4
      app/src/main/java/acr/browser/lightning/reading/HtmlFetcher.java
  5. 8
      app/src/main/java/acr/browser/lightning/reading/SHelper.java

2
app/src/main/java/acr/browser/lightning/constant/BookmarkPage.java

@ -46,7 +46,7 @@ public final class BookmarkPage { @@ -46,7 +46,7 @@ public final class BookmarkPage {
"<p class=ellipses>\n" +
"<img src='";
private static final String PART3 = "http://www.google.com/s2/favicons?domain=";
private static final String PART3 = "https://www.google.com/s2/favicons?domain=";
private static final String PART4 = "' />";

2
app/src/main/java/acr/browser/lightning/fragment/GeneralSettingsFragment.java

@ -344,7 +344,7 @@ public class GeneralSettingsFragment extends LightningPreferenceFragment impleme @@ -344,7 +344,7 @@ public class GeneralSettingsFragment extends LightningPreferenceFragment impleme
if (!mHomepage.startsWith("about:")) {
getHome.setText(mHomepage);
} else {
String defaultUrl = "http://www.google.com";
String defaultUrl = "https://www.google.com";
getHome.setText(defaultUrl);
}
homePicker.setView(getHome);

2
app/src/main/java/acr/browser/lightning/object/SearchAdapter.java

@ -380,7 +380,7 @@ public class SearchAdapter extends BaseAdapter implements Filterable { @@ -380,7 +380,7 @@ public class SearchAdapter extends BaseAdapter implements Filterable {
language = DEFAULT_LANGUAGE;
}
try {
URL url = new URL("http://google.com/complete/search?q=" + query
URL url = new URL("https://google.com/complete/search?q=" + query
+ "&output=toolbar&hl=" + language);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setDoInput(true);

4
app/src/main/java/acr/browser/lightning/reading/HtmlFetcher.java

@ -394,8 +394,8 @@ public class HtmlFetcher { @@ -394,8 +394,8 @@ public class HtmlFetcher {
if (responseCode / 100 == 3 && newUrl != null && num_redirects < 5) {
newUrl = SPACE.matcher(newUrl).replaceAll("+");
// some services use (none-standard) utf8 in their location header
if (urlAsString.startsWith("http://bit.ly")
|| urlAsString.startsWith("http://is.gd"))
if (urlAsString.contains("://bit.ly")
|| urlAsString.contains("://is.gd"))
newUrl = encodeUriFromHeader(newUrl);
// AP: This code is not longer need, instead we always follow

8
app/src/main/java/acr/browser/lightning/reading/SHelper.java

@ -251,8 +251,8 @@ class SHelper { @@ -251,8 +251,8 @@ class SHelper {
}
public static String getUrlFromUglyGoogleRedirect(String url) {
if (url.startsWith("http://www.google.com/url?")) {
url = url.substring("http://www.google.com/url?".length());
if (url.startsWith("https://www.google.com/url?")) {
url = url.substring("https://www.google.com/url?".length());
String arr[] = urlDecode(url).split("&");
for (String str : arr) {
if (str.startsWith("q="))
@ -264,8 +264,8 @@ class SHelper { @@ -264,8 +264,8 @@ class SHelper {
}
public static String getUrlFromUglyFacebookRedirect(String url) {
if (url.startsWith("http://www.facebook.com/l.php?u=")) {
url = url.substring("http://www.facebook.com/l.php?u=".length());
if (url.startsWith("https://www.facebook.com/l.php?u=")) {
url = url.substring("https://www.facebook.com/l.php?u=".length());
return urlDecode(url);
}

Loading…
Cancel
Save