3

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 ?

Shravan
  • 341
  • 6
  • 11

1 Answers1

3

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

Community
  • 1
  • 1
Victor Ronin
  • 22,758
  • 18
  • 92
  • 184