From 239855b38686fec016ab07c113d41aa694f1e42e Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Wed, 16 Nov 2022 10:50:45 -0700 Subject: [PATCH] Recycle leaked SomeArgs instances. Bug: 258691671 Test: TH Change-Id: I361ec4c8bb47b277130cca2c20197694538341e9 --- .../service/notification/NotificationListenerService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/java/android/service/notification/NotificationListenerService.java b/core/java/android/service/notification/NotificationListenerService.java index cfc79e4fef66a..e821af1ab3130 100644 --- a/core/java/android/service/notification/NotificationListenerService.java +++ b/core/java/android/service/notification/NotificationListenerService.java @@ -2365,6 +2365,7 @@ public abstract class NotificationListenerService extends Service { UserHandle user= (UserHandle) args.arg2; NotificationChannel channel = (NotificationChannel) args.arg3; int modificationType = (int) args.arg4; + args.recycle(); onNotificationChannelModified(pkgName, user, channel, modificationType); } break; @@ -2374,6 +2375,7 @@ public abstract class NotificationListenerService extends Service { UserHandle user = (UserHandle) args.arg2; NotificationChannelGroup group = (NotificationChannelGroup) args.arg3; int modificationType = (int) args.arg4; + args.recycle(); onNotificationChannelGroupModified(pkgName, user, group, modificationType); } break;