Loading packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java +11 −7 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import com.android.systemui.statusbar.notification.row.dagger.NotificationShelfC import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.phone.dagger.StatusBarComponent; import com.android.systemui.statusbar.policy.HeadsUpManager; import com.android.systemui.statusbar.policy.dagger.SmartRepliesInflationModule; import com.android.systemui.statusbar.policy.dagger.StatusBarPolicyModule; import com.android.systemui.tuner.dagger.TunerModule; import com.android.systemui.user.UserModule; Loading Loading @@ -74,6 +75,7 @@ import dagger.Provides; SensorModule.class, SettingsModule.class, SettingsUtilModule.class, SmartRepliesInflationModule.class, StatusBarPolicyModule.class, SysUIConcurrencyModule.class, TunerModule.class, Loading @@ -81,13 +83,15 @@ import dagger.Provides; UtilModule.class, VolumeModule.class }, subcomponents = {StatusBarComponent.class, subcomponents = { StatusBarComponent.class, NotificationRowComponent.class, DozeComponent.class, ExpandableNotificationRowComponent.class, KeyguardBouncerComponent.class, NotificationShelfComponent.class, FragmentService.FragmentCreator.class}) FragmentService.FragmentCreator.class }) public abstract class SystemUIModule { @Binds Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java +11 −5 Original line number Diff line number Diff line Loading @@ -81,21 +81,27 @@ public class ExpandableNotificationRowController implements NodeController { private final PeopleNotificationIdentifier mPeopleNotificationIdentifier; @Inject public ExpandableNotificationRowController(ExpandableNotificationRow view, public ExpandableNotificationRowController( ExpandableNotificationRow view, NotificationListContainer listContainer, ActivatableNotificationViewController activatableNotificationViewController, NotificationMediaManager mediaManager, PluginManager pluginManager, SystemClock clock, @AppName String appName, @NotificationKey String notificationKey, NotificationMediaManager mediaManager, PluginManager pluginManager, SystemClock clock, @AppName String appName, @NotificationKey String notificationKey, KeyguardBypassController keyguardBypassController, GroupMembershipManager groupMembershipManager, GroupExpansionManager groupExpansionManager, RowContentBindStage rowContentBindStage, NotificationLogger notificationLogger, HeadsUpManager headsUpManager, NotificationLogger notificationLogger, HeadsUpManager headsUpManager, ExpandableNotificationRow.OnExpandClickListener onExpandClickListener, StatusBarStateController statusBarStateController, NotificationGutsManager notificationGutsManager, @Named(ALLOW_NOTIFICATION_LONG_PRESS_NAME) boolean allowLongPress, OnUserInteractionCallback onUserInteractionCallback, FalsingManager falsingManager, OnUserInteractionCallback onUserInteractionCallback, FalsingManager falsingManager, PeopleNotificationIdentifier peopleNotificationIdentifier) { mView = view; mListContainer = listContainer; Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java +39 −43 Original line number Diff line number Diff line Loading @@ -42,17 +42,15 @@ import com.android.systemui.media.MediaDataManagerKt; import com.android.systemui.media.MediaFeatureFlag; import com.android.systemui.statusbar.InflationTask; import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.SmartReplyController; import com.android.systemui.statusbar.notification.ConversationNotificationProcessor; import com.android.systemui.statusbar.notification.InflationException; import com.android.systemui.statusbar.notification.MediaNotificationProcessor; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.row.wrapper.NotificationViewWrapper; import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.policy.HeadsUpManager; import com.android.systemui.statusbar.policy.InflatedSmartReplies; import com.android.systemui.statusbar.policy.InflatedSmartReplies.SmartRepliesAndActions; import com.android.systemui.statusbar.policy.SmartReplyConstants; import com.android.systemui.statusbar.policy.SmartRepliesAndActionsInflater; import com.android.systemui.util.Assert; import java.util.HashMap; Loading @@ -60,8 +58,6 @@ import java.util.concurrent.Executor; import javax.inject.Inject; import dagger.Lazy; /** * {@link NotificationContentInflater} binds content to a {@link ExpandableNotificationRow} by * asynchronously building the content's {@link RemoteViews} and applying it to the row. Loading @@ -76,27 +72,24 @@ public class NotificationContentInflater implements NotificationRowContentBinder private final boolean mIsMediaInQS; private final NotificationRemoteInputManager mRemoteInputManager; private final NotifRemoteViewCache mRemoteViewCache; private final Lazy<SmartReplyConstants> mSmartReplyConstants; private final Lazy<SmartReplyController> mSmartReplyController; private final ConversationNotificationProcessor mConversationProcessor; private final Executor mBgExecutor; private final SmartRepliesAndActionsInflater mSmartRepliesAndActionsInflater; @Inject NotificationContentInflater( NotifRemoteViewCache remoteViewCache, NotificationRemoteInputManager remoteInputManager, Lazy<SmartReplyConstants> smartReplyConstants, Lazy<SmartReplyController> smartReplyController, ConversationNotificationProcessor conversationProcessor, MediaFeatureFlag mediaFeatureFlag, @Background Executor bgExecutor) { @Background Executor bgExecutor, SmartRepliesAndActionsInflater smartRepliesInflater) { mRemoteViewCache = remoteViewCache; mRemoteInputManager = remoteInputManager; mSmartReplyConstants = smartReplyConstants; mSmartReplyController = smartReplyController; mConversationProcessor = conversationProcessor; mIsMediaInQS = mediaFeatureFlag.getEnabled(); mBgExecutor = bgExecutor; mSmartRepliesAndActionsInflater = smartRepliesInflater; } @Override Loading Loading @@ -132,8 +125,6 @@ public class NotificationContentInflater implements NotificationRowContentBinder contentToBind, mRemoteViewCache, entry, mSmartReplyConstants.get(), mSmartReplyController.get(), mConversationProcessor, row, bindParams.isLowPriority, Loading @@ -141,7 +132,8 @@ public class NotificationContentInflater implements NotificationRowContentBinder bindParams.usesIncreasedHeadsUpHeight, callback, mRemoteInputManager.getRemoteViewsOnClickHandler(), mIsMediaInQS); mIsMediaInQS, mSmartRepliesAndActionsInflater); if (mInflateSynchronously) { task.onPostExecute(task.doInBackground()); } else { Loading @@ -157,17 +149,19 @@ public class NotificationContentInflater implements NotificationRowContentBinder boolean inflateSynchronously, @InflationFlag int reInflateFlags, Notification.Builder builder, Context packageContext) { Context packageContext, SmartRepliesAndActionsInflater smartRepliesInflater) { InflationProgress result = createRemoteViews(reInflateFlags, builder, bindParams.isLowPriority, bindParams.usesIncreasedHeight, bindParams.usesIncreasedHeadsUpHeight, packageContext); result = inflateSmartReplyViews(result, reInflateFlags, entry, row.getContext(), packageContext, row.getHeadsUpManager(), mSmartReplyConstants.get(), mSmartReplyController.get(), row.getExistingSmartRepliesAndActions()); row.getContext(), packageContext, row.getExistingSmartRepliesAndActions(), smartRepliesInflater); apply( mBgExecutor, Loading Loading @@ -268,22 +262,21 @@ public class NotificationContentInflater implements NotificationRowContentBinder } } private static InflationProgress inflateSmartReplyViews(InflationProgress result, @InflationFlag int reInflateFlags, NotificationEntry entry, Context context, Context packageContext, HeadsUpManager headsUpManager, SmartReplyConstants smartReplyConstants, SmartReplyController smartReplyController, SmartRepliesAndActions previousSmartRepliesAndActions) { private static InflationProgress inflateSmartReplyViews( InflationProgress result, @InflationFlag int reInflateFlags, NotificationEntry entry, Context context, Context packageContext, SmartRepliesAndActions previousSmartRepliesAndActions, SmartRepliesAndActionsInflater inflater) { if ((reInflateFlags & FLAG_CONTENT_VIEW_EXPANDED) != 0 && result.newExpandedView != null) { result.expandedInflatedSmartReplies = InflatedSmartReplies.inflate( context, packageContext, entry, smartReplyConstants, smartReplyController, headsUpManager, previousSmartRepliesAndActions); result.expandedInflatedSmartReplies = inflater.inflateSmartReplies( context, packageContext, entry, previousSmartRepliesAndActions); } if ((reInflateFlags & FLAG_CONTENT_VIEW_HEADS_UP) != 0 && result.newHeadsUpView != null) { result.headsUpInflatedSmartReplies = InflatedSmartReplies.inflate( context, packageContext, entry, smartReplyConstants, smartReplyController, headsUpManager, previousSmartRepliesAndActions); result.headsUpInflatedSmartReplies = inflater.inflateSmartReplies( context, packageContext, entry, previousSmartRepliesAndActions); } return result; } Loading Loading @@ -709,8 +702,6 @@ public class NotificationContentInflater implements NotificationRowContentBinder private final boolean mUsesIncreasedHeadsUpHeight; private final @InflationFlag int mReInflateFlags; private final NotifRemoteViewCache mRemoteViewCache; private final SmartReplyConstants mSmartReplyConstants; private final SmartReplyController mSmartReplyController; private final Executor mBgExecutor; private ExpandableNotificationRow mRow; private Exception mError; Loading @@ -718,6 +709,7 @@ public class NotificationContentInflater implements NotificationRowContentBinder private CancellationSignal mCancellationSignal; private final ConversationNotificationProcessor mConversationProcessor; private final boolean mIsMediaInQS; private final SmartRepliesAndActionsInflater mSmartRepliesInflater; private AsyncInflationTask( Executor bgExecutor, Loading @@ -725,8 +717,6 @@ public class NotificationContentInflater implements NotificationRowContentBinder @InflationFlag int reInflateFlags, NotifRemoteViewCache cache, NotificationEntry entry, SmartReplyConstants smartReplyConstants, SmartReplyController smartReplyController, ConversationNotificationProcessor conversationProcessor, ExpandableNotificationRow row, boolean isLowPriority, Loading @@ -734,15 +724,15 @@ public class NotificationContentInflater implements NotificationRowContentBinder boolean usesIncreasedHeadsUpHeight, InflationCallback callback, RemoteViews.OnClickHandler remoteViewClickHandler, boolean isMediaFlagEnabled) { boolean isMediaFlagEnabled, SmartRepliesAndActionsInflater smartRepliesInflater) { mEntry = entry; mRow = row; mSmartReplyConstants = smartReplyConstants; mSmartReplyController = smartReplyController; mBgExecutor = bgExecutor; mInflateSynchronously = inflateSynchronously; mReInflateFlags = reInflateFlags; mRemoteViewCache = cache; mSmartRepliesInflater = smartRepliesInflater; mContext = mRow.getContext(); mIsLowPriority = isLowPriority; mUsesIncreasedHeight = usesIncreasedHeight; Loading Loading @@ -786,10 +776,16 @@ public class NotificationContentInflater implements NotificationRowContentBinder InflationProgress inflationProgress = createRemoteViews(mReInflateFlags, recoveredBuilder, mIsLowPriority, mUsesIncreasedHeight, mUsesIncreasedHeadsUpHeight, packageContext); return inflateSmartReplyViews(inflationProgress, mReInflateFlags, mEntry, mRow.getContext(), packageContext, mRow.getHeadsUpManager(), mSmartReplyConstants, mSmartReplyController, mRow.getExistingSmartRepliesAndActions()); SmartRepliesAndActions repliesAndActions = mRow.getExistingSmartRepliesAndActions(); return inflateSmartReplyViews( inflationProgress, mReInflateFlags, mEntry, mContext, packageContext, repliesAndActions, mSmartRepliesInflater); } catch (Exception e) { mError = e; return null; Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java +16 −6 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ import com.android.systemui.statusbar.notification.row.wrapper.NotificationViewW import com.android.systemui.statusbar.policy.InflatedSmartReplies; import com.android.systemui.statusbar.policy.InflatedSmartReplies.SmartRepliesAndActions; import com.android.systemui.statusbar.policy.RemoteInputView; import com.android.systemui.statusbar.policy.SmartRepliesAndActionsInflaterKt; import com.android.systemui.statusbar.policy.SmartReplyConstants; import com.android.systemui.statusbar.policy.SmartReplyView; Loading Loading @@ -1191,23 +1192,31 @@ public class NotificationContentView extends FrameLayout { View bigContentView = mExpandedChild; if (bigContentView != null && (bigContentView instanceof ViewGroup)) { mMediaTransferManager.applyMediaTransferView((ViewGroup) bigContentView, entry); mMediaTransferManager.applyMediaTransferView((ViewGroup) bigContentView, entry); } View smallContentView = mContractedChild; if (smallContentView != null && (smallContentView instanceof ViewGroup)) { mMediaTransferManager.applyMediaTransferView((ViewGroup) smallContentView, entry); mMediaTransferManager.applyMediaTransferView((ViewGroup) smallContentView, entry); } } /** * Returns whether the {@link Notification} represented by entry has a free-form remote input. * Such an input can be used e.g. to implement smart reply buttons - by passing the replies * through the remote input. */ public static boolean hasFreeformRemoteInput(NotificationEntry entry) { Notification notification = entry.getSbn().getNotification(); return null != notification.findRemoteInputActionPair(true /* freeform */); } private void applyRemoteInputAndSmartReply(final NotificationEntry entry) { if (mRemoteInputController == null) { return; } applyRemoteInput(entry, InflatedSmartReplies.hasFreeformRemoteInput(entry)); applyRemoteInput(entry, hasFreeformRemoteInput(entry)); if (mExpandedInflatedSmartReplies == null && mHeadsUpInflatedSmartReplies == null) { if (DEBUG) { Loading Loading @@ -1438,7 +1447,8 @@ public class NotificationContentView extends FrameLayout { } LinearLayout smartReplyContainer = (LinearLayout) smartReplyContainerCandidate; if (!InflatedSmartReplies.shouldShowSmartReplyView(entry, smartRepliesAndActions)) { if (!SmartRepliesAndActionsInflaterKt .shouldShowSmartReplyView(entry, smartRepliesAndActions)) { smartReplyContainer.setVisibility(View.GONE); return null; } Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/InflatedSmartReplies.java +1 −222 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java +11 −7 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import com.android.systemui.statusbar.notification.row.dagger.NotificationShelfC import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.phone.dagger.StatusBarComponent; import com.android.systemui.statusbar.policy.HeadsUpManager; import com.android.systemui.statusbar.policy.dagger.SmartRepliesInflationModule; import com.android.systemui.statusbar.policy.dagger.StatusBarPolicyModule; import com.android.systemui.tuner.dagger.TunerModule; import com.android.systemui.user.UserModule; Loading Loading @@ -74,6 +75,7 @@ import dagger.Provides; SensorModule.class, SettingsModule.class, SettingsUtilModule.class, SmartRepliesInflationModule.class, StatusBarPolicyModule.class, SysUIConcurrencyModule.class, TunerModule.class, Loading @@ -81,13 +83,15 @@ import dagger.Provides; UtilModule.class, VolumeModule.class }, subcomponents = {StatusBarComponent.class, subcomponents = { StatusBarComponent.class, NotificationRowComponent.class, DozeComponent.class, ExpandableNotificationRowComponent.class, KeyguardBouncerComponent.class, NotificationShelfComponent.class, FragmentService.FragmentCreator.class}) FragmentService.FragmentCreator.class }) public abstract class SystemUIModule { @Binds Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java +11 −5 Original line number Diff line number Diff line Loading @@ -81,21 +81,27 @@ public class ExpandableNotificationRowController implements NodeController { private final PeopleNotificationIdentifier mPeopleNotificationIdentifier; @Inject public ExpandableNotificationRowController(ExpandableNotificationRow view, public ExpandableNotificationRowController( ExpandableNotificationRow view, NotificationListContainer listContainer, ActivatableNotificationViewController activatableNotificationViewController, NotificationMediaManager mediaManager, PluginManager pluginManager, SystemClock clock, @AppName String appName, @NotificationKey String notificationKey, NotificationMediaManager mediaManager, PluginManager pluginManager, SystemClock clock, @AppName String appName, @NotificationKey String notificationKey, KeyguardBypassController keyguardBypassController, GroupMembershipManager groupMembershipManager, GroupExpansionManager groupExpansionManager, RowContentBindStage rowContentBindStage, NotificationLogger notificationLogger, HeadsUpManager headsUpManager, NotificationLogger notificationLogger, HeadsUpManager headsUpManager, ExpandableNotificationRow.OnExpandClickListener onExpandClickListener, StatusBarStateController statusBarStateController, NotificationGutsManager notificationGutsManager, @Named(ALLOW_NOTIFICATION_LONG_PRESS_NAME) boolean allowLongPress, OnUserInteractionCallback onUserInteractionCallback, FalsingManager falsingManager, OnUserInteractionCallback onUserInteractionCallback, FalsingManager falsingManager, PeopleNotificationIdentifier peopleNotificationIdentifier) { mView = view; mListContainer = listContainer; Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java +39 −43 Original line number Diff line number Diff line Loading @@ -42,17 +42,15 @@ import com.android.systemui.media.MediaDataManagerKt; import com.android.systemui.media.MediaFeatureFlag; import com.android.systemui.statusbar.InflationTask; import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.SmartReplyController; import com.android.systemui.statusbar.notification.ConversationNotificationProcessor; import com.android.systemui.statusbar.notification.InflationException; import com.android.systemui.statusbar.notification.MediaNotificationProcessor; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.row.wrapper.NotificationViewWrapper; import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.policy.HeadsUpManager; import com.android.systemui.statusbar.policy.InflatedSmartReplies; import com.android.systemui.statusbar.policy.InflatedSmartReplies.SmartRepliesAndActions; import com.android.systemui.statusbar.policy.SmartReplyConstants; import com.android.systemui.statusbar.policy.SmartRepliesAndActionsInflater; import com.android.systemui.util.Assert; import java.util.HashMap; Loading @@ -60,8 +58,6 @@ import java.util.concurrent.Executor; import javax.inject.Inject; import dagger.Lazy; /** * {@link NotificationContentInflater} binds content to a {@link ExpandableNotificationRow} by * asynchronously building the content's {@link RemoteViews} and applying it to the row. Loading @@ -76,27 +72,24 @@ public class NotificationContentInflater implements NotificationRowContentBinder private final boolean mIsMediaInQS; private final NotificationRemoteInputManager mRemoteInputManager; private final NotifRemoteViewCache mRemoteViewCache; private final Lazy<SmartReplyConstants> mSmartReplyConstants; private final Lazy<SmartReplyController> mSmartReplyController; private final ConversationNotificationProcessor mConversationProcessor; private final Executor mBgExecutor; private final SmartRepliesAndActionsInflater mSmartRepliesAndActionsInflater; @Inject NotificationContentInflater( NotifRemoteViewCache remoteViewCache, NotificationRemoteInputManager remoteInputManager, Lazy<SmartReplyConstants> smartReplyConstants, Lazy<SmartReplyController> smartReplyController, ConversationNotificationProcessor conversationProcessor, MediaFeatureFlag mediaFeatureFlag, @Background Executor bgExecutor) { @Background Executor bgExecutor, SmartRepliesAndActionsInflater smartRepliesInflater) { mRemoteViewCache = remoteViewCache; mRemoteInputManager = remoteInputManager; mSmartReplyConstants = smartReplyConstants; mSmartReplyController = smartReplyController; mConversationProcessor = conversationProcessor; mIsMediaInQS = mediaFeatureFlag.getEnabled(); mBgExecutor = bgExecutor; mSmartRepliesAndActionsInflater = smartRepliesInflater; } @Override Loading Loading @@ -132,8 +125,6 @@ public class NotificationContentInflater implements NotificationRowContentBinder contentToBind, mRemoteViewCache, entry, mSmartReplyConstants.get(), mSmartReplyController.get(), mConversationProcessor, row, bindParams.isLowPriority, Loading @@ -141,7 +132,8 @@ public class NotificationContentInflater implements NotificationRowContentBinder bindParams.usesIncreasedHeadsUpHeight, callback, mRemoteInputManager.getRemoteViewsOnClickHandler(), mIsMediaInQS); mIsMediaInQS, mSmartRepliesAndActionsInflater); if (mInflateSynchronously) { task.onPostExecute(task.doInBackground()); } else { Loading @@ -157,17 +149,19 @@ public class NotificationContentInflater implements NotificationRowContentBinder boolean inflateSynchronously, @InflationFlag int reInflateFlags, Notification.Builder builder, Context packageContext) { Context packageContext, SmartRepliesAndActionsInflater smartRepliesInflater) { InflationProgress result = createRemoteViews(reInflateFlags, builder, bindParams.isLowPriority, bindParams.usesIncreasedHeight, bindParams.usesIncreasedHeadsUpHeight, packageContext); result = inflateSmartReplyViews(result, reInflateFlags, entry, row.getContext(), packageContext, row.getHeadsUpManager(), mSmartReplyConstants.get(), mSmartReplyController.get(), row.getExistingSmartRepliesAndActions()); row.getContext(), packageContext, row.getExistingSmartRepliesAndActions(), smartRepliesInflater); apply( mBgExecutor, Loading Loading @@ -268,22 +262,21 @@ public class NotificationContentInflater implements NotificationRowContentBinder } } private static InflationProgress inflateSmartReplyViews(InflationProgress result, @InflationFlag int reInflateFlags, NotificationEntry entry, Context context, Context packageContext, HeadsUpManager headsUpManager, SmartReplyConstants smartReplyConstants, SmartReplyController smartReplyController, SmartRepliesAndActions previousSmartRepliesAndActions) { private static InflationProgress inflateSmartReplyViews( InflationProgress result, @InflationFlag int reInflateFlags, NotificationEntry entry, Context context, Context packageContext, SmartRepliesAndActions previousSmartRepliesAndActions, SmartRepliesAndActionsInflater inflater) { if ((reInflateFlags & FLAG_CONTENT_VIEW_EXPANDED) != 0 && result.newExpandedView != null) { result.expandedInflatedSmartReplies = InflatedSmartReplies.inflate( context, packageContext, entry, smartReplyConstants, smartReplyController, headsUpManager, previousSmartRepliesAndActions); result.expandedInflatedSmartReplies = inflater.inflateSmartReplies( context, packageContext, entry, previousSmartRepliesAndActions); } if ((reInflateFlags & FLAG_CONTENT_VIEW_HEADS_UP) != 0 && result.newHeadsUpView != null) { result.headsUpInflatedSmartReplies = InflatedSmartReplies.inflate( context, packageContext, entry, smartReplyConstants, smartReplyController, headsUpManager, previousSmartRepliesAndActions); result.headsUpInflatedSmartReplies = inflater.inflateSmartReplies( context, packageContext, entry, previousSmartRepliesAndActions); } return result; } Loading Loading @@ -709,8 +702,6 @@ public class NotificationContentInflater implements NotificationRowContentBinder private final boolean mUsesIncreasedHeadsUpHeight; private final @InflationFlag int mReInflateFlags; private final NotifRemoteViewCache mRemoteViewCache; private final SmartReplyConstants mSmartReplyConstants; private final SmartReplyController mSmartReplyController; private final Executor mBgExecutor; private ExpandableNotificationRow mRow; private Exception mError; Loading @@ -718,6 +709,7 @@ public class NotificationContentInflater implements NotificationRowContentBinder private CancellationSignal mCancellationSignal; private final ConversationNotificationProcessor mConversationProcessor; private final boolean mIsMediaInQS; private final SmartRepliesAndActionsInflater mSmartRepliesInflater; private AsyncInflationTask( Executor bgExecutor, Loading @@ -725,8 +717,6 @@ public class NotificationContentInflater implements NotificationRowContentBinder @InflationFlag int reInflateFlags, NotifRemoteViewCache cache, NotificationEntry entry, SmartReplyConstants smartReplyConstants, SmartReplyController smartReplyController, ConversationNotificationProcessor conversationProcessor, ExpandableNotificationRow row, boolean isLowPriority, Loading @@ -734,15 +724,15 @@ public class NotificationContentInflater implements NotificationRowContentBinder boolean usesIncreasedHeadsUpHeight, InflationCallback callback, RemoteViews.OnClickHandler remoteViewClickHandler, boolean isMediaFlagEnabled) { boolean isMediaFlagEnabled, SmartRepliesAndActionsInflater smartRepliesInflater) { mEntry = entry; mRow = row; mSmartReplyConstants = smartReplyConstants; mSmartReplyController = smartReplyController; mBgExecutor = bgExecutor; mInflateSynchronously = inflateSynchronously; mReInflateFlags = reInflateFlags; mRemoteViewCache = cache; mSmartRepliesInflater = smartRepliesInflater; mContext = mRow.getContext(); mIsLowPriority = isLowPriority; mUsesIncreasedHeight = usesIncreasedHeight; Loading Loading @@ -786,10 +776,16 @@ public class NotificationContentInflater implements NotificationRowContentBinder InflationProgress inflationProgress = createRemoteViews(mReInflateFlags, recoveredBuilder, mIsLowPriority, mUsesIncreasedHeight, mUsesIncreasedHeadsUpHeight, packageContext); return inflateSmartReplyViews(inflationProgress, mReInflateFlags, mEntry, mRow.getContext(), packageContext, mRow.getHeadsUpManager(), mSmartReplyConstants, mSmartReplyController, mRow.getExistingSmartRepliesAndActions()); SmartRepliesAndActions repliesAndActions = mRow.getExistingSmartRepliesAndActions(); return inflateSmartReplyViews( inflationProgress, mReInflateFlags, mEntry, mContext, packageContext, repliesAndActions, mSmartRepliesInflater); } catch (Exception e) { mError = e; return null; Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java +16 −6 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ import com.android.systemui.statusbar.notification.row.wrapper.NotificationViewW import com.android.systemui.statusbar.policy.InflatedSmartReplies; import com.android.systemui.statusbar.policy.InflatedSmartReplies.SmartRepliesAndActions; import com.android.systemui.statusbar.policy.RemoteInputView; import com.android.systemui.statusbar.policy.SmartRepliesAndActionsInflaterKt; import com.android.systemui.statusbar.policy.SmartReplyConstants; import com.android.systemui.statusbar.policy.SmartReplyView; Loading Loading @@ -1191,23 +1192,31 @@ public class NotificationContentView extends FrameLayout { View bigContentView = mExpandedChild; if (bigContentView != null && (bigContentView instanceof ViewGroup)) { mMediaTransferManager.applyMediaTransferView((ViewGroup) bigContentView, entry); mMediaTransferManager.applyMediaTransferView((ViewGroup) bigContentView, entry); } View smallContentView = mContractedChild; if (smallContentView != null && (smallContentView instanceof ViewGroup)) { mMediaTransferManager.applyMediaTransferView((ViewGroup) smallContentView, entry); mMediaTransferManager.applyMediaTransferView((ViewGroup) smallContentView, entry); } } /** * Returns whether the {@link Notification} represented by entry has a free-form remote input. * Such an input can be used e.g. to implement smart reply buttons - by passing the replies * through the remote input. */ public static boolean hasFreeformRemoteInput(NotificationEntry entry) { Notification notification = entry.getSbn().getNotification(); return null != notification.findRemoteInputActionPair(true /* freeform */); } private void applyRemoteInputAndSmartReply(final NotificationEntry entry) { if (mRemoteInputController == null) { return; } applyRemoteInput(entry, InflatedSmartReplies.hasFreeformRemoteInput(entry)); applyRemoteInput(entry, hasFreeformRemoteInput(entry)); if (mExpandedInflatedSmartReplies == null && mHeadsUpInflatedSmartReplies == null) { if (DEBUG) { Loading Loading @@ -1438,7 +1447,8 @@ public class NotificationContentView extends FrameLayout { } LinearLayout smartReplyContainer = (LinearLayout) smartReplyContainerCandidate; if (!InflatedSmartReplies.shouldShowSmartReplyView(entry, smartRepliesAndActions)) { if (!SmartRepliesAndActionsInflaterKt .shouldShowSmartReplyView(entry, smartRepliesAndActions)) { smartReplyContainer.setVisibility(View.GONE); return null; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/InflatedSmartReplies.java +1 −222 File changed.Preview size limit exceeded, changes collapsed. Show changes