Merge "Add null check before PackageManager operations" into main