cleaned up widget provider onreceive method.