Additional checks to prevent partitioning internal storage

Change-Id: I9fcd7e0169fbdd52405c0c86aafbef091f69411e
Merge remote-tracking branch 'omni/android-4.4' into android-4.4