Skip to content
Commit ff784956 authored by Suprabh Shukla's avatar Suprabh Shukla
Browse files

Preventing accidental misuse of registerReceiver

A new BroadcastFilter was being created even when the caller called
registerReceiver with the same receiver and intent filters as an earlier
call. While resolving, only the first object added was being used.
Also, limiting the number of receivers that an app can register, so
badly written code does not end up causing memory or computational
pressure on the system.

Test: Manual, and
atest android.content.BroadcastReceiverTests#testReceiverLimit

Bug: 70677313
Change-Id: I04342b94d00cab3451aca4c884e15039448a760a
parent ad1fe519
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment