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

Commit 697397a2 authored by Nicolas Prevot's avatar Nicolas Prevot
Browse files

Don't show suspended applications in system intent picker dialog.

BUG:26461656
Change-Id: I49cf501cb9992ee19091ab4909adb373cbb4bdce
parent df7a1d69
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1231,7 +1231,9 @@ public class ResolverActivity extends Activity {
                }

                // Filter out any activities that the launched uid does not
                // have permission for.  We don't do this when we have an explicit
                // have permission for.
                // Also filter out those that are suspended because they couldn't
                // be started. We don't do this when we have an explicit
                // list of resolved activities, because that only happens when
                // we are being subclassed, so we can safely launch whatever
                // they gave us.
@@ -1242,7 +1244,9 @@ public class ResolverActivity extends Activity {
                        int granted = ActivityManager.checkComponentPermission(
                                ai.permission, mLaunchedFromUid,
                                ai.applicationInfo.uid, ai.exported);
                        if (granted != PackageManager.PERMISSION_GRANTED) {
                        boolean suspended = (ai.applicationInfo.flags
                                & ApplicationInfo.FLAG_SUSPENDED) != 0;
                        if (granted != PackageManager.PERMISSION_GRANTED || suspended) {
                            // Access not allowed!
                            if (mOrigResolveList == currentResolveList) {
                                mOrigResolveList = new ArrayList<>(mOrigResolveList);