wip: tsc-android engine host, JNI bridge, MediaProjection capture, MediaCodec

This commit is contained in:
Claude committed 2026-09-26 10:31:17 +00:00
1 parent 99e26152a5
commit 80f8a4dc50
19 files changed
+2347 -30

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
//! Passwords in the Android Keystore.
//!
//! The Kotlin `SecretStore` encrypts each value with an AES-GCM key that
//! lives in the Android Keystore (hardware-backed where the device has it)
//! and keeps the ciphertext in the app's private preferences.
use tsc_store::{Error, Result, Secrets};
use crate::bridge;
pub struct KeystoreSecrets;
fn error(e: jni::errors::Error) -> Error {
Error::Secrets(format!("Android Keystore: {e}"))
}
impl Secrets for KeystoreSecrets {
fn get(&self, key: &str) -> Result<Option<String>> {
bridge::secret_get(key).map_err(error)
}
fn set(&self, key: &str, value: &str) -> Result<()> {
bridge::secret_set(key, value).map_err(error)
}
fn delete(&self, key: &str) -> Result<()> {
bridge::secret_delete(key).map_err(error)
}
}