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

Commit 06ab0ca4 authored by Kenny Guy's avatar Kenny Guy Committed by Android (Google) Code Review
Browse files

Merge "Only hide cross profile disclosure when showing resolver." into lmp-mr1-dev

parents af69fcd0 2b43c73e
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -96,9 +96,12 @@ public class IntentForwarderActivity extends Activity {
            final android.content.pm.ResolveInfo ri = getPackageManager().resolveActivityAsUser(
                        newIntent, MATCH_DEFAULT_ONLY, targetUserId);

            // Only show a disclosure if this is a normal (non-OS) app
            final boolean shouldShowDisclosure =
                    !UserHandle.isSameApp(ri.activityInfo.applicationInfo.uid, Process.SYSTEM_UID);
            // Don't show the disclosure if next activity is ResolverActivity or ChooserActivity
            // as those will already have shown work / personal as neccesary etc.
            final boolean shouldShowDisclosure = ri == null || ri.activityInfo == null ||
                    !"android".equals(ri.activityInfo.packageName) ||
                    !(ResolverActivity.class.getName().equals(ri.activityInfo.name)
                    || ChooserActivity.class.getName().equals(ri.activityInfo.name));

            try {
                startActivityAsCaller(newIntent, null, targetUserId);