getRecentTasks过程

本文详细解析了Launcher如何通过调用ActivityManager和ActivityManagerNative来获取最近的任务列表,涉及WmtSidebar.java和getRecentTasks方法的实现。
部署运行你感兴趣的模型镜像

应用 Launcher WmtSidebar.java 调用 getRecentTasks

 

Framework 中的 ActivityManager.java ActivityManager.getRecentTasks

 

ActivityManagerNative.java ActivityManagerProxy.getRecentTasks

 

mRemote.transact(GET_RECENT_TASKS_TRANSACTION, data, reply, 0);

 

ActivityManagerNative.java onTransact 函数里 reply.writeTypedList(list);

 

ActivityManager.java RecentTaskInfo.writeToParcel

您可能感兴趣的与本文相关的镜像

Stable-Diffusion-3.5

Stable-Diffusion-3.5

图片生成
Stable-Diffusion

Stable Diffusion 3.5 (SD 3.5) 是由 Stability AI 推出的新一代文本到图像生成模型,相比 3.0 版本,它提升了图像质量、运行速度和硬件效率

2025-07-18 09:37:24.226 1425-1425 vendor.qti...al-service ven...qti.hardware.perf-hal-service E ExtendedPerfBoost: extended_perfboost_verification() 738: Ok, set boost params. hintid=4225 hinttype=1 prio=3, clientpid=2569 packagename=com.example.text params=boost:1 cpu0:1804800 cpu4:2496000 cpu7:2592000 cpumask:ff 2025-07-18 09:37:24.248 20986-20986 Zygote usap64 E process_name_ptr:20986 com.example.text 2025-07-18 09:37:24.319 27603-3228 SuggestManager com.miui.securitycenter.remote E openApp name = com.example.text 2025-07-18 09:37:24.327 4285-5371 ActivityManagerWrapper com.miui.home E getRecentTasks: mainTaskId=10282 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=268435456 cmp=ComponentInfo{com.example.text/com.example.text.MainActivity} } 2025-07-18 09:37:24.335 27603-13357 AntiFraud com.miui.securitycenter.remote E hookDetectUnsafeAppStart error, android.content.pm.PackageManager$NameNotFoundException: com.example.text at android.app.ApplicationPackageManager.getApplicationInfoAsUser(ApplicationPackageManager.java:515) at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:498) at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:492) at w2.b.f(Unknown Source:12) at w2.b$c.onForegroundInfoChanged(Unknown Source:21) at com.miui.gamebooster.mutiwindow.b$a.onForegroundInfoChanged(Unknown Source:152) at miui.process.IForegroundInfoListener$Stub.onTransact(IForegroundInfoListener.java:86) at android.os.Binder.execTransactInternal(Binder.java:1351) at android.os.Binder.execTransact(Binder.java:1282) 2025-07-18 09:37:24.337 8279-10833 SuggestManager com.miui.securitycenter.remote E openApp name = com.example.text ---------------------------- PROCESS STARTED (20986) for package com.example.text ----------------------------
07-19
结合一下这个android的log看看:2025-08-21 19:36:29.163 2526-3957 WindowManager system_server E setClientVisible ActivityRecord{9493e47 u0 com.sharejoy.werewolf2/com.sharejoy.werewolf.MainActivity t775} false 2025-08-21 19:36:29.837 5539-5539 DEBUG crash_dump64 A Cmdline: com.sharejoy.werewolf2 2025-08-21 19:36:29.837 5539-5539 DEBUG crash_dump64 A pid: 16482, tid: 5533, name: UnityMain >>> com.sharejoy.werewolf2 <<< 2025-08-21 19:36:29.838 5539-5539 DEBUG crash_dump64 A #01 pc 0000000000bca2f4 /data/app/~~3GKDbdd9iKxrNLinnlRcaw==/com.sharejoy.werewolf2-NKF_RFom59mIuHGHsprfdQ==/base.apk!libunity.so (offset 0x1603c000) (BuildId: e1e5df1c97d2d7e0) 2025-08-21 19:36:29.838 5539-5539 DEBUG crash_dump64 A #02 pc 0000000000bca870 /data/app/~~3GKDbdd9iKxrNLinnlRcaw==/com.sharejoy.werewolf2-NKF_RFom59mIuHGHsprfdQ==/base.apk!libunity.so (offset 0x1603c000) (BuildId: e1e5df1c97d2d7e0) 2025-08-21 19:36:29.838 5539-5539 DEBUG crash_dump64 A #03 pc 0000000000a0d9d0 /data/app/~~3GKDbdd9iKxrNLinnlRcaw==/com.sharejoy.werewolf2-NKF_RFom59mIuHGHsprfdQ==/base.apk!libunity.so (offset 0x1603c000) (BuildId: e1e5df1c97d2d7e0) 2025-08-21 19:36:29.838 5539-5539 DEBUG crash_dump64 A #04 pc 000000000069bd2c /data/app/~~3GKDbdd9iKxrNLinnlRcaw==/com.sharejoy.werewolf2-NKF_RFom59mIuHGHsprfdQ==/base.apk!libunity.so (offset 0x1603c000) (BuildId: e1e5df1c97d2d7e0) 2025-08-21 19:36:29.838 5539-5539 DEBUG crash_dump64 A #05 pc 000000000069c12c /data/app/~~3GKDbdd9iKxrNLinnlRcaw==/com.sharejoy.werewolf2-NKF_RFom59mIuHGHsprfdQ==/base.apk!libunity.so (offset 0x1603c000) (BuildId: e1e5df1c97d2d7e0) 2025-08-21 19:36:29.838 5539-5539 DEBUG crash_dump64 A #06 pc 000000000069fb04 /data/app/~~3GKDbdd9iKxrNLinnlRcaw==/com.sharejoy.werewolf2-NKF_RFom59mIuHGHsprfdQ==/base.apk!libunity.so (offset 0x1603c000) (BuildId: e1e5df1c97d2d7e0) 2025-08-21 19:36:29.838 5539-5539 DEBUG crash_dump64 A #07 pc 00000000006b7d1c /data/app/~~3GKDbdd9iKxrNLinnlRcaw==/com.sharejoy.werewolf2-NKF_RFom59mIuHGHsprfdQ==/base.apk!libunity.so (offset 0x1603c000) (BuildId: e1e5df1c97d2d7e0) 2025-08-21 19:36:30.021 2526-5577 WindowManager system_server E setClientVisible ActivityRecord{9493e47 u0 com.sharejoy.werewolf2/com.sharejoy.werewolf.MainActivity t775} true ---------------------------- PROCESS ENDED (16482) for package com.sharejoy.werewolf2 ---------------------------- 2025-08-21 19:36:30.170 1812-1812 qspmHal vendor.qti.qspmhal-service E setAppInfoH atPid = 16482, gpuFname:com.sharejoy.werewolf2, gpuFver:20080400 2025-08-21 19:36:30.188 17048-17048 Zygote usap64 E process_name_ptr:17048 com.sharejoy.werewolf2 2025-08-21 19:36:30.188 17048-17048 Zygote usap64 E SetMemoryProtected process_name_ptr:17048 com.sharejoy.werewolf2 2025-08-21 19:36:30.206 1812-1812 qspmHal vendor.qti.qspmhal-service E setAppInfoH atPid = 17048, gpuFname:com.sharejoy.werewolf2, gpuFver:20080401 ---------------------------- PROCESS STARTED (17048) for package com.sharejoy.werewolf2 ---------------------------- 2025-08-21 19:36:30.557 2526-9902 WindowManager system_server E setClientVisible ActivityRecord{9493e47 u0 com.sharejoy.werewolf2/com.sharejoy.werewolf.MainActivity t775} true 2025-08-21 19:36:30.559 2526-2881 WindowManager system_server E setClientVisible ActivityRecord{9493e47 u0 com.sharejoy.werewolf2/com.sharejoy.werewolf.MainActivity t775} true 2025-08-21 19:36:30.590 4388-5250 ActivityManagerWrapper com.miui.home E getRecentTasksForceIncludingTaskIdIfValid: getRecentTasks: size=1 mainTaskId=775 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270532608 cmp=ComponentInfo{com.sharejoy.werewolf2/com.sharejoy.werewolf.MainActivity} } 2025-08-21 19:36:30.632 2526-6046 WindowManager system_server E source = Task{1d177e3 #775 type=standard A=10785:com.sharejoy.werewolf2} excludeMiuiNavBar = true excludeMiuiStatusBar = true excludeIme = false excludeNavBar = true miuiNavSurfaceControl = Surface(name=Miui Fake NavBar#51)/@0x878c667 miuiStatusSurfaceControl = Surface(name=Miui Fake StatusBar#50)/@0x62bb850 2025-08-21 19:36:30.643 4388-5250 ActivityManagerWrapper com.miui.home E getRecentTasksForceIncludingTaskIdIfValid: getRecentTasks: size=1 mainTaskId=775 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270532608 cmp=ComponentInfo{com.sharejoy.werewolf2/com.sharejoy.werewolf.MainActivity} } 2025-08-21 19:36:30.644 2526-5506 WindowManager system_server E source = Task{1d177e3 #775 type=standard A=10785:com.sharejoy.werewolf2} excludeMiuiNavBar = true excludeMiuiStatusBar = true excludeIme = false excludeNavBar = true miuiNavSurfaceControl = Surface(name=Miui Fake NavBar#51)/@0x878c667 miuiStatusSurfaceControl = Surface(name=Miui Fake StatusBar#50)/@0x62bb850 2025-08-21 19:36:30.766 17048-5801 ContentCatcherManager com.sharejoy.werewolf2 E failed to get ContentCatcherService. 2025-08-21 19:36:30.769 17048-5801 ContentCatcherManager com.sharejoy.werewolf2 E failed to get ContentCatcherService. 2025-08-21 19:36:31.016 17048-5841 FramePredict com.sharejoy.werewolf2 E registerContentObserver fail 2025-08-21 19:36:31.019 17048-17048 MI-PreRender com.sharejoy.werewolf2 E init cloud whiteList failed 2025-08-21 19:36:31.027 2526-5506 WindowManager system_server E source = Task{1d177e3 #775 type=standard A=10785:com.sharejoy.werewolf2} excludeMiuiNavBar = true excludeMiuiStatusBar = true excludeIme = false excludeNavBar = true miuiNavSurfaceControl = Surface(name=Miui Fake NavBar#51)/@0x878c667 miuiStatusSurfaceControl = Surface(name=Miui Fake StatusBar#50)/@0x62bb850 2025-08-21 19:36:31.046 2526-5229 WindowManager system_server E setClientVisible ActivityRecord{24dfa9e u0 com.sharejoy.werewolf2/com.sharejoy.werewolf.MainActivity t775 f} isExiting} false 2025-08-21 19:36:31.054 4388-5250 ActivityManagerWrapper com.miui.home E getRecentTasksForceIncludingTaskIdIfValid: getRecentTasks: size=1 mainTaskId=775 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270532608 cmp=ComponentInfo{com.sharejoy.werewolf2/com.sharejoy.werewolf.MainActivity} } 2025-08-21 19:36:31.112 17048-5708 LB com.sharejoy.werewolf2 E fail to open node: No such file or directory 2025-08-21 19:36:31.130 2810-2910 misight_perf misight E [902001002, com.sharejoy.werewolf2, 17048, activity lifecycle latency due to msg] 2025-08-21 19:36:31.132 2810-2910 misight_perf misight E [902001002, com.sharejoy.werewolf2, 17048, activity lifecycle latency due to msg] 2025-08-21 19:36:31.150 2526-9912 WindowManager system_server E setClientVisible ActivityRecord{9493e47 u0 com.sharejoy.werewolf2/com.sharejoy.werewolf.MainActivity t775} false 2025-08-21 19:36:31.545 1812-1812 qspmHal vendor.qti.qspmhal-service E setAppInfoH atPid = 17048, gpuFname:com.sharejoy.werewolf2, gpuFver:20080400 ---------------------------- PROCESS ENDED (17048) for package com.sharejoy.werewolf2 ----------------------------
最新发布
08-22
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值