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

Commit a3da5929 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Extend the client logs when the calling package name is not identified...

Merge "Extend the client logs when the calling package name is not identified in the logs." am: e1d41a45

Change-Id: Iba3df7d83bd2c3df91837fb4295b22257bbb5c13
parents 200dc9da e1d41a45
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -89,9 +89,9 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import java.util.function.Supplier;

/** Implementation of {@link AppIntegrityManagerService}. */
public class AppIntegrityManagerServiceImpl extends IAppIntegrityManager.Stub {
@@ -656,8 +656,10 @@ public class AppIntegrityManagerServiceImpl extends IAppIntegrityManager.Stub {
        String callerPackageName = getCallerPackageName();
        if (callerPackageName == null) {
            throw new SecurityException(
                    "Only system packages specified in config_integrityRuleProviderPackages are"
                            + " allowed to call this method.");
                    String.format(
                            "Only system packages specified in config_integrityRuleProviderPackages"
                                    + " are allowed to call this method. These packages are %s.",
                            getAllowedRuleProviders().toString()));
        }
        return callerPackageName;
    }
@@ -674,7 +676,9 @@ public class AppIntegrityManagerServiceImpl extends IAppIntegrityManager.Stub {
                    if (isSystemApp(packageName)) {
                        return packageName;
                    }
                    Slog.i(TAG, "Rule provider package " + packageName + " is not a system app.");
                }
                Slog.i(TAG, "Package " + packageName + " is not among calling package list.");
            } catch (PackageManager.NameNotFoundException e) {
                // Ignore the exception. We don't expect the app to be necessarily installed.
                Slog.i(TAG, "Rule provider package " + packageName + " not installed.");