diff options
| author | Zhen Zhang <zzhen@google.com> | 2019-11-12 10:51:00 -0800 |
|---|---|---|
| committer | Zhen Zhang <zzhen@google.com> | 2019-11-12 17:18:44 -0800 |
| commit | 6e9e5faa9799a8715d80400928b97b452b269fb0 (patch) | |
| tree | 38d6d44af00920b67906cb2c1a831536ee0e1239 /core/java/android/app/Notification.java | |
| parent | e8ed32f81daa5a1e67e8b6fad9706c3699ddcf40 (diff) | |
Use static filter for inflater of RemoteViews
This will get rid of the RemoteViews leak caused by ViewStub keeping
reference of LayoutInflater. But subclasses of RemoteViews won't be
affected to avoid breaking overriden usage.
Bug: 141699084
Test: Manually test. Leak disappeared. atest RemoteViewsTest
Change-Id: I1b287a166df92e424208ae35eb84bfd6aa553ddf
Diffstat (limited to 'core/java/android/app/Notification.java')
| -rw-r--r-- | core/java/android/app/Notification.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index 2931f33e4cc4..c1324523b154 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -10402,6 +10402,16 @@ public class Notification implements Parcelable p.recycle(); return brv; } + + /** + * Override and return true, since {@link RemoteViews#onLoadClass(Class)} is not overridden. + * + * @see RemoteViews#shouldUseStaticFilter() + */ + @Override + protected boolean shouldUseStaticFilter() { + return true; + } } /** |
