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

Commit 202a140e authored by Yorke Lee's avatar Yorke Lee
Browse files

Catch RuntimeException when calling setExcludeFromRecents

Bug: 22924782
Change-Id: I1da931b805658376fb9db418210662273d9c1db8
parent e33213bc
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -871,7 +871,11 @@ public class InCallActivity extends Activity implements FragmentDisplayManager {
        for (int i=0; i<tasks.size(); i++) {
            ActivityManager.AppTask task = tasks.get(i);
            if (task.getTaskInfo().id == taskId) {
                try {
                    task.setExcludeFromRecents(exclude);
                } catch (RuntimeException e) {
                    Log.e(TAG, "RuntimeException when excluding task from recents.", e);
                }
            }
        }
    }