Prevent exceptions during staged install from crashing system server

An unhandled exception during staged install at boot time  will cause
system server to crash and restart. Upon restart, staged install will
resume again and it will cause system server to crash again. Thus
creating a loop.

Instead of allowing the exception to crash the system server, we now
catch it and fail the corresponding staged session with appropriate
message.

Bug: 170784748
Test: manual
Test: verified that without this fix, any unhandled exception sends
system server into a crash loop

Change-Id: I9abec5d2401af95ecb095fa3c45960d2f15d4e74
1 file changed