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

Commit a2bdffee authored by Michael Jurka's avatar Michael Jurka
Browse files

Prevent SecurityException from crashing Recents

Bug: 6787477
parent cd3b804e
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -682,8 +682,12 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
                    | Intent.FLAG_ACTIVITY_TASK_ON_HOME
                    | Intent.FLAG_ACTIVITY_NEW_TASK);
            if (DEBUG) Log.v(TAG, "Starting activity " + intent);
            try {
                context.startActivityAsUser(intent, opts,
                        new UserHandle(UserHandle.USER_CURRENT));
            } catch (SecurityException e) {
                Log.e(TAG, "Recents does not have the permission to launch " + intent, e);
            }
        }
        if (usingDrawingCache) {
            holder.thumbnailViewImage.setDrawingCacheEnabled(false);