Skip to content

Commit

Permalink
[doc]更新README
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyD666 committed Jul 2, 2023
1 parent 32b988d commit 6a9a10c
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import android.content.Context
import android.content.pm.ActivityInfo
import android.content.pm.PackageManager
import android.provider.Settings
import android.util.Log
import android.view.accessibility.AccessibilityEvent
import com.skyd.rays.ext.dataStore
import com.skyd.rays.ext.get
Expand Down Expand Up @@ -44,11 +45,13 @@ class RaysAccessibilityService : AccessibilityService() {
ComponentName(event.packageName.toString(), event.className.toString())
val activityInfo = tryGetActivity(componentName)
scope.launch {
val strategy = dataStore.get(AutoShareIgnoreStrategyPreference.key).orEmpty()
val strategy = dataStore.get(AutoShareIgnoreStrategyPreference.key)
?: AutoShareIgnoreStrategyPreference.default
val name = activityInfo?.name ?: return@launch
if (!name.startsWith(packageName.substringBeforeLast(".")) &&
if (!name.startsWith(packageName.substringBeforeLast(".debug")) &&
runCatching { !name.matches(Regex(strategy)) }.getOrElse { true }
) {
Log.i("topActivityFullName", "$name $strategy")
mutex.withLock {
topActivityFullName = activityInfo.name
}
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@
<string name="share_config_screen_file_extension">文件扩展名</string>
<string name="share_config_screen_file_extension_description">分享表情包时为文件添加扩展名</string>
<string name="mini_tool_screen_name">小工具</string>
<string name="style_transfer_screen_name">风格转移 (Beta)</string>
<string name="style_transfer_screen_name">风格转移(实验性)</string>
<string name="style_transfer_screen_transfer">转移</string>
<string name="api_screen_name">API</string>
<string name="api_screen_name">API(实验性)</string>
<string name="api_grant_screen_name">API 授权</string>
<string name="setting_screen_api_description">对外开放接口</string>
<string name="api_grant_repo_no_package">包名不可用:%s</string>
Expand All @@ -201,5 +201,5 @@
<string name="auto_share_screen_ignore_regex_format_error">正则表达式格式非法</string>
<string name="auto_share_screen_accessibility_granted">当前已授予无障碍权限</string>
<string name="auto_share_screen_accessibility_not_granted">当前未授予无障碍权限</string>
<string name="auto_share_screen_supported_app">自动分享可以直接将表情包分享到上一个页面对应的应用。\n\n该功能需要无障碍权限。在杀死 Rays 后台、升级或重安装 Rays 后,自动分享将被禁用,需手动打开无障碍权限才可再次启用。\n\n建议允许 Rays 自启动、关联启动和后台运行。\n\n目前支持的应用:\nQQ\n微信\n微博\nTelegram\nInstagram\nDiscord\nWhatsApp</string>
<string name="auto_share_screen_supported_app">自动分享可以直接将表情包分享到上一个页面对应的应用。\n\n该功能需要无障碍权限。在杀死 Rays 后台、升级或重安装 Rays 后,自动分享可能会被禁用,需手动打开无障碍权限才可再次启用。\n\n建议允许 Rays 自启动、关联启动和后台运行。\n\n目前支持的应用:\nQQ\n微信\n微博\nTelegram\nInstagram\nDiscord\nWhatsApp</string>
</resources>
6 changes: 3 additions & 3 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@
<string name="share_config_screen_file_extension">File extension</string>
<string name="share_config_screen_file_extension_description">Add the file extension name when sharing a sticker</string>
<string name="mini_tool_screen_name">Mini Tool</string>
<string name="style_transfer_screen_name">Style Transfer (Beta)</string>
<string name="style_transfer_screen_name">Style Transfer (Experimental)</string>
<string name="style_transfer_screen_transfer">Transfer</string>
<string name="api_screen_name">API</string>
<string name="api_screen_name">API (Experimental)</string>
<string name="api_grant_screen_name">API Grant</string>
<string name="setting_screen_api_description">Application Programming Interface</string>
<string name="api_grant_repo_no_package">No such package is available: %s</string>
Expand All @@ -201,5 +201,5 @@
<string name="auto_share_screen_ignore_regex_format_error">Regex format invalid</string>
<string name="auto_share_screen_accessibility_granted">Accessibility permission granted now</string>
<string name="auto_share_screen_accessibility_not_granted">No accessibility permission granted now</string>
<string name="auto_share_screen_supported_app">Auto share allows you to share a sticker directly to the application corresponding to the previous page.\n\nThis feature requires accessibility permission. After killing the Rays process, upgrading or reinstalling Rays, Auto share will be disabled and needs to be enabled by manually granting accessibility permission. \n\nIt is recommended that Rays should be allowed to launch on startup, launch by other apps and keep running in background.\n\nSupported apps:\nTelegram\nDiscord\nWeChat\nInstagram\nQQ\nWhatsApp\nWeibo</string>
<string name="auto_share_screen_supported_app">Auto share allows you to share a sticker directly to the application corresponding to the previous page.\n\nThis feature requires accessibility permission. After killing the Rays process, upgrading or reinstalling Rays, Auto share may be disabled and needs to be enabled by manually granting accessibility permission. \n\nIt is recommended that Rays should be allowed to launch on startup, launch by other apps and keep running in background.\n\nSupported apps:\nTelegram\nDiscord\nWeChat\nInstagram\nQQ\nWhatsApp\nWeibo</string>
</resources>
Binary file modified image/en/ic_about_screen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified image/en/ic_more_screen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified image/en/ic_settings_screen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified image/zh-rCN/ic_about_screen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified image/zh-rCN/ic_more_screen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified image/zh-rCN/ic_settings_screen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6a9a10c

Please sign in to comment.