Fix various crashes from a destroy-timeout activity
This prevents below 3 cases that caused by using the
removed token to server side:
Block at | From method | Exception
-----------------------------------------------------
onCreate | reportSizeConfigurations | IllegalArgument
onStart | isTopOfTask | IllegalArgument
onResume | addView | BadToken
Bug: 109718716
Test: atest CtsActivityManagerDeviceTestCases:ActivityLifecycleTests
Test: Sample app in bug link.
Change-Id: I123a048c36f7ddbca0d5b1bf8060c3a4dd13a903
2 files changed