Handle app dying.

Fix bugs related to handleAppDied.
Fixes bug 8658744.

Change-Id: I0ba2466ffac5e465e803e97a781810c34a6de371
2 files changed