Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/icon/IconManager.kt +1 −18 Original line number Diff line number Diff line Loading @@ -112,15 +112,6 @@ class IconManager @Inject constructor( aodIcon.scaleType = ImageView.ScaleType.CENTER_INSIDE aodIcon.setIncreasedSize(true) // Construct the centered icon view. val centeredIcon = if (entry.sbn.notification.isMediaNotification) { iconBuilder.createIconView(entry).apply { scaleType = ImageView.ScaleType.CENTER_INSIDE } } else { null } // Set the icon views' icons val (normalIconDescriptor, sensitiveIconDescriptor) = getIconDescriptors(entry) Loading @@ -128,10 +119,7 @@ class IconManager @Inject constructor( setIcon(entry, normalIconDescriptor, sbIcon) setIcon(entry, sensitiveIconDescriptor, shelfIcon) setIcon(entry, sensitiveIconDescriptor, aodIcon) if (centeredIcon != null) { setIcon(entry, normalIconDescriptor, centeredIcon) } entry.icons = IconPack.buildPack(sbIcon, shelfIcon, aodIcon, centeredIcon, entry.icons) entry.icons = IconPack.buildPack(sbIcon, shelfIcon, aodIcon, entry.icons) } catch (e: InflationException) { entry.icons = IconPack.buildEmptyPack(entry.icons) throw e Loading Loading @@ -171,11 +159,6 @@ class IconManager @Inject constructor( it.setNotification(entry.sbn, notificationContentDescription) setIcon(entry, sensitiveIconDescriptor, it) } entry.icons.centeredIcon?.let { it.setNotification(entry.sbn, notificationContentDescription) setIcon(entry, sensitiveIconDescriptor, it) } } private fun updateIconsSafe(entry: NotificationEntry) { Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/icon/IconPack.java +2 −11 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ public final class IconPack { @Nullable private final StatusBarIconView mStatusBarIcon; @Nullable private final StatusBarIconView mShelfIcon; @Nullable private final StatusBarIconView mAodIcon; @Nullable private final StatusBarIconView mCenteredIcon; @Nullable private StatusBarIcon mSmallIconDescriptor; @Nullable private StatusBarIcon mPeopleAvatarDescriptor; Loading @@ -43,7 +42,7 @@ public final class IconPack { * haven't been inflated yet or there was an error while inflating them). */ public static IconPack buildEmptyPack(@Nullable IconPack fromSource) { return new IconPack(false, null, null, null, null, fromSource); return new IconPack(false, null, null, null, fromSource); } /** Loading @@ -53,9 +52,8 @@ public final class IconPack { @NonNull StatusBarIconView statusBarIcon, @NonNull StatusBarIconView shelfIcon, @NonNull StatusBarIconView aodIcon, @Nullable StatusBarIconView centeredIcon, @Nullable IconPack source) { return new IconPack(true, statusBarIcon, shelfIcon, aodIcon, centeredIcon, source); return new IconPack(true, statusBarIcon, shelfIcon, aodIcon, source); } private IconPack( Loading @@ -63,12 +61,10 @@ public final class IconPack { @Nullable StatusBarIconView statusBarIcon, @Nullable StatusBarIconView shelfIcon, @Nullable StatusBarIconView aodIcon, @Nullable StatusBarIconView centeredIcon, @Nullable IconPack source) { mAreIconsAvailable = areIconsAvailable; mStatusBarIcon = statusBarIcon; mShelfIcon = shelfIcon; mCenteredIcon = centeredIcon; mAodIcon = aodIcon; if (source != null) { mIsImportantConversation = source.mIsImportantConversation; Loading @@ -91,11 +87,6 @@ public final class IconPack { return mShelfIcon; } @Nullable public StatusBarIconView getCenteredIcon() { return mCenteredIcon; } /** The version of the icon that's shown when pulsing (in AOD). */ @Nullable public StatusBarIconView getAodIcon() { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/icon/IconManager.kt +1 −18 Original line number Diff line number Diff line Loading @@ -112,15 +112,6 @@ class IconManager @Inject constructor( aodIcon.scaleType = ImageView.ScaleType.CENTER_INSIDE aodIcon.setIncreasedSize(true) // Construct the centered icon view. val centeredIcon = if (entry.sbn.notification.isMediaNotification) { iconBuilder.createIconView(entry).apply { scaleType = ImageView.ScaleType.CENTER_INSIDE } } else { null } // Set the icon views' icons val (normalIconDescriptor, sensitiveIconDescriptor) = getIconDescriptors(entry) Loading @@ -128,10 +119,7 @@ class IconManager @Inject constructor( setIcon(entry, normalIconDescriptor, sbIcon) setIcon(entry, sensitiveIconDescriptor, shelfIcon) setIcon(entry, sensitiveIconDescriptor, aodIcon) if (centeredIcon != null) { setIcon(entry, normalIconDescriptor, centeredIcon) } entry.icons = IconPack.buildPack(sbIcon, shelfIcon, aodIcon, centeredIcon, entry.icons) entry.icons = IconPack.buildPack(sbIcon, shelfIcon, aodIcon, entry.icons) } catch (e: InflationException) { entry.icons = IconPack.buildEmptyPack(entry.icons) throw e Loading Loading @@ -171,11 +159,6 @@ class IconManager @Inject constructor( it.setNotification(entry.sbn, notificationContentDescription) setIcon(entry, sensitiveIconDescriptor, it) } entry.icons.centeredIcon?.let { it.setNotification(entry.sbn, notificationContentDescription) setIcon(entry, sensitiveIconDescriptor, it) } } private fun updateIconsSafe(entry: NotificationEntry) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/icon/IconPack.java +2 −11 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ public final class IconPack { @Nullable private final StatusBarIconView mStatusBarIcon; @Nullable private final StatusBarIconView mShelfIcon; @Nullable private final StatusBarIconView mAodIcon; @Nullable private final StatusBarIconView mCenteredIcon; @Nullable private StatusBarIcon mSmallIconDescriptor; @Nullable private StatusBarIcon mPeopleAvatarDescriptor; Loading @@ -43,7 +42,7 @@ public final class IconPack { * haven't been inflated yet or there was an error while inflating them). */ public static IconPack buildEmptyPack(@Nullable IconPack fromSource) { return new IconPack(false, null, null, null, null, fromSource); return new IconPack(false, null, null, null, fromSource); } /** Loading @@ -53,9 +52,8 @@ public final class IconPack { @NonNull StatusBarIconView statusBarIcon, @NonNull StatusBarIconView shelfIcon, @NonNull StatusBarIconView aodIcon, @Nullable StatusBarIconView centeredIcon, @Nullable IconPack source) { return new IconPack(true, statusBarIcon, shelfIcon, aodIcon, centeredIcon, source); return new IconPack(true, statusBarIcon, shelfIcon, aodIcon, source); } private IconPack( Loading @@ -63,12 +61,10 @@ public final class IconPack { @Nullable StatusBarIconView statusBarIcon, @Nullable StatusBarIconView shelfIcon, @Nullable StatusBarIconView aodIcon, @Nullable StatusBarIconView centeredIcon, @Nullable IconPack source) { mAreIconsAvailable = areIconsAvailable; mStatusBarIcon = statusBarIcon; mShelfIcon = shelfIcon; mCenteredIcon = centeredIcon; mAodIcon = aodIcon; if (source != null) { mIsImportantConversation = source.mIsImportantConversation; Loading @@ -91,11 +87,6 @@ public final class IconPack { return mShelfIcon; } @Nullable public StatusBarIconView getCenteredIcon() { return mCenteredIcon; } /** The version of the icon that's shown when pulsing (in AOD). */ @Nullable public StatusBarIconView getAodIcon() { Loading