Fix bug in activity resolving logic
Test: manual Change-Id: I77185c981c9cefd1ca98b1d1f6945c65843113fe
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user