Merge "Try to fix IndexOutBoundsException in Task#removeChild" into rvc-dev am: e938c572b7 am: f6bc5e256e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11836345

Change-Id: I73074f3e33fc71820012b95fe3f89b87bc486b8f