Fix the non-working DND toggle

The pendingIntent of the DND toggle was set to immutable previously
which doesn't allow any modification. This CL fixes this by making it
mutable.

Fixes: 191865710
Test: Search "dnd" and make sure the toggle has effect upon modification
Change-Id: Iade256cee8885cb80ade5ca95cc50065c2a78da2
This commit is contained in:
Yi-Ling Chuang
2021-06-29 12:46:08 +08:00
parent 1060b2f926
commit 6a83c73624

View File

@@ -150,6 +150,6 @@ public class ZenModeSliceBuilder {
final Intent intent = new Intent(ACTION_ZEN_MODE_SLICE_CHANGED)
.setClass(context, SliceBroadcastReceiver.class);
return PendingIntent.getBroadcast(context, 0 /* requestCode */, intent,
PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE);
PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_MUTABLE);
}
}