Skip to content
Commit 9a4716d2 authored by Julia Tuttle's avatar Julia Tuttle
Browse files

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
parent 92a9e6a0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment