summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/RenderScript.java
diff options
context:
space:
mode:
authorriddle_hsu <riddle_hsu@htc.com>2015-06-05 16:38:38 +0800
committerriddle_hsu <riddle_hsu@htc.com>2015-06-05 16:38:38 +0800
commit3fe52da421abba355a51b8b5c6dd2ca073383c18 (patch)
treea408e3299f68fc7a41900a44cbfcbf6445bf238e /rs/java/android/renderscript/RenderScript.java
parent34a63ba4d79567146f2724c47b06ffa4f21639da (diff)
[ActivityManager] Fix index OOB when updating visible.
If there is an Activity Z of Task T needs be visible but isn't running, and the process P of Z is existed, it will just to schedule launch Z. The problem will happen when P is died (e.g. kill itself) right before scheduleLaunchActivity. Once RemoteException is caught, startSpecificActivityLocked will try to restart the process and run cleanup procedure because the process record is existed (death recipient of P has not entered AMS yet). And assume task T contains X, Y, Z. X and Y have declared stateNotNeeded=true, so X and Y will be removed from task T. Now the size of task T changes from 3 to 1. And because activityNdx=2 when updating Z, the next round (--activityNdx) will have exception at activities.get(activityNdx): IndexOutOfBoundsException: Invalid index 1, size is 1 The ActivityRecord in TaskRecord is removed by below flow: ActivityStack.ensureActivitiesVisibleLocked ActivityStackSupervisor.startSpecificActivityLocked ActivityStackSupervisor.realStartActivityLocked ApplicationThreadProxy.scheduleLaunchActivity -> IPC fail ActivityManagerService.startProcessLocked ActivityManagerService.handleAppDiedLocked ActivityStackSupervisor.handleAppDiedLocked ActivityStack.handleAppDiedLocked ActivityStack.removeHistoryRecordsForAppLocked ActivityStack.removeActivityFromHistoryLocked task.removeActivity(r) -> mActivities.remove(r) There is also similar patch to solve the same problem: https://android-review.googlesource.com/143780/ Change-Id: Iac646bcb8ed3d3cfb2bda14e05e11abfcfe980d1
Diffstat (limited to 'rs/java/android/renderscript/RenderScript.java')
0 files changed, 0 insertions, 0 deletions