diff options
Diffstat (limited to 'java/com/android/dialer/main/impl/BottomNavBar.java')
-rw-r--r-- | java/com/android/dialer/main/impl/BottomNavBar.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/java/com/android/dialer/main/impl/BottomNavBar.java b/java/com/android/dialer/main/impl/BottomNavBar.java index 66a57becd..a4ddc0652 100644 --- a/java/com/android/dialer/main/impl/BottomNavBar.java +++ b/java/com/android/dialer/main/impl/BottomNavBar.java @@ -119,6 +119,20 @@ final class BottomNavBar extends LinearLayout { } } + void setNotificationCount(@TabIndex int tab, int count) { + if (tab == TabIndex.SPEED_DIAL) { + speedDial.setNotificationCount(count); + } else if (tab == TabIndex.HISTORY) { + callLog.setNotificationCount(count); + } else if (tab == TabIndex.CONTACTS) { + contacts.setNotificationCount(count); + } else if (tab == TabIndex.VOICEMAIL) { + voicemail.setNotificationCount(count); + } else { + throw new IllegalStateException("Invalid tab: " + tab); + } + } + void setOnTabSelectedListener(OnBottomNavTabSelectedListener listener) { this.listener = listener; } |