Fix the non-working bluetooth slice in the Assistant.

The bluetooh slice has an inline control, which means the PendingIntent
of the slice action should be mutable. Update the mutability flag to fix
this issue.

Fixes: 171521962
Test: Use voice command to turn on bluetooth and the bt slice should
work properly.

Change-Id: I488eef5c94b2bf66a67fb97b4102d5da2971bf04
This commit is contained in:
Yi-Ling Chuang
2021-01-13 12:24:33 +08:00
parent 050b54165f
commit cc00c0de8c

View File

@@ -136,6 +136,6 @@ public class BluetoothSliceBuilder {
final Intent intent = new Intent(ACTION_BLUETOOTH_SLICE_CHANGED)
.setClass(context, SliceBroadcastReceiver.class);
return PendingIntent.getBroadcast(context, 0 /* requestCode */, intent,
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE);
}
}