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

Commit 0211762f 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: b12f1a82

Change-Id: I887c02845020b7509130111dfa87e430f81d153d
parents 4eedcac7 b12f1a82
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,