Clean up SMS filter handling.
Define an interface for filters and perform filtering as a generic iteration over the list of filters. Lower code duplication by providing the list of remaining filters to each filter, allowing an asynchronous filter (like the carrier filter) to invoke any. remaining filters generically. This should mostly be a no-op. However, there is one small behavioral change - the MissedIncomingCallSmsFilter will now be invoked for messages which are passed through and not dropped by the carrier SMS filter and the visual voicemail SMS filter. This seems like it should be the case for consistency. Also allow overriding SMS filters for testing and add unit tests to exercise filter invocation. This is a precursor CL to one which will pass SMSes from blocked numbers through the filters to prevent vital system messages from being blocked. Bug: 136262737 Test: atest GsmInboundSmsHandlerTest Change-Id: I280d8e4c0847bf261e0497f95231a5063dfa025f Merged-In: I280d8e4c0847bf261e0497f95231a5063dfa025f
Loading
Please register or sign in to comment