OSDN Git Service

Notification: Reuse drawable in Header if Icon unchanged
authorAdrian Roos <roosa@google.com>
Wed, 3 Aug 2016 01:30:34 +0000 (18:30 -0700)
committerAdrian Roos <roosa@google.com>
Tue, 9 Aug 2016 19:31:20 +0000 (12:31 -0700)
commitc4337a35696b5456a18b9de5e29841612364a2e5
tree1ac005d683964e1effe126bf5753467ee95549ef
parent88d57db0ad5e97f873a9aa9c40d71895af8e7200
Notification: Reuse drawable in Header if Icon unchanged

Mitigates an issue where a LevelListDrawable would constantly
be reloaded even if unchanged. To avoid this, small icons are
now only reloaded if they no longer point to the same resource.

Note that StatusBarIconView already has this logic.

Change-Id: I6be436e5cef7b7ca91a28edc413b1aaa0f1007d5
Fixes: 30496073
core/java/android/app/Notification.java
core/java/com/android/internal/widget/CachingIconView.java [new file with mode: 0644]
core/res/res/layout/notification_template_header.xml