Fixed layout inflater throwing NullPointerException during initization.

getPackage method may return null in non-real environment like Robolectric.