Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 03d2d0d3 authored by Ashwini Oruganti's avatar Ashwini Oruganti
Browse files

PluginInstanceManager: Mark unaudited PendingIntents with FLAG_MUTABLE_UNAUDITED

These PIs need an explicit mutability flag. This temporay flag is being
used to mark these points in code and should be replaced ASAP.
See go/immutable-pendingintents for more context.

Bug: 160794467
Test: TH
Exempt-From-Owner-Approval: noop change
Change-Id: Iad957dc32540924186e9422148a5c63bc296959c
parent 24e5b93c
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -386,7 +386,10 @@ public class PluginInstanceManager<T extends Plugin> {
                    }
                    Intent i = new Intent(PluginManagerImpl.DISABLE_PLUGIN).setData(
                            Uri.parse("package://" + component.flattenToString()));
                    PendingIntent pi = PendingIntent.getBroadcast(mContext, 0, i, 0);
                    // TODO(b/174161910) Please replace FLAG_MUTABLE_UNAUDITED below
                    // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE.
                    PendingIntent pi = PendingIntent.getBroadcast(mContext, 0, i,
                            PendingIntent.FLAG_MUTABLE_UNAUDITED);
                    nb.addAction(new Action.Builder(null, "Disable plugin", pi).build());
                    mContext.getSystemService(NotificationManager.class)
                            .notify(SystemMessage.NOTE_PLUGIN, nb.build());