Use IntentFilter.toLongString() instead of IntentFilter.toString()

Bug: b/276787120
Test: BroadcastRestrictionsHostTest#testRegisterBroadcastReceiver_restrictionsApplied

Change-Id: Ic7e59f97ac59ac498d589e1e7d5ad432aa77d652
This commit is contained in:
Palak Chaudhary
2023-04-05 10:47:29 +00:00
parent bb0075507d
commit ee30d5c5f4

View File

@@ -13713,7 +13713,7 @@ public class ActivityManagerService extends IActivityManager.Stub
if (!sdkSandboxManagerLocal.canRegisterBroadcastReceiver(
/*IntentFilter=*/ filter, flags, onlyProtectedBroadcasts)) {
throw new SecurityException("SDK sandbox not allowed to register receiver"
+ " with the given IntentFilter: " + filter.toString());
+ " with the given IntentFilter: " + filter.toLongString());
}
}