New Pipeline: resume spinning after RemoteInputView is moved
The new pipeline uses the "spinning" (sending) state of remote inputs to decide whether to extend their lifetime. The goal is that a user will be able to see the reply they sent, even if the app immediately cancels the notification they replied to (as is apparently common). Unfortunately, this breaks in (at least) one case: if an app posts a group of messages, the user replies to one, and then the app cancels the *summary* notification of the group, then the pipeline promotes the individual messages to top-level notifications. In the process, their RemoteInputViews are detached and reattached, which causes them to stop spinning. Notification rows have an isChangingPosition flag for the (as far as I can tell) sole purpose of letting RemoteInputView know that it should save and restore a bit of state on detach and attach, including the spinning state, but the new pipeline doesn't set this flag properly, and doing so might require a bunch of unpleasant plumbing in ShadeViewDiffer and/or NodeController. As an easier fix, try *unconditionally* saving and restoring the spinning state in RemoteInputView. It shouldn't hurt if the view is never reattached, it will handle the view being briefly detached during a pipeline run, and (as far as I know, and I hope) won't cause a problem if a notification is detached and reattached much later for some other reason. Bug: 211161595 Test: manual Change-Id: I78de3a3a5259d8e9cc3faa26d664260b6d4eb94f
Loading
Please register or sign in to comment