Android 系统签名App发送广播导致的一个警告
警告内容如下:
W/ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1186 android.content.ContextWrapper.sendBroadcast:365
解决办法:
Parcel parcel = Parcel.obtain(); // 获取Parcel
Intent intent = new Intent("intent action");
sendBroadcastAsUser(intent,
UserHandle.readFromParcel(parcel));
parcel.recycle(); // 获取Parcel后一定要进行回收