Ensure Compat MediaStyle Large Icons are shown pre-API 21
The large icon associated with a NotificationCompat.MediaStyle
notification will now always be shown if it available - previously
showing a MediaStyle notification without a large icon would cause
subsequent updates to the notification to ignore newly added
large icons on pre-API 21 devices due to the visibility not being
reset.
BUG: 23797074
Change-Id: Ia5e4c1bd840546f6504d3ccd8ac88e2780931f16
diff --git a/v7/appcompat/src/android/support/v7/internal/app/NotificationCompatImplBase.java b/v7/appcompat/src/android/support/v7/internal/app/NotificationCompatImplBase.java
index c52290dc..d77d3c4 100644
--- a/v7/appcompat/src/android/support/v7/internal/app/NotificationCompatImplBase.java
+++ b/v7/appcompat/src/android/support/v7/internal/app/NotificationCompatImplBase.java
@@ -173,6 +173,7 @@
// On versions before Jellybean, the large icon was shown by SystemUI, so we need to hide
// it here.
if (largeIcon != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
+ contentView.setViewVisibility(R.id.icon, View.VISIBLE);
contentView.setImageViewBitmap(R.id.icon, largeIcon);
} else {
contentView.setViewVisibility(R.id.icon, View.GONE);