Dynamic broadcast receivers that are not exported need to be filtered in checkBroadcastFromSystem
When the system code sending non-protected broadcast, if it's dynamic broadcast receiver is not exported, the wtf log of sending non-protected broadcast should not be printed. Bug:263210319 Test:A system code, for example com.android.settings step1:send a non-protected broadcast but with packageName to itself; step2:it registers a dynamic broadcast receiver with Context.RECEIVER_NOT_EXPORTED to receive this broadcast. Change-Id: Ie7e359d1ae079be0d444c72791ff1b2a892b71bb
This commit is contained in:
@@ -13529,7 +13529,7 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
}
|
||||
} else {
|
||||
BroadcastFilter bf = (BroadcastFilter)target;
|
||||
if (bf.requiredPermission == null) {
|
||||
if (bf.exported && bf.requiredPermission == null) {
|
||||
allProtected = false;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user