OSDN Git Service

Fix NPE when destroyActivity occurs after detach.
authorCraig Mautner <cmautner@google.com>
Thu, 16 Jan 2014 01:55:51 +0000 (17:55 -0800)
committerCraig Mautner <cmautner@google.com>
Thu, 16 Jan 2014 01:59:22 +0000 (17:59 -0800)
commit593a4e6f982cecddc3f2f6107044b5e12fab3e20
tree2454be343fa3d6e16fbb5651dbc699f01c5c5e5b
parente9ddaa0b183d979be782a63970929cebd861b7c9
Fix NPE when destroyActivity occurs after detach.

 *** FATAL EXCEPTION IN SYSTEM PROCESS: ActivityManager
 java.lang.NullPointerException
  at com.android.server.am.ActivityStack.removeTask(ActivityStack.java:3627)
  at com.android.server.am.ActivityStack.removeActivityFromHistoryLocked(ActivityStack.java:2693)
  at com.android.server.am.ActivityStack.activityDestroyedLocked(ActivityStack.java:2878)
  at com.android.server.am.ActivityStack$ActivityStackHandler.handleMessage(ActivityStack.java:296)
  at android.os.Handler.dispatchMessage(Handler.java:102)
  at android.os.Looper.loop(Looper.java:136)
  at com.android.server.am.ActivityManagerService$AThread.run(ActivityManagerService.java:1868)

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