summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice/InputMethodService.java
diff options
context:
space:
mode:
authorRiddle Hsu <riddlehsu@google.com>2022-02-22 23:21:15 +0800
committerRiddle Hsu <riddlehsu@google.com>2022-02-22 15:27:00 +0000
commit221c72ded1eff65a8f8ae6346315972501998f23 (patch)
tree0d3695d3ed87bda74b08971dcc3eae940e62d1c4 /core/java/android/inputmethodservice/InputMethodService.java
parent038fd80ce8b34d30bbd4ae8084f085b38ab34ca0 (diff)
Remove process association if it is known to be dead
Otherwise because ActivityRecord#launchFailed is set to true on first failure and other places still try to resume/start it by the existing process, which causes 2nd failure and then removes the activity record. The case can happen when the binder buffer of the app is full or the process becomes zombie state. Because the argument knownToBeDead will request to kill the existing process and start a new one. With removing the record of window process controller, it won't resume the died app again. While the old process is died and new process is attached, the activity record on top can still become alive again. Bug: 220859166 Test: Add below test code at the beginning of ClientLifecycleManager#scheduleTransaction ActivityRecord a = ActivityRecord.forTokenLocked( transaction.getActivityToken()); if (a != null && a.app != null && a.app.getPid() == SystemProperties.getInt("p", -1)) { throw new RemoteException("test"); } Use "adb shell setprop p $pid" for a background activity. After starting it again to resume it, the old process will be killed and the activity can be launched successfully with new process. Change-Id: I30cbd8386ea3a4c4c3c76426b5d0966ea6d67575
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
0 files changed, 0 insertions, 0 deletions