diff options
author | Lee Shombert <shombert@google.com> | 2021-05-12 08:26:39 -0700 |
---|---|---|
committer | Lee Shombert <shombert@google.com> | 2021-05-13 00:08:29 +0000 |
commit | 3442aa04a6dcced41f39882a9a9865f841540763 (patch) | |
tree | 4262ebfd82a188518ab770c1aa37517074c4f83e /rs/java/android/renderscript/ProgramFragmentFixedFunction.java | |
parent | be6088d11ca9fcd1eeb76cf890fe7624bedad60d (diff) |
Fix ClassCastException in WatchedIntentResolver
Bug: 187691893
IntentResolver.sortResults() is a generic method that assumes its
argument is a List<IntentFilter>, although this is not explicit in the
data types. The assumption fails in WatchedIntentResolver, which is
actually holding List<WatchedIntentFilter>.
The change follows the same path as server/firewall/IntentFirewall:
sortResults() is overridden in WatchedIntentResolver to accept the
proper type. While we are at it, we force the class parameters in
WatchedIntentResolver to be WatchedIntentFilter (because that is
always true). This means no casting is required to support
sortResults().
Finally, WatchedIntentResolver is moved into the server.pm package,
where it is actually used. Should the need arise, it can be elevated
back to the server package.
Test: atest
* CtsContentTestCases:IntentFilterTest
* CtsDynamicMimeHostTestCases
* FrameworksServicesTests:AppsFilterTest
Change-Id: Id1546c6711f95e0970c018b0e54cad7f3a8ac4b7
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions