Add the mutability flag to BluetoothDevicesSlice.
Starting Android S, all PendingIntent has to have a explicit mutability flag set. Fixes: 172207505 Fixes: 172811893 Test: Enable BluetoothDevicesSlice and play on it. Play on the volume panel. Change-Id: I618455de683d619fe300309e31864b3c64f12ad1
This commit is contained in:
@@ -97,7 +97,8 @@ public class BluetoothDevicesSliceTest {
|
||||
// Mock the icon and detail intent of Bluetooth.
|
||||
mIcon = IconCompat.createWithResource(mContext,
|
||||
com.android.internal.R.drawable.ic_settings_bluetooth);
|
||||
mDetailIntent = PendingIntent.getActivity(mContext, 0, new Intent("test action"), 0);
|
||||
mDetailIntent = PendingIntent.getActivity(mContext, 0, new Intent("test action"),
|
||||
PendingIntent.FLAG_IMMUTABLE);
|
||||
doReturn(mIcon).when(mBluetoothDevicesSlice).getBluetoothDeviceIcon(any());
|
||||
doReturn(mDetailIntent).when(mBluetoothDevicesSlice).getBluetoothDetailIntent(any());
|
||||
|
||||
|
Reference in New Issue
Block a user