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

Commit c5d21dd4 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by android-build-merger
Browse files

Merge "Battery Level: Add FLAG_RECEIVER_INCLUDE_BACKGROUND flag to intent" am: 63d0df75

am: 75e1b500

Change-Id: I958c3a98e932b5b928384e6e1d7bc72d9a566a1a
parents 9d86591e 75e1b500
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -455,6 +455,7 @@ final class RemoteDevices {
        intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device);
        intent.putExtra(BluetoothDevice.EXTRA_BATTERY_LEVEL, batteryLevel);
        intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
        intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
        sAdapterService.sendBroadcast(intent, AdapterService.BLUETOOTH_PERM);
    }

+2 −1
Original line number Diff line number Diff line
@@ -440,7 +440,8 @@ public class RemoteDevicesTest {
        Assert.assertEquals(device, intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE));
        Assert.assertEquals(batteryLevel,
                intent.getIntExtra(BluetoothDevice.EXTRA_BATTERY_LEVEL, -15));
        Assert.assertEquals(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT, intent.getFlags());
        Assert.assertEquals(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT
                        | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND, intent.getFlags());
    }

    private static Intent getHeadsetConnectionStateChangedIntent(BluetoothDevice device,