Skip to content

feat: 新增解除背屏应用白名单限制功能#1516

Open
ghhccghk wants to merge 5 commits intoReChronoRain:mainfrom
ghhccghk:main_fuck
Open

feat: 新增解除背屏应用白名单限制功能#1516
ghhccghk wants to merge 5 commits intoReChronoRain:mainfrom
ghhccghk:main_fuck

Conversation

@ghhccghk
Copy link
Copy Markdown
Contributor

  • 新增功能: 添加了 FuckSubScreenWhiteList Hook 类,通过拦截 ActivityStarterImpl 中的 isShouldShowOnRearDisplayisAllowedToStartOnRearDisplay 方法,强制返回 true 以解除背屏软件使用限制。
  • 界面配置:
    • framework_display.xml 中新增了相关设置选项。
    • 补全了中英文语言资源文件(strings_app.xml)中的标题与描述。
  • 集成: 在 SystemFrameworkV 中初始化并注册了该 Hook 逻辑。

ghhccghk added 5 commits April 4, 2026 21:25
- **新增功能**: 添加了 `FuckSubScreenWhiteList` Hook 类,通过拦截 `ActivityStarterImpl` 中的 `isShouldShowOnRearDisplay` 和 `isAllowedToStartOnRearDisplay` 方法,强制返回 `true` 以解除背屏软件使用限制。
- **界面配置**:
    - 在 `framework_display.xml` 中新增了相关设置选项。
    - 补全了中英文语言资源文件(`strings_app.xml`)中的标题与描述。
- **集成**: 在 `SystemFrameworkV` 中初始化并注册了该 Hook 逻辑。

Signed-off-by: ghhccghk <2137610394@qq.com>
- **新增功能**: 在 `FuckSubScreenWhiteList` 中新增 Hook 逻辑,支持禁止背屏在息屏或关闭时自动返回桌面。
- **界面优化**: 在 `framework_display.xml` 中新增“背屏”设置分类(PreferenceCategory),并将背屏白名单与新功能选项归类。
- **资源更新**: 补充了中英文对应的字符串资源 `system_framework_fuck_subscreen_not_go_to_home` 及 `subscreen`。

Signed-off-by: ghhccghk <2137610394@qq.com>
- **XML 结构修复:** 修正了 `PreferenceCategory` 标签的闭合逻辑,解决了背屏(subscreen)配置项在 XML 中的嵌套层级问题。
- **格式调整:** 统一了配置项的缩进格式,提升了资源文件的可读性。

Signed-off-by: ghhccghk <2137610394@qq.com>
- **逻辑修正:** 在 `handlerTransitionFinished` 方法的 Hook 逻辑中,将修改的参数索引从 `args[4]` 更正为 `args[3]`。

Signed-off-by: ghhccghk <2137610394@qq.com>
- **新增 Hook:** 在 `ActivityStarterImpl` 类中新增了对 `handleSubScreen` 方法的拦截。
- **逻辑实现:** 强制 `handleSubScreen` 方法返回 `false`,以进一步优化或绕过系统背屏显示的限制。

Signed-off-by: ghhccghk <2137610394@qq.com>
@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant