Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aef149ec authored by Przemyslaw Szczepaniak's avatar Przemyslaw Szczepaniak Committed by Gerrit Code Review
Browse files

Merge changes from topic "nnapi_ext_restrict"

* changes:
  Remove PRODUCT_SERVICES from PackageManagerNative.getLocation.
  Add getLocationFlags getter to PackageManagerNative.
parents 0013d45b 50b03113
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -23934,6 +23934,21 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
            }
            return 0;
        }
        @Override
        public int getLocationFlags(String packageName) throws RemoteException {
            int callingUser = UserHandle.getUserId(Binder.getCallingUid());
            ApplicationInfo appInfo = getApplicationInfo(packageName,
                    /*flags*/ 0,
                    /*userId*/ callingUser);
            if (appInfo == null) {
                throw new RemoteException(
                        "Couldn't get ApplicationInfo for package " + packageName);
            }
            return ((appInfo.isSystemApp() ? IPackageManagerNative.LOCATION_SYSTEM : 0)
                    | (appInfo.isVendor() ? IPackageManagerNative.LOCATION_VENDOR : 0)
                    | (appInfo.isProduct() ? IPackageManagerNative.LOCATION_PRODUCT : 0));
        }
    }
    private class PackageManagerInternalImpl extends PackageManagerInternal {