summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/notification/NotificationInfo.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/notification/NotificationInfo.java')
-rw-r--r--src/com/android/launcher3/notification/NotificationInfo.java16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/com/android/launcher3/notification/NotificationInfo.java b/src/com/android/launcher3/notification/NotificationInfo.java
index 0b41743b9..1a93e1155 100644
--- a/src/com/android/launcher3/notification/NotificationInfo.java
+++ b/src/com/android/launcher3/notification/NotificationInfo.java
@@ -25,7 +25,6 @@ import android.graphics.drawable.Drawable;
import android.graphics.drawable.Icon;
import android.os.Bundle;
import android.service.notification.StatusBarNotification;
-import android.util.Log;
import android.view.View;
import com.android.launcher3.Launcher;
@@ -66,20 +65,7 @@ public class NotificationInfo implements View.OnClickListener {
title = notification.extras.getCharSequence(Notification.EXTRA_TITLE);
text = notification.extras.getCharSequence(Notification.EXTRA_TEXT);
- // TODO(b/36855196): use getBadgeIconType() without reflection
- int badgeIcon = Notification.BADGE_ICON_NONE;
- try {
- badgeIcon = (int) Notification.class.getMethod("getBadgeIconType").invoke(notification);
- } catch (Exception e) {
- Log.w("NotificationInfo", "getBadgeIconType() failed", e);
- // Try the old name, getBadgeIcon(), instead.
- try {
- badgeIcon = (int) Notification.class.getMethod("getBadgeIcon").invoke(notification);
- } catch (Exception e1) {
- Log.e("NotificationInfo", "getBadgeIcon() failed", e);
- }
- }
- mBadgeIcon = badgeIcon;
+ mBadgeIcon = notification.getBadgeIconType();
// Load the icon. Since it is backed by ashmem, we won't copy the entire bitmap
// into our process as long as we don't touch it and it exists in systemui.
Icon icon = mBadgeIcon == Notification.BADGE_ICON_SMALL ? null : notification.getLargeIcon();