diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java index 48a82957bf1ef..a612a1721c41f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java @@ -264,7 +264,7 @@ public class NotificationContentInflater { mIsChildInGroup, mUsesIncreasedHeight, mUsesIncreasedHeadsUpHeight, packageContext); result = inflateSmartReplyViews(result, reInflateFlags, mRow.getEntry(), - mRow.getContext(), mRow.getHeadsUpManager(), + mRow.getContext(), packageContext, mRow.getHeadsUpManager(), mRow.getExistingSmartRepliesAndActions()); apply( inflateSynchronously, @@ -311,20 +311,21 @@ public class NotificationContentInflater { private static InflationProgress inflateSmartReplyViews(InflationProgress result, @InflationFlag int reInflateFlags, NotificationEntry entry, Context context, - HeadsUpManager headsUpManager, SmartRepliesAndActions previousSmartRepliesAndActions) { + Context packageContext, HeadsUpManager headsUpManager, + SmartRepliesAndActions previousSmartRepliesAndActions) { SmartReplyConstants smartReplyConstants = Dependency.get(SmartReplyConstants.class); SmartReplyController smartReplyController = Dependency.get(SmartReplyController.class); if ((reInflateFlags & FLAG_CONTENT_VIEW_EXPANDED) != 0 && result.newExpandedView != null) { result.expandedInflatedSmartReplies = InflatedSmartReplies.inflate( - context, entry, smartReplyConstants, smartReplyController, - headsUpManager, previousSmartRepliesAndActions); + context, packageContext, entry, smartReplyConstants, + smartReplyController, headsUpManager, previousSmartRepliesAndActions); } if ((reInflateFlags & FLAG_CONTENT_VIEW_HEADS_UP) != 0 && result.newHeadsUpView != null) { result.headsUpInflatedSmartReplies = InflatedSmartReplies.inflate( - context, entry, smartReplyConstants, smartReplyController, - headsUpManager, previousSmartRepliesAndActions); + context, packageContext, entry, smartReplyConstants, + smartReplyController, headsUpManager, previousSmartRepliesAndActions); } return result; } @@ -817,7 +818,7 @@ public class NotificationContentInflater { recoveredBuilder, mIsLowPriority, mIsChildInGroup, mUsesIncreasedHeight, mUsesIncreasedHeadsUpHeight, packageContext); return inflateSmartReplyViews(inflationProgress, mReInflateFlags, mRow.getEntry(), - mRow.getContext(), mRow.getHeadsUpManager(), + mRow.getContext(), packageContext, mRow.getHeadsUpManager(), mRow.getExistingSmartRepliesAndActions()); } catch (Exception e) { mError = e; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/InflatedSmartReplies.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/InflatedSmartReplies.java index ee78a723a49c6..ea93193ca7289 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/InflatedSmartReplies.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/InflatedSmartReplies.java @@ -80,6 +80,7 @@ public class InflatedSmartReplies { */ public static InflatedSmartReplies inflate( Context context, + Context packageContext, NotificationEntry entry, SmartReplyConstants smartReplyConstants, SmartReplyController smartReplyController, @@ -108,9 +109,9 @@ public class InflatedSmartReplies { } if (newSmartRepliesAndActions.smartActions != null) { suggestionButtons.addAll( - smartReplyView.inflateSmartActions(newSmartRepliesAndActions.smartActions, - smartReplyController, entry, headsUpManager, - delayOnClickListener)); + smartReplyView.inflateSmartActions(packageContext, + newSmartRepliesAndActions.smartActions, smartReplyController, entry, + headsUpManager, delayOnClickListener)); } return new InflatedSmartReplies(smartReplyView, suggestionButtons, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java index 282d28c3b20c3..ed0b9d9294660 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java @@ -235,17 +235,17 @@ public class SmartReplyView extends ViewGroup { * Add smart actions to be shown next to smart replies. Only the actions that fit into the * notification are shown. */ - public List