Calling a method in the system process without a qualified user

发送恢复出厂设置广播,出现以下日志

 Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1192 com.android.server.input.InputManagerService$9.handleMessage:1369 android.os.Handler.dispatchMessage:102 android.os.Looper.loop:136 com.android.server.ServerThread.initAndLoop:1130


原因:

4.2中Android加入了多用户 

发送广播时指定用户

context.sendBroadcastAsUser(intent,UserHandle.ALL);

//设备上所有用户可接收到广播    
UserHandle.ALL   
//设备上当前用户可接收到广播    
UserHandle.CURRENT      
//设备上当前用户或者该应用所属用户可接收到广播  
UserHandle.CURRENT_OR_SELF  
//设备所有者可接收到广播  

UserHandle.OWNER

广播范围:UserHandle.ALL > UserHandle.OWNER > UserHandle.CURRENT_OR_SELF > UserHandle.CURRENT

你可能感兴趣的:(AS错误集)