From 26505585a499aee584e337f25d75450975cbcd44 Mon Sep 17 00:00:00 2001 From: Chris Wren Date: Wed, 22 Jul 2015 17:03:17 -0400 Subject: [PATCH] Don't crash sysui when advisory calls fail. Bug: 22653721 Change-Id: I8e2fc3887b7c71f99eb02306ce308f722dba4d07 --- .../src/com/android/systemui/statusbar/BaseStatusBar.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index f62dc5981e41c..a2e6632f2379a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -729,11 +729,15 @@ public abstract class BaseStatusBar extends SystemUI implements } protected void setNotificationShown(StatusBarNotification n) { - mNotificationListener.setNotificationsShown(new String[] { n.getKey() }); + setNotificationsShown(new String[]{n.getKey()}); } protected void setNotificationsShown(String[] keys) { - mNotificationListener.setNotificationsShown(keys); + try { + mNotificationListener.setNotificationsShown(keys); + } catch (RuntimeException e) { + Log.d(TAG, "failed setNotificationsShown: ", e); + } } protected boolean isCurrentProfile(int userId) {