Reason for 5 sec delay to show an activity on pres

2019-01-26 22:22发布

I am facing delay of 5 sec to show an Activity after pressing the HOME key. I had gone through some post and found that after pressing the HOME button, android prevents services and broadcast-receivers from calling startActivity for 5 seconds.

Q1. Can anyone please let me know the reason to happening this delay ?

Q2. When I modified the ActivityManagerService::checkAppSwitchAllowedLocked() to always return true, it avoids checking lock and hence Activity gets shown without any delay. Would it be a good solution to avoid delay or it may cause any wrong effect in other ways ?

1条回答
别忘想泡老子
2楼-- · 2019-01-26 22:49

I know, it's probably too late (half year passed). However, here is the answer

查看更多
登录 后发表回答