Add checks to detect wrong conditions when creating Applications

Bug: 185177290
Test: Boot + monitor logcat
Change-Id: Icd9f5e891c7b7fe32ee4144d95dd26139b87d9cf
2 files changed