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

Commit f242905a authored by Ivan Podogov's avatar Ivan Podogov Committed by android-build-merger
Browse files

Fix Settings crash when trying to show work policy info am: 242ff568

am: 9de5b04d

Change-Id: I5b3275f599364ede6ce1c69376bfa68a05c9c301
parents b8b18944 9de5b04d
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -279,7 +279,8 @@ public class EnterprisePrivacyFeatureProviderImpl implements EnterprisePrivacyFe
        // Only search for the required action in the Device Owner's package
        final Intent intent =
                new Intent(mResources.getString(R.string.config_work_policy_info_intent_action))
                        .setPackage(ownerComponent.getPackageName());
                        .setPackage(ownerComponent.getPackageName())
                        .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        final List<ResolveInfo> activities = mPm.queryIntentActivities(intent, 0);
        if (activities.size() != 0) {
            return intent;
@@ -302,7 +303,8 @@ public class EnterprisePrivacyFeatureProviderImpl implements EnterprisePrivacyFe
        // Only search for the required action in the Profile Owner's package
        final Intent intent =
                new Intent(mResources.getString(R.string.config_work_policy_info_intent_action))
                        .setPackage(ownerComponent.getPackageName());
                        .setPackage(ownerComponent.getPackageName())
                        .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        final List<ResolveInfo> activities = mPm.queryIntentActivitiesAsUser(intent, 0, userId);
        if (activities.size() != 0) {
            return intent;