官方文档对onReceive方法里context参数的解释是:The Context in which the receiver is running.
如果是静态注册的Broadcast,context.toString()输出为:android.app.ReceiverRestrictedContext@e5d8f65
如果是动态注册的Broadcast,context.toString()输出为:com.example.test.MainActivity@84dfef5
静态与动态注册的的Broadcast,context.getPackageName()输出都为:com.example.test
无论静态还是动态注册的Broadcast,都跑在广播所在app的进程。