mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +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");
|
||||
} else {
|
||||
uri = URLUtil.guessUrl(text);
|
||||
|
||||
if (uri.startsWith("http://") && !text.startsWith("http://")) {
|
||||
uri = uri.replaceFirst("http://", "https://");
|
||||
}
|
||||
}
|
||||
|
||||
mServoView.loadUri(Uri.parse(uri));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue