763b579c8f
On targetSdk 36, ACTION_PROCESS_TEXT handlers were hidden by Android 11+ package-visibility filtering — only auto-visible web browsers resolved the intent, so system-dictionary lookups landed in the OEM browser (VIVO/iQOO) even with a dictionary like Eudic installed. Add a <queries> declaration so dictionary apps are visible, and filter web browsers out of the handler set so an OEM browser that registers PROCESS_TEXT can't swallow the lookup: - no browser among handlers → unchanged implicit dispatch (keeps native Always) - browser + one dictionary → launch it directly (explicit component) - browser + several dictionaries → chooser excluding browsers, remembering the pick via EXTRA_CHOSEN_COMPONENT so later lookups go straight through - only a browser installed → report unavailable instead of opening it Routing is a pure, JUnit-tested decideLookupDispatch(). Adds get/clear lookup-dictionary commands + an Android-only reset row in the dictionary settings to switch the remembered app. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
44 lines
1.1 KiB
Rust
44 lines
1.1 KiB
Rust
const COMMANDS: &[&str] = &[
|
|
"auth_with_safari",
|
|
"auth_with_custom_tab",
|
|
"copy_uri_to_path",
|
|
"use_background_audio",
|
|
"install_package",
|
|
"set_system_ui_visibility",
|
|
"get_status_bar_height",
|
|
"get_sys_fonts_list",
|
|
"intercept_keys",
|
|
"lock_screen_orientation",
|
|
"iap_is_available",
|
|
"iap_initialize",
|
|
"iap_fetch_products",
|
|
"iap_purchase_product",
|
|
"iap_restore_purchases",
|
|
"get_system_color_scheme",
|
|
"get_safe_area_insets",
|
|
"get_screen_brightness",
|
|
"set_screen_brightness",
|
|
"get_external_sdcard_path",
|
|
"open_external_url",
|
|
"show_lookup_popover",
|
|
"get_lookup_dictionary",
|
|
"clear_lookup_dictionary",
|
|
"select_directory",
|
|
"get_storefront_region_code",
|
|
"register_listener",
|
|
"remove_listener",
|
|
"request_manage_storage_permission",
|
|
"check_permissions",
|
|
"request_permissions",
|
|
"checkPermissions",
|
|
"requestPermissions",
|
|
"clip_url",
|
|
];
|
|
|
|
fn main() {
|
|
tauri_plugin::Builder::new(COMMANDS)
|
|
.android_path("android")
|
|
.ios_path("ios")
|
|
.build();
|
|
}
|