Android life cycle improvements and Gradle integration

This commit is contained in:
Imanol Fernandez 2017-02-28 14:17:59 +01:00
parent 350d9c6c47
commit 7a2a90959e
30 changed files with 945 additions and 634 deletions

View file

@ -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) => {

View file

@ -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()]
},