Skip to content
Commit 5b5f1c0a authored by Joanne Chung's avatar Joanne Chung
Browse files

Use the flag FLAG_MUTABLE when creating the PendingIntent

Starting with S, any app targeting S+ will need to specify
explicitly either FLAG_MUTABLE or FLAG_IMMUTABLE when creating
PendingIntents.

This change helps mitigate against implicit PendingIntent reuse.
At present, all PendingIntents are mutable by default unless
FLAG_IMMUTABLE is explicitly set when creating them. This often
leads to developers accidentally making the PendingIntents mutable
and thus handing their receivers powers to fill in critical fields.

Because the autofill saveui retore mechanism will need to update it,
the PendingIntent should be mutable.

Bug: 170771150
Test: atest CtsAutoFillServiceTestCases
Test: Manual. Make sure the function works normal.
Test: Don't see PendingIntent error log.
Change-Id: I6e03a48968b98dec10e9c9dc05d1f3af42f8f0e5
parent dae90d76
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