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

Commit 1d03d085 authored by Przemyslaw Szczepaniak's avatar Przemyslaw Szczepaniak Committed by android-build-merger
Browse files

Add getLocationFlags getter to PackageManagerNative.

am: 02d8a7c5

Change-Id: If834090e6a66b146ea38dc9116c8eb3a7a5050af
parents 83882781 02d8a7c5
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -23934,6 +23934,23 @@ 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)
                    | (appInfo.isProductServices()
                            ? IPackageManagerNative.LOCATION_PRODUCT_SERVICES : 0));
        }
    }
    private class PackageManagerInternalImpl extends PackageManagerInternal {