fix(§10.5): 通知中心叠加媒体保活——播放中 App 不 SIGSTOP(修播放中滑通知中心音乐停)
- launcher: run_app_notif_overlay 入口 meow_media_app_playing() 判定(当前源+PLAYING+app_id 匹配) → 不 SIGSTOP/不 SIGCONT,App 续跑保 PCM;非播放中维持 SIGSTOP 模板;关闭时 unlink 标记挪到 恢复帧上屏后(防未冻结 App 抢 present 一帧回闪)。 - SDK gfx: present() 见 /tmp/meow_notif_active(env MEOW_NOTIF_ACTIVE_FILE 覆写)自抑上屏, 仅 App 进程(系统 UI/launcher 不抑制),200ms 节流 stat,脏区累积解除后一次上屏; meow_gfx_overlay_suppressed_count 供单测断言。 - SDK input: 叠加期排空丢弃本进程 evdev 副本 + EVIOCGKEY 位图静默对齐(防面板点击被 App 双重消费/解除后边沿误判),进入沿复位触摸状态机。 - 宿主:新 test_overlay_suppress T1-T4 + test_media §8(8 用例)全 PASS;test_notif_*/ test_sdk_*/test_vol_ramp_jack 等回归全过;zig-mipsel -Wall -Wextra 全 TU 0 warning。 - meow_launcherd fbb82036(/usr/bin 只读待固件,fw_content.conf 已更)/ meow_ui.a d6242fc2 / hello a073535a / files 2b799d07(已热更到卡);ncm 未重链(ncm_app 他 agent 在改)。
This commit is contained in:
1 parent
820d1e52bf
commit
ad9778476a
19 files changed
+254
-13
No files matched your search
@@ -42,6 +42,11 @@
|
||||
#define MUI_DEFAULT_W 480
|
||||
#define MUI_DEFAULT_H 720
|
||||
|
||||
/* §10.5 叠加让位标记:与 launcher meow_launcher_internal.h NOTIF_ACTIVE 同路径。
|
||||
* 通知中心叠加会话期存在;宿主/单测可经 MEOW_NOTIF_ACTIVE_FILE 覆写路径(进程内只解析一次)。 */
|
||||
#define MEOW_NOTIF_ACTIVE_DEFAULT "/tmp/meow_notif_active"
|
||||
#define MEOW_OVERLAY_CHK_MS 200 /* 存在性检查节流:别每帧 stat */
|
||||
|
||||
/* 脏矩形上限(超出合并为全屏) */
|
||||
#define MUI_DIRTY_MAX 12
|
||||
|
||||
@@ -939,10 +944,42 @@ static int statusbar_touched(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ---- §10.5 叠加让位自抑(present 层)----
|
||||
* /tmp/meow_notif_active 存在 = 通知中心叠加会话进行中(launcher 正在 fb 上渲染面板)。
|
||||
* App 进程(非系统 UI 渲染者)此时不上屏;200ms 节流缓存存在性(别每帧 stat)。
|
||||
* 计数 g_overlay_suppressed 供宿主单测断言(meow_gfx_overlay_suppressed_count)。 */
|
||||
static unsigned long long g_overlay_suppressed = 0;
|
||||
|
||||
static int overlay_present_suppressed(void)
|
||||
{
|
||||
if (meow_ui_sys_render_enabled()) return 0; /* launcher(系统 UI)渲染面板,照常上屏 */
|
||||
static char s_path[108];
|
||||
static int s_path_init = 0;
|
||||
static unsigned long long s_last_chk = 0;
|
||||
static int s_last_res = 0;
|
||||
if (!s_path_init) {
|
||||
const char *e = getenv("MEOW_NOTIF_ACTIVE_FILE");
|
||||
snprintf(s_path, sizeof s_path, "%s", (e && e[0]) ? e : MEOW_NOTIF_ACTIVE_DEFAULT);
|
||||
s_path_init = 1;
|
||||
}
|
||||
unsigned long long now = now_ms();
|
||||
if (s_last_chk && now - s_last_chk < MEOW_OVERLAY_CHK_MS) return s_last_res;
|
||||
s_last_chk = now;
|
||||
s_last_res = (access(s_path, F_OK) == 0) ? 1 : 0;
|
||||
return s_last_res;
|
||||
}
|
||||
|
||||
unsigned long long meow_gfx_overlay_suppressed_count(void) { return g_overlay_suppressed; }
|
||||
|
||||
static void present(void)
|
||||
{
|
||||
if (!g_init_ok || !g_back_buf) return;
|
||||
if (!(g_dirty_full || g_ndirty > 0)) return;
|
||||
/* §10.5 叠加让位自抑(仅 App 进程):App 前台播放中唤起通知中心时 launcher 不 SIGSTOP
|
||||
* (保 PCM 供流,ncm 播放线程同进程),改由 App 进程在此自抑上屏——绘制照常进 back_buf,
|
||||
* 只是不 present 到 fb,防 App 重绘穿透 launcher 叠加层。系统 UI 进程(launcher 渲染面板)
|
||||
* 不抑制。抑制期脏区保留累积(超上限自然升级整帧),标记消失后下一次 present 一次上屏。 */
|
||||
if (overlay_present_suppressed()) { g_overlay_suppressed++; return; }
|
||||
/* 帧率门控(A-1/A-2,从 launcher 迁入):present 距上次 ≥ period(1000/eff_rate) 才呈现;
|
||||
* 未满周期则保留脏区(不 dirty_reset),下一轮再试。refresh_always_max=1 时跳过门控(恒满速)。 */
|
||||
unsigned long long now = now_ms();
|
||||
|
||||
Reference in new issue
Block a user