Merge "Catch bubbles exception in PeopleTiles" into sc-dev am: 2c95c7632a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14946990 Change-Id: Id0ff298f70f2d71f9d86e18b4ed49e0ed0d29066
This commit is contained in:
@@ -240,9 +240,16 @@ public class NotificationHelper {
|
|||||||
/** Returns whether {@code entry} is suppressed from shade, meaning we should not show it. */
|
/** Returns whether {@code entry} is suppressed from shade, meaning we should not show it. */
|
||||||
public static boolean shouldFilterOut(
|
public static boolean shouldFilterOut(
|
||||||
Optional<Bubbles> bubblesOptional, NotificationEntry entry) {
|
Optional<Bubbles> bubblesOptional, NotificationEntry entry) {
|
||||||
return bubblesOptional.isPresent()
|
boolean isSuppressed = false;
|
||||||
|
//TODO(b/190822282): Investigate what is causing the NullPointerException
|
||||||
|
try {
|
||||||
|
isSuppressed = bubblesOptional.isPresent()
|
||||||
&& bubblesOptional.get().isBubbleNotificationSuppressedFromShade(
|
&& bubblesOptional.get().isBubbleNotificationSuppressedFromShade(
|
||||||
entry.getKey(), entry.getSbn().getGroupKey());
|
entry.getKey(), entry.getSbn().getGroupKey());
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.e(TAG, "Exception checking if notification is suppressed: " + e);
|
||||||
|
}
|
||||||
|
return isSuppressed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user