mirror of
https://github.com/servo/servo.git
synced 2025-08-10 07:55:33 +01:00
Android life cycle improvements and Gradle integration
This commit is contained in:
parent
350d9c6c47
commit
7a2a90959e
30 changed files with 945 additions and 634 deletions
|
@ -940,14 +940,6 @@ impl Window {
|
|||
}
|
||||
}
|
||||
|
||||
// WindowProxy is not implemented for android yet
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
fn create_window_proxy(_: &Window) -> Option<glutin::WindowProxy> {
|
||||
None
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "android"))]
|
||||
fn create_window_proxy(window: &Window) -> Option<glutin::WindowProxy> {
|
||||
match window.kind {
|
||||
WindowKind::Window(ref window) => {
|
||||
|
|
|
@ -33,6 +33,7 @@ extern crate sig;
|
|||
use backtrace::Backtrace;
|
||||
use servo::Browser;
|
||||
use servo::compositing::windowing::WindowEvent;
|
||||
use servo::config;
|
||||
use servo::config::opts::{self, ArgumentParsingResult};
|
||||
use servo::config::servo_version;
|
||||
use std::env;
|
||||
|
@ -219,8 +220,9 @@ fn args() -> Vec<String> {
|
|||
use std::fs::File;
|
||||
use std::io::{BufRead, BufReader};
|
||||
|
||||
const PARAMS_FILE: &'static str = "/sdcard/servo/android_params";
|
||||
match File::open(PARAMS_FILE) {
|
||||
let mut params_file = config::basedir::default_config_dir().unwrap();
|
||||
params_file.push("android_params");
|
||||
match File::open(params_file.to_str().unwrap()) {
|
||||
Ok(f) => {
|
||||
let mut vec = Vec::new();
|
||||
let file = BufReader::new(&f);
|
||||
|
@ -236,7 +238,7 @@ fn args() -> Vec<String> {
|
|||
},
|
||||
Err(e) => {
|
||||
debug!("Failed to open params file '{}': {}",
|
||||
PARAMS_FILE,
|
||||
params_file.to_str().unwrap(),
|
||||
Error::description(&e));
|
||||
vec!["servo".to_owned(), "http://en.wikipedia.org/wiki/Rust".to_owned()]
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue