Merge "Fix bug in activity resolving logic" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
c0e7790931
@@ -1092,12 +1092,9 @@ final class DevicePolicyEngine {
|
|||||||
if (policies.get(admin).getValue() != null
|
if (policies.get(admin).getValue() != null
|
||||||
&& policies.get(admin).getValue().getPackageName().equals(packageName)) {
|
&& policies.get(admin).getValue().getPackageName().equals(packageName)) {
|
||||||
try {
|
try {
|
||||||
if (packageManager.getPackageInfo(
|
if (packageManager.getPackageInfo(packageName, 0, userId) == null
|
||||||
packageName, 0, userId) == null
|
|| packageManager.getActivityInfo(
|
||||||
|| packageManager.getReceiverInfo(policies.get(admin).getValue(),
|
policies.get(admin).getValue(), 0, userId) == null) {
|
||||||
PackageManager.MATCH_DIRECT_BOOT_AWARE
|
|
||||||
| PackageManager.MATCH_DIRECT_BOOT_UNAWARE,
|
|
||||||
userId) == null) {
|
|
||||||
Slogf.e(TAG, String.format(
|
Slogf.e(TAG, String.format(
|
||||||
"Persistent preferred activity in package %s not found for "
|
"Persistent preferred activity in package %s not found for "
|
||||||
+ "user %d, removing policy for admin",
|
+ "user %d, removing policy for admin",
|
||||||
|
|||||||
Reference in New Issue
Block a user