Make app zygote launches more robust.

In case a process launch times out, there are paths in
ActivityManagerService that call removeProcessNameLocked() more than
once; in case such a process is using the application zygote, that can
cause the logic to remove the same ProcessRecord from the application
zygote twice, resulting in a NullPointerException.

Bug: 123758436
Test: atest android.app.cts.ServiceTest#testActivityServiceBindingLru
Change-Id: Id5462b6005a7c0601820332344af5be6d10eb319
1 file changed