Merge "Add null check for package settings" into gingerbread