OSDN Git Service

[ActivityManager] Avoid keeping restarting home when only home activity exists.
authorriddle_hsu <riddle_hsu@htc.com>
Fri, 4 Jul 2014 09:01:56 +0000 (17:01 +0800)
committerriddle_hsu <riddle_hsu@htc.com>
Fri, 4 Jul 2014 09:01:56 +0000 (17:01 +0800)
commit3145b2490214a8feaff83950d6b903b2180aa869
tree2f0c4730da616d7e9c80da9e2f9a80989162e8c1
parenta6e9dd3f9a2d966faf2d1710d2189127b968dc52
[ActivityManager] Avoid keeping restarting home when only home activity exists.

Root Cause:
When there is only home activity existed,
updating home apk will call forceStopPackageLocked to finish the activity.
Then activity history becomes empty, then home will be launched,
but its package is still target to close that results a loop.

Solution:
If home activity has been force-stopped, do not stop the same home activity again.

Change-Id: Icff12028d407873c2e6f50a06bcad231b908ccbd
services/java/com/android/server/am/ActivityStack.java