fix google package spoofing for packages not using the google app key(e40562460c)

This commit is contained in:
inotia00 2022-10-26 15:05:36 +09:00
commit 9e46e845d2

View file

@ -83,6 +83,7 @@ public class PackageUtils {
String[] packagesForUid = context.getPackageManager().getPackagesForUid(Binder.getCallingUid());
if (packagesForUid != null && packagesForUid.length != 0) {
for (String packageName : packagesForUid) {
packageName = PackageSpoofUtils.spoofPackageName(context.getPackageManager(), packageName);
if (isGooglePackage(context, packageName) || GMS_PACKAGE_NAME.equals(packageName))
return true;
}