Skip to content
Commit c32dc80a authored by Miranda Kephart's avatar Miranda Kephart
Browse files

Register clipboard toast callback correctly

If something is copied to the clipboard before user setup is
complete, we just show a toast instead of the full UI, to prevent
the user from being able to access intents they shouldn't be able
to. In this case, we have a callback to reset the internal
variable when the toast is hidden, but we never actually register
the callback.

This has very little effect in practice, since a) all of this
code is only run if user setup is incomplete (or if the copied
data is null, which shouldn't happen) and b) the incorrect state,
where we should show the toast and don't, will only occur if we
somehow get the second, post-text-classification clipboard update
without getting the initial update.

That said, this should still be fixed for clarity and correctness.
This change registers the callback so that we reset the clipboard
toast to null once it's hidden.

Bug: 272035606
Test: manual
Change-Id: I4bcc3bd85f6242ff4815c21d5a6a7f9d24045cd5
parent 0f351cb6
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