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

Commit 05bdac0b authored by Kholoud Mohamed's avatar Kholoud Mohamed
Browse files

Fix bug in activity resolving logic

Test: manual
Change-Id: I77185c981c9cefd1ca98b1d1f6945c65843113fe
parent 0f26a22c
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -1076,12 +1076,9 @@ final class DevicePolicyEngine {
                if (policies.get(admin).getValue() != null
                        && policies.get(admin).getValue().getPackageName().equals(packageName)) {
                    try {
                        if (packageManager.getPackageInfo(
                                packageName, 0, userId) == null
                                || packageManager.getReceiverInfo(policies.get(admin).getValue(),
                                PackageManager.MATCH_DIRECT_BOOT_AWARE
                                        | PackageManager.MATCH_DIRECT_BOOT_UNAWARE,
                                userId) == null) {
                        if (packageManager.getPackageInfo(packageName, 0, userId) == null
                                || packageManager.getActivityInfo(
                                        policies.get(admin).getValue(), 0, userId) == null) {
                            Slogf.e(TAG, String.format(
                                    "Persistent preferred activity in package %s not found for "
                                            + "user %d, removing policy for admin",