summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2015-08-06 12:11:51 -0700
committerYorke Lee <yorkelee@google.com>2015-08-06 12:11:51 -0700
commit202a140e8e89c8fffec84aeefb606d58cb50f6d6 (patch)
treecf941c570ac8414d1670a617b3c2c235a0638641
parente33213bc4cebc6c18b35aceaa71b1647271f968a (diff)
Catch RuntimeException when calling setExcludeFromRecents
Bug: 22924782 Change-Id: I1da931b805658376fb9db418210662273d9c1db8
-rw-r--r--InCallUI/src/com/android/incallui/InCallActivity.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java
index acb11b5a7..c6892b21a 100644
--- a/InCallUI/src/com/android/incallui/InCallActivity.java
+++ b/InCallUI/src/com/android/incallui/InCallActivity.java
@@ -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) {
- task.setExcludeFromRecents(exclude);
+ try {
+ task.setExcludeFromRecents(exclude);
+ } catch (RuntimeException e) {
+ Log.e(TAG, "RuntimeException when excluding task from recents.", e);
+ }
}
}
}