This cast won't always work - sometimes the SkipScanFilter will be ANDed with other filters. Instead, just instantiate a SkipScanFilter here using the context.getScanRanges() info.