From f3241ee339b4325217c3cdade2c4c639405abcb2 Mon Sep 17 00:00:00 2001 From: nsl Date: Fri, 19 May 2023 12:26:26 +0000 Subject: [PATCH] Remove GET_ACTIVITIES in InteractAcrossProfiles in Settings Remove the GET_ACTIVITIES flag in InteractAcrossProfiles in Settings to follow ag/23343098 Bug: 283407612 Test: InteractAcrossProfilesSettingsTest Change-Id: I299a4a40af3e59f729027b964e938d7783eb7d92 --- .../InteractAcrossProfilesSettings.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/com/android/settings/applications/specialaccess/interactacrossprofiles/InteractAcrossProfilesSettings.java b/src/com/android/settings/applications/specialaccess/interactacrossprofiles/InteractAcrossProfilesSettings.java index ba0d9afd97f..8169072d868 100644 --- a/src/com/android/settings/applications/specialaccess/interactacrossprofiles/InteractAcrossProfilesSettings.java +++ b/src/com/android/settings/applications/specialaccess/interactacrossprofiles/InteractAcrossProfilesSettings.java @@ -16,10 +16,8 @@ package com.android.settings.applications.specialaccess.interactacrossprofiles; import static android.app.admin.DevicePolicyResources.Strings.Settings.CONNECTED_WORK_AND_PERSONAL_APPS_TITLE; -import static android.content.pm.PackageManager.GET_ACTIVITIES; import android.annotation.Nullable; -import android.app.admin.DevicePolicyManager; import android.app.settings.SettingsEnums; import android.content.Context; import android.content.pm.ApplicationInfo; @@ -157,9 +155,9 @@ public class InteractAcrossProfilesSettings extends EmptyTextSettings { private static List getAllInstalledPackages( PackageManager packageManager, UserHandle personalProfile, UserHandle workProfile) { List personalPackages = packageManager.getInstalledPackagesAsUser( - GET_ACTIVITIES, personalProfile.getIdentifier()); + /* flags= */ 0, personalProfile.getIdentifier()); List workPackages = packageManager.getInstalledPackagesAsUser( - GET_ACTIVITIES, workProfile.getIdentifier()); + /* flags= */ 0, workProfile.getIdentifier()); List allPackages = new ArrayList<>(personalPackages); for (PackageInfo workPackage : workPackages) { if (allPackages.stream().noneMatch(