tiny nit  a better condition would be requiredintentfilterpresent  perhaps haveenableaction should be local to this block  and requiredintentfilterpresent would be declared on the third line of this method 