Freeze apps during upgrade, check if uninstalled.

When an app is actively being upgraded, mark it as being "frozen"
to prevent it from being launched in a weird state.  Also verify that
app is actually installed before letting Zygote fork it, working
around race conditions during user setup.

When the ProcessRecord of an ActivityRecord is inconsistent,
warn about it, but correct it and keep moving if the UIDs match.

Bug: 27200022, 26205678
Change-Id: I6628cf1cece5613f07647e0acc2d49265e69dc69
2 files changed