Reduce unnecessary NotificationListener binder transaction.

When package suspend occurs, API calls are made as many as the number of changed packages,
resulting in unnecessary binder transactions.
This can rapidly consume the async space on the NotificationListener side, such as the SystemUI.

JavaBinder: !!! FAILED BINDER TRANSACTION !!!  (parcel size = 8844)
NotificationListeners: unable to notify listener (posted): android.service.notification.INotificationListener$Stub$Proxy@8ed47e2
NotificationListeners: android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died

Test: Occurs ACTION_PACKAGES_UNSUSPENDED/SUSPENDED with a pkgList size of 50 or more
Test: Async space of SystemUI(NotificationListener) decreases and binder transaction fails.

Change-Id: I58d42ecf39e13b3adce7652ae72147de0be00e89
2 files changed