mirror of
https://github.com/servo/servo.git
synced 2025-07-23 23:33:43 +01:00
Make https the default protocol for address bar on Android, too.
This commit is contained in:
parent
6804a3f208
commit
c71988e70b
1 changed files with 4 additions and 0 deletions
|
@ -112,6 +112,10 @@ public class MainActivity extends Activity implements Servo.Client {
|
||||||
uri = URLUtil.composeSearchUrl(text, "https://duckduckgo.com/html/?q=%s", "%s");
|
uri = URLUtil.composeSearchUrl(text, "https://duckduckgo.com/html/?q=%s", "%s");
|
||||||
} else {
|
} else {
|
||||||
uri = URLUtil.guessUrl(text);
|
uri = URLUtil.guessUrl(text);
|
||||||
|
|
||||||
|
if (uri.startsWith("http://") && !text.startsWith("http://")) {
|
||||||
|
uri = uri.replaceFirst("http://", "https://");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mServoView.loadUri(Uri.parse(uri));
|
mServoView.loadUri(Uri.parse(uri));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue