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

Commit 11c4cc19 authored by Kenny Guy's avatar Kenny Guy Committed by android-build-merger
Browse files

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

automerge: 06ab0ca4

* commit '06ab0ca4':
  Only hide cross profile disclosure when showing resolver.
parents 45c5f9d1 06ab0ca4
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);