ResolverActivity and ResolveListAdapter were taken from AOSP (I think Lollipop implementation)
After lots of refactorings, they were both still 400+ lines of code. I wanted to extract some logic into classes to make it easier to add features.
ResolverComparator class was already there. That is just moved to its own class.
IntentResolver is extracted from the Adapter. Given a sourceIntent, it returns a sorted list of Applications that responds to the intent.
ResolverActivity
andResolveListAdapter
were taken from AOSP (I think Lollipop implementation)After lots of refactorings, they were both still 400+ lines of code. I wanted to extract some logic into classes to make it easier to add features.
ResolverComparator
class was already there. That is just moved to its own class.IntentResolver
is extracted from the Adapter. Given asourceIntent
, it returns a sorted list of Applications that responds to the intent.