Always clear listener before setChecked in RemoteViews
In RemoteViews, SetCompoundButtonCheckedAction and
SetRadioGroupCheckedAction temporarily clear the checked change
listener on the view to prevent updates from triggering intents.
Previously, this was only done if the listener tag was an instance of
OnCheckedChangeListener. However, if the tag is clobbered to a non-listener
type (e.g. by setting an integer tag), this check was bypassed, meaning
updating the checked state would fire the listener.
Always clear the listener on the view first. Then, restore it only if
the tag is a valid OnCheckedChangeListener.
Bug: 517378366
Bug: 517379315
Test: atest RemoteViewsTest
Flag: EXEMPT CVE_FIX
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:d058e6c591c2b81d56bde1af3ceaa65053a83aea
Merged-In: I835cbbefd37fdb91afef8a04848031699d5f26cc
Change-Id: I835cbbefd37fdb91afef8a04848031699d5f26cc
2 files changed