Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75a7e2f9 authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Keep a light version of the SBN around

No need to keep bitmaps et al when we aren't using them

Test: hprof before and after change
Fixes: 130434362
Change-Id: Iabe0ee3e8f80dfb165bacfb118a31218c9e58847
parent e55986b8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -238,7 +238,7 @@ public class Assistant extends NotificationAssistantService {
        }
        mSingleThreadExecutor.submit(() -> {
            NotificationEntry entry =
                    new NotificationEntry(mPackageManager, sbn, channel, mSmsHelper);
                    new NotificationEntry(mPackageManager, sbn.cloneLight(), channel, mSmsHelper);
            SmartActionsHelper.SmartSuggestions suggestions = mSmartActionsHelper.suggest(entry);
            if (DEBUG) {
                Log.d(TAG, String.format(
@@ -296,7 +296,7 @@ public class Assistant extends NotificationAssistantService {
            Ranking ranking = getRanking(sbn.getKey(), rankingMap);
            if (ranking != null && ranking.getChannel() != null) {
                NotificationEntry entry = new NotificationEntry(mPackageManager,
                        sbn, ranking.getChannel(), mSmsHelper);
                        sbn.cloneLight(), ranking.getChannel(), mSmsHelper);
                String key = getKey(
                        sbn.getPackageName(), sbn.getUserId(), ranking.getChannel().getId());
                ChannelImpressions ci = mkeyToImpressions.getOrDefault(key,