DO NOT MERGE Only check internal inset types if they exist am: d5f7ed2782

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12672065

Change-Id: I0a18c928555e943ab23c5e49e16efbf37943605d