diff --git a/Cargo.toml b/Cargo.toml index 35d151e22..8724bc50c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,7 +49,7 @@ serde_json = "1.0" thiserror = "1.0" url = "2.2" #tao = { version = "0.8.4", default-features = false, features = [ "serde" ] } -tao = {path = "../tao"} +tao = { git = "https://github.com/tauri-apps/tao", branch = "ndk"} http = "0.2.7" [dev-dependencies] @@ -92,9 +92,3 @@ objc = "0.2" objc_id = "0.1" [target."cfg(target_os = \"android\")".dependencies] -android_logger = "0.10" -jni = "0.19" -ndk = "0.6" -ndk-sys = "0.3" -ndk-context = "0.1" -crossbeam-channel = "0.5" diff --git a/src/lib.rs b/src/lib.rs index df98ccfcf..0b6882d52 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -180,7 +180,4 @@ pub enum Error { InvalidMethod(#[from] InvalidMethod), #[error("Infallible error, something went really wrong: {0}")] Infallible(#[from] std::convert::Infallible), - #[cfg(target_os = "android")] - #[error("JNI error: {0}")] - JNIError(#[from] jni::errors::Error), } diff --git a/src/webview/android/mod.rs b/src/webview/android/mod.rs index 0b644f555..63faa6810 100644 --- a/src/webview/android/mod.rs +++ b/src/webview/android/mod.rs @@ -1,18 +1,6 @@ -use std::{ - collections::HashSet, ffi::c_void, os::unix::prelude::RawFd, ptr::null_mut, rc::Rc, sync::RwLock, -}; - -use crate::{application::window::Window, Result}; - use super::{WebContext, WebViewAttributes}; - -use crossbeam_channel::*; -use jni::{ - objects::{JClass, JObject}, - sys::jobject, - JNIEnv, -}; -use once_cell::sync::{Lazy, OnceCell}; +use crate::{application::window::Window, Result}; +use std::rc::Rc; use tao::platform::android::ndk_glue::*; pub struct InnerWebView { @@ -77,7 +65,7 @@ impl InnerWebView { false } - pub fn zoom(&self, scale_factor: f64) {} + pub fn zoom(&self, _scale_factor: f64) {} } pub fn platform_webview_version() -> Result { diff --git a/src/webview/mod.rs b/src/webview/mod.rs index 9faf88911..9d5f1cfd1 100644 --- a/src/webview/mod.rs +++ b/src/webview/mod.rs @@ -37,12 +37,6 @@ pub(crate) mod webview2; #[cfg(target_os = "windows")] use self::webview2::*; use crate::Result; -#[cfg(target_os = "android")] -use jni::{ - objects::{JClass, JObject}, - sys::jobject, - JNIEnv, -}; #[cfg(target_os = "windows")] use webview2_com::Microsoft::Web::WebView2::Win32::ICoreWebView2Controller; #[cfg(target_os = "windows")]