Fix issue where the dnd mode remains on after a call terminates.
There is a potential race condition when handling the
ACTION_INTERRUPTION_FILTER_CHANGED broadcast. Since we're setting the
interruption mode ourselves, we also get this broadcast. Most of the time
the broadcast is processed first and everything works. However, it looks
like there are cases where the broadcast receiver processes AFTER we have
updated mAreNotificationSuppressed to true. Thus, when we try to turn
off DND later on we assume that the user had initiated the request to turn
off DND and don't bother to do so.
The fix is to check who initiated the manual DND rule. If its telecom,
we can ignore the broadcast.
Bug: 33340277
Change-Id: I42b78fd27fe9814c4f8e29afc8937c3b41f51e50
4 files changed